# src prompts update

Update an existing prompt in your Sourcegraph instance.

## Usage

```bash
src prompts update [flags] <prompt-id>
```

## Examples

```bash
# Update a prompt's basic information
src prompts update \
  -name="updated-prompt-name" \
  -description="Updated description" \
  -content="Updated prompt content" \
  UHJvbXB0OjE=

# Update a prompt with new tags
src prompts update \
  -name="prompt-with-new-tags" \
  -description="Updated description" \
  -content="Updated content" \
  -tags="UHJvbXB0VGFnOjE=,UHJvbXB0VGFnOjI=" \
  UHJvbXB0OjE=

# Update prompt to draft status
src prompts update \
  -name="draft-prompt" \
  -description="Now a draft" \
  -content="Work in progress content" \
  -draft \
  UHJvbXB0OjE=

# Update prompt settings
src prompts update \
  -name="auto-submit-prompt" \
  -description="Auto-submit enabled" \
  -content="This prompt auto-submits" \
  -auto-submit \
  -recommended \
  -mode="EDIT" \
  UHJvbXB0OjE=
```

## Flags

| Flag           | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| `-name`        | The updated prompt name                                          |
| `-description` | Updated description of the prompt                                |
| `-content`     | The updated prompt template text content                         |
| `-tags`        | Comma-separated list of tag IDs (replaces existing tags)         |
| `-draft`       | Whether the prompt is a draft                                    |
| `-auto-submit` | Whether the prompt should be automatically executed in one click |
| `-mode`        | Mode to execute prompt: CHAT, EDIT, or INSERT (default: "CHAT")  |
| `-recommended` | Whether the prompt is recommended                                |

### API flags

| Flag                    | Description                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `-dump-requests`        | Log GraphQL requests and responses to stdout                                                                      |
| `-get-curl`             | Print the curl command for executing this query and exit (WARNING: includes printing your access token!)          |
| `-insecure-skip-verify` | Skip validation of TLS certificates against trusted chains                                                        |
| `-trace`                | Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing                       |
| `-user-agent-telemetry` | Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default: true) |
