Skip to content

secret create

Creates and stores a new Secret using the FlexAI Secret Manager.

flexai secret create <secret_name> [flags]
secret_name
<string>
Required

The name of the FlexAI Secret to create.

Examples
  • hf-token-dev
  • wandb-api-key
  • my-secretive-secret-shhh
-h , --help
<boolean>
Optional
Flag

Displays this help page.

Optional
Flag

Take the Secret’s value directly from the Standard input (stdin) instead of the default interactive prompt.

Especially useful for storing secrets from environment variables or files.

Examples
  • cat gcp-service-account.json | flexai secret create gcp-sa --value-stdin
  • echo $HF_TOKEN | flexai secret create -p hf-token-dev
Optional
Flag

Provides more detailed output when createing a Secret.

Writing in or pasting a value using the interactive prompt:

Terminal window
flexai secret create hf-token-dev
Secret Value: █

Setting a Secret’s value by piping in from the stdout of another program:

Terminal window
cat ~/Downloads/gcp-service-account.json | flexai secret create -p secret-from-sa-file