For the complete documentation index, see llms.txt. This page is also available as Markdown.

iai secrets update

Update keys in a secret

Synopsis

Update one or more keys in an existing secret.

By default, only the specified keys are updated (merge/upsert). Existing keys not included in the update are preserved.

With --replace, ALL secret data is replaced. Any keys not included in the new data will be permanently deleted.

With --remove, the specified keys are deleted from the secret. Cannot be combined with --data, --from-env-file, or --replace.

Secret data can be provided via: --data KEY=VALUE (can be repeated) --from-env-file FILE (KEY=VALUE pairs, one per line)

When both are provided, --data values take precedence.

iai secrets update <secret_name> [flags]

Examples

  # Update a single key (other keys preserved)
  iai secrets update my-secret -d API_KEY=new-value

  # Update multiple keys (other keys preserved)
  iai secrets update my-secret -d API_KEY=val1 -d DB_PASS=val2

  # Replace all keys (keys not provided will be deleted)
  iai secrets update my-secret -d API_KEY=val1 --replace

  # Remove specific keys from a secret
  iai secrets update my-secret --remove API_KEY

  # Remove multiple keys
  iai secrets update my-secret --remove KEY1 --remove KEY2

Options

Options inherited from parent commands

SEE ALSO

  • iai secrets - Encrypted key-value pairs for services and agents

Last updated

Was this helpful?