> ## Documentation Index
> Fetch the complete documentation index at: https://usefused.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or update from a prompt

> Describe the capabilities you need, review exact operations, and publish an SDK or MCP version.

Use `fused-cli prompt` to create an app or add capabilities to an existing one from a natural-language goal. The CLI resolves services and operations, shows a proposal, and asks you to confirm before applying changes.

```bash theme={null}
fused-cli prompt "Create a TypeScript SDK for Stripe customer lookup"
```

Service discovery checks the workspace first, then searches Registry when needed. The proposal identifies the selected services, exact versions, and operations. Missing workspace services go through the existing activation lifecycle before the app is applied.

<Note>
  `prompt` requires an interactive terminal. For unattended automation, use [explicit init, extend, or plan/apply commands](/docs/advanced/control-the-workflow).
</Note>

## Update an existing app

Name the app with `--update`:

```bash theme={null}
fused-cli prompt --update billing-sdk "Add Stripe invoice lookup"
```

Or name it in the goal:

```bash theme={null}
fused-cli prompt "Update billing-sdk to add Stripe invoice lookup"
```

| How you identify the app                                     | How the CLI resolves it                                                                     |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
| `--update billing-sdk`                                       | Finds the named SDK or MCP config under the local `.fused/` directory                       |
| An update goal naming `billing-sdk`                          | Extracts the name, finds its local config, then interprets the goal with that app's context |
| `-f .fused/sdks/billing.yaml` pointing to an existing config | Uses that exact file as the update target                                                   |

The CLI does not send an inventory of every local app to the model or choose an unnamed SDK automatically. If the name is missing or several configs match, supply `--update` or an exact `-f` path. An update target must exist locally; a missing target stops the request instead of creating an app.

Updates preserve existing selections, language, bucket, authentication configuration, and service-version pins. They add the requested capabilities to the same file and app family. A changed stable SemVer version advances to the next minor release, such as `1.2.3` to `1.3.0`. Use `--version` to choose another successor; prerelease and non-SemVer versions require it. An unchanged proposal keeps its version.

```bash theme={null}
fused-cli prompt --update billing-sdk --version 2.0.0 \
  "Add Stripe invoice lookup"
```

Prompt updates are additive. To remove capabilities, change routing or language, upgrade service pins, or replace an existing Unified Operation, [edit and plan the config explicitly](/docs/advanced/control-the-workflow).

## Describe a sequential operation

When your goal requests ordered provider calls as one operation, prompt can draft a [Unified Operation](/docs/app/unified/declare):

```bash theme={null}
fused-cli prompt --update billing-sdk \
  "Add one operation that creates a Stripe customer, then creates an invoice for that customer"
```

The same workflow supports MCP apps:

```bash theme={null}
fused-cli prompt --update billing-agent \
  "Add one operation that creates a Stripe customer, then creates an invoice for that customer"
```

The CLI first selects exact provider operations, then requests a draft grounded in their pinned request and response contracts. The proposal includes the execution order, typed caller input, dependency mappings, and returned output. Review these together before confirming.

| Intent                                                                                         | Proposed behavior                                        |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| “Support customer creation and invoice creation”                                               | Separate callable operations                             |
| “Create a customer, then create an invoice for that customer”                                  | A sequential Unified Operation                           |
| An ambiguous mapping or a step requiring unsupported reasoning, approval, branching, or a loop | Clarification instead of a partial sequential definition |

Sequential drafting supports one new Unified Operation with 2–16 steps for TypeScript or Python SDKs and MCP apps. Go SDKs and direct REST apps do not support this prompt composition path. Drafting does not add rollback calls automatically. An existing Unified Operation with a different definition is not overwritten; request a new name or edit its config explicitly.

Applying publishes the configuration. It does not run the composed provider calls. SDK users must adopt the new package version and call its new method; MCP users discover and invoke the operation through their authorized app version.

## What the models receive

The CLI shows processing disclosures before the corresponding requests:

| Stage               | Model                                            | Data used                                                                                                          |
| ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| Intent parsing      | Registry's configured language model             | Your goal; for updates, the selected app's name, kind, and service names                                           |
| Operation selection | Jev through the licensed Fused Registry endpoint | Operation search intent, candidate operation names, and descriptions                                               |
| Sequential drafting | Registry's configured language model             | Your goal and the exact selected operations' Registry contracts, including parameters and request/response schemas |

No additional user API key is required. The CLI does not send local bucket or authentication configuration, provider credentials, or execution payloads for drafting. Keep credentials out of the goal itself. The generated definition is validated against the supported authoring format and selected operations; the normal Engine plan/apply permission and version checks still apply.

## Useful flags

| Flag                    | Purpose                                                                |
| ----------------------- | ---------------------------------------------------------------------- |
| `--update <app-name>`   | Selects an existing local app for an additive update                   |
| `-f <path>`             | Selects an exact existing config, or a destination for a new app       |
| `--kind sdk\|mcp\|rest` | Constrains the output kind; it cannot convert an existing app          |
| `--name <name>`         | Overrides a new app's suggested name; it cannot rename an existing app |
| `--version <version>`   | Sets the initial version or an explicit immutable successor            |
| `--language <language>` | Selects the generated SDK language on creation                         |
| `--bucket <name>`       | Selects an existing bucket on creation                                 |
