--- title: "infisical secrets" description: "Perform CRUD operations with Infisical secrets" --- ``` infisical secrets ``` ## Description This command enables you to perform CRUD (create, read, update, delete) operations on secrets within your Infisical project. With it, you can view, create, update, and delete secrets in your environment. ### Sub-commands Use this command to print out all of the secrets in your project ```bash $ infisical secrets ``` ### flags Parse shell parameter expansions in your secrets Default value: `true` Used to select the environment name on which actions should be taken on Default value: `dev` This command allows you selectively print the requested secrets by name ```bash $ infisical secrets get ... # Example $ infisical secrets get DOMAIN ``` ### Flags Used to select the environment name on which actions should be taken on Default value: `dev` This command allows you to set or update secrets in your environment. If the secret key provided already exists, its value will be updated with the new value. If the secret key does not exist, a new secret will be created using both the key and value provided. ```bash $ infisical secrets set ... ## Example $ infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jebhfbwe ``` ### Flags Used to select the environment name on which actions should be taken on Default value: `dev` This command allows you to delete secrets by their name(s). ```bash $ infisical secrets delete ... ## Example $ infisical secrets delete STRIPE_API_KEY DOMAIN HASH ``` ### Flags Used to select the environment name on which actions should be taken on Default value: `dev` This command allows you to generate an example .env file from your secrets and with their associated comments and tags. This is useful when you would like to let others who work on the project but do not use Infisical become aware of the required environment variables and their intended values. To place default values in your example .env file, you can simply include the syntax `DEFAULT:` within your secret's comment in Infisical. This will result in the specified value being extracted and utilized as the default. ```bash $ infisical secrets generate-example-env ## Example $ infisical secrets generate-example-env > .example-env ``` ### Flags Used to select the environment name on which actions should be taken on Default value: `dev`