Stitch / docs
Secrets

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

  1. Select Add secret.
  2. Enter a name and value. You can also add a description.
  3. 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

CommandPurpose
stitch secrets listList 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_KEY

Enter 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

FieldRequirements
Name1–64 characters; letters, numbers, underscores, or hyphens
ValueNon-empty; up to 8192 characters
DescriptionOptional

Do not put secret values in chat, factory files, command arguments, or logs.

On this page