Skip to content

Commit

Permalink
Merge pull request #1205 from Infisical/add-docs-for-folders-cli
Browse files Browse the repository at this point in the history
add docs for folder cli command
  • Loading branch information
maidul98 authored Nov 29, 2023
2 parents 057fcb1 + afd6a77 commit 5f80e2f
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/packages/cmd/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
4 changes: 2 additions & 2 deletions cli/packages/cmd/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
67 changes: 67 additions & 0 deletions docs/cli/commands/secrets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5f80e2f

Please sign in to comment.