Managing Secrets
Create, update, and delete secrets through the Stitch UI or CLI.
Secrets belong to your active organization. Check that you are in the correct organization before making changes. Saved values are not shown again.
Using the UI
Open Secrets in the Stitch app.
Add a Secret
- Select Add secret.
- Enter a name and value. You can also add a description.
- Save the secret.
Update a Secret
Open a secret to edit its name or description. To replace its value, enter the new credential in Rotate value and save. Leave that field blank to keep the current value.
If you rename a secret, update any factory configuration that references its old name.
Delete a Secret
Organization owners and admins can delete secrets. Check that no factories need the secret before deleting it.
Using the CLI
| Command | Purpose |
|---|---|
stitch secrets list | List secret names and metadata, not values |
stitch secrets add <name> | Create a secret through a hidden prompt |
stitch secrets remove <name> | Delete a secret; owner or admin only |
For example, add an OpenAI API key:
stitch secrets add OPENAI_API_KEYEnter the value in your private terminal when prompted. To update an existing secret, use the UI. The CLI does not have an update command.
stitch secrets remove deletes immediately without confirmation.Names and Values
| Field | Requirements |
|---|---|
| Name | 1–64 characters; letters, numbers, underscores, or hyphens |
| Value | Non-empty; up to 8192 characters |
| Description | Optional |
Do not put secret values in chat, factory files, command arguments, or logs.