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

# bt prompts

> Manage Braintrust prompts, versions, and environment assignments from the CLI.

`bt prompts` manages prompts in the active Braintrust project. You can inspect prompt versions and assign a specific version to a [deployment environment](/docs/deploy/environments).

## Subcommands

| Subcommand                   | Description                                                                   |
| ---------------------------- | ----------------------------------------------------------------------------- |
| `bt prompts`                 | List prompts in the active project                                            |
| `bt prompts list`            | List prompts in the active project                                            |
| `bt prompts view [slug]`     | View a prompt. Omit the slug to choose a prompt interactively                 |
| `bt prompts versions [slug]` | List the versions of a prompt. Omit the slug to choose a prompt interactively |
| `bt prompts assign <slug>`   | Assign a prompt version to an environment                                     |
| `bt prompts unassign <slug>` | Remove a prompt from an environment                                           |
| `bt prompts delete [slug]`   | Delete a prompt. Omit the slug to choose a prompt interactively               |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
bt prompts list
bt prompts view my-prompt
bt prompts versions my-prompt
bt prompts assign my-prompt --version 1234 --environment production
bt prompts view my-prompt --environment production
bt prompts unassign my-prompt --environment production
bt prompts delete my-prompt
```

Use `bt prompts versions` to find a prompt version ID. Both short and decimal transaction IDs are accepted. Pass `--environment` to `bt prompts list` or `bt prompts view` to inspect the version assigned to an environment.

## Command-specific flags

| Command               | Flag                   | Description                                                                         |
| --------------------- | ---------------------- | ----------------------------------------------------------------------------------- |
| `bt prompts list`     | `--environment <SLUG>` | List the prompt versions assigned to an environment                                 |
| `bt prompts view`     | `--slug`, `-s <SLUG>`  | Prompt slug (alternative to the positional argument)                                |
| `bt prompts view`     | `--version <VERSION>`  | View a specific prompt version. Cannot be used with `--environment`                 |
| `bt prompts view`     | `--environment <SLUG>` | View the prompt version assigned to an environment. Cannot be used with `--version` |
| `bt prompts view`     | `--web`                | Open the prompt in your browser instead of showing it in the terminal               |
| `bt prompts versions` | `--slug`, `-s <SLUG>`  | Prompt slug (alternative to the positional argument)                                |
| `bt prompts assign`   | `--slug`, `-s <SLUG>`  | Prompt slug (alternative to the positional argument)                                |
| `bt prompts assign`   | `--version <VERSION>`  | Prompt version to assign. Required                                                  |
| `bt prompts assign`   | `--environment <SLUG>` | Environment to assign the prompt version to. Required                               |
| `bt prompts unassign` | `--slug`, `-s <SLUG>`  | Prompt slug (alternative to the positional argument)                                |
| `bt prompts unassign` | `--environment <SLUG>` | Environment to remove the prompt from. Required                                     |
| `bt prompts delete`   | `--slug`, `-s <SLUG>`  | Prompt slug (alternative to the positional argument)                                |
| `bt prompts delete`   | `--force`, `-f`        | Skip the confirmation prompt. Requires a prompt slug                                |

`bt prompts` accepts shared [global flags](/docs/reference/cli/overview#global-flags), including `--org`, `--project`, and `--profile`. Use `--json` with `bt prompts`, `bt prompts list`, `bt prompts view`, `bt prompts versions`, `bt prompts assign`, or `bt prompts unassign` for machine-readable output. Use `--verbose` with `bt prompts view` to include the prompt's options.
