# How to Update a Scaffold

## Why Update

In newer versions of stoobly-agent, there are usually improvements and bug fixes. This can improve the Scaffold setup in various ways.

To update, rerun the "create" commands you ran initially but this time with the "--force" flag. This will regenerate all scaffold files and scripts for the respective resource.

## Updating an App

To update the app, rerun the same command you used to create it (including any plugin flags), but with the `--force` flag:

```bash
# Example: Update app with Playwright plugin
stoobly-agent scaffold app create <APP-NAME> --plugin playwright --force

# Example: Update app with Cypress plugin
stoobly-agent scaffold app create <APP-NAME> --plugin cypress --force

# Example: Update app without plugins
stoobly-agent scaffold app create <APP-NAME> --force
```

{% hint style="info" %}
**Important:** Include the same `--plugin` flags you used when initially creating the app. This ensures plugin-specific configurations are preserved when updating.
{% endhint %}

## Updating a Service

To update a service, run:

```bash
stoobly-agent scaffold service create \
    --hostname <SERVICE-HOSTNAME> \
    --scheme <SERVICE-SCHEME> \
    --port <SERVICE-PORT> \
    --workflow mock \
    --workflow record \
    --workflow test \
    <SERVICE-NAME> \
    --force 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stoobly.com/guides/how-to-integrate-e2e-testing/how-to-update-a-scaffold.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
