add docs for folder cli command

This commit is contained in:
Maidul Islam
2023-11-29 09:57:45 -05:00
parent 057fcb164d
commit afd6a7736a
3 changed files with 70 additions and 3 deletions

View File

@@ -260,7 +260,7 @@ var agentCmd = &cobra.Command{
infisical agent
`,
Use: "agent",
Short: "agent",
Short: "Used to launch a client daemon that streamlines authentication and secret retrieval processes in some environments",
DisableFlagsInUseLine: true,
Run: func(cmd *cobra.Command, args []string) {

View File

@@ -689,12 +689,12 @@ func init() {
// Add createCmd flags here
createCmd.Flags().StringP("path", "p", "/", "Path to where the folder should be created")
createCmd.Flags().StringP("name", "n", "", "Name of the folder to be created")
createCmd.Flags().StringP("name", "n", "", "Name of the folder to be created in selected `--path`")
folderCmd.AddCommand(createCmd)
// Add deleteCmd flags here
deleteCmd.Flags().StringP("path", "p", "/", "Path to the folder to be deleted")
deleteCmd.Flags().StringP("name", "n", "", "Name of the folder to be deleted")
deleteCmd.Flags().StringP("name", "n", "", "Name of the folder to be deleted within selected `--path`")
folderCmd.AddCommand(deleteCmd)
secretsCmd.AddCommand(folderCmd)

View File

@@ -134,6 +134,73 @@ $ infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jeb
</Accordion>
</Accordion>
<Accordion title="infisical secrets folders">
This command allows you to fetch, create and delete folders from within a path from a given project.
```bash
$ infisical secrets folders
```
### sub commands
<Accordion title="get">
Used to fetch all folders within a path in a given project
```
infisical secrets folders get --path=/some/path/to/folder
```
#### Flags
<Accordion title="--path">
The path from where folders should be fetched from
Default value: `/`
</Accordion>
<Accordion title="--token">
Fetch folders using the Infisical service token
Default value: ``
</Accordion>
</Accordion>
<Accordion title="create">
Used to create a folder by name within a path.
```
infisical secrets folders create --path=/some/path/to/folder --name=folder-name
```
### Flags
<Accordion title="--path">
Path to where the folder should be created
Default value: `/`
</Accordion>
<Accordion title="--name">
Name of the folder to be created in selected `--path`
Default value: ``
</Accordion>
</Accordion>
<Accordion title="delete">
Used to delete a folder by name within a path.
```
infisical secrets folders delete --path=/some/path/to/folder --name=folder-name
```
### Flags
<Accordion title="--path">
Path to where the folder should be created
Default value: `/`
</Accordion>
<Accordion title="--name">
Name of the folder to be deleted within selected `--path`
Default value: ``
</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.