Skip to main content

cast secrets

Manage secrets for your agents. Secrets are injected as environment variables when the agent runs.

cast secrets list

List all secrets for an agent.

Usage

Example

Output

Secret values are never displayed. Only the keys and creation dates are shown.

cast secrets set

Set a secret for an agent.

Usage

Arguments

Examples

Output

Setting a secret with an existing key will overwrite the previous value.

Interactive Mode

To avoid exposing secrets in shell history:
When no value is provided, you’ll be prompted to enter it securely:

cast secrets delete

Delete a secret from an agent.

Usage

Example

Output


Using Secrets in Agents

Secrets are available as environment variables in your agent code:

Built-in Secrets

Castari automatically provides these environment variables:
You don’t need to set ANTHROPIC_API_KEY manually. Castari injects it automatically so your agents can use Claude.

Best Practices

  1. Use uppercase names — DATABASE_URL not database_url
  2. Don’t commit secrets — Never put secrets in your agent code or git
  3. Use descriptive names — STRIPE_SECRET_KEY not KEY1
  4. Rotate regularly — Update secrets periodically for security

See Also