Skip to content

Commit

Permalink
Add docs for generate-example-env command
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Feb 10, 2023
1 parent 4c56bca commit d50de93
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion docs/cli/commands/secrets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,25 @@ $ infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jeb

Default value: `dev`
</Accordion>
</Accordion>
</Accordion>

<Accordion title="infisical secrets generate-example-env">
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:<value>` 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
<Accordion title="--env">
Used to select the environment name on which actions should be taken on
Default value: `dev`
</Accordion>
</Accordion>

0 comments on commit d50de93

Please sign in to comment.