Skip to content

Commit

Permalink
Add crud cli docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Jan 3, 2023
1 parent 3e945dd commit 078c67f
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
93 changes: 93 additions & 0 deletions docs/cli/commands/secrets.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "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
<Accordion title="infisical secrets">
Use this command to print out all of the secrets in your project

```
$ infisical secrets
## Example
$ infisical secrets
┌─────────────┬──────────────┬─────────────┐
│ SECRET NAME │ SECRET VALUE │ SECRET TYPE │
├─────────────┼──────────────┼─────────────┤
│ DOMAIN │ example.com │ shared │
│ HASH │ jebhfbwe │ shared │
└─────────────┴──────────────┴─────────────┘
```

### flags
<Accordion title="--expand">
Parse shell parameter expansions in your secrets

Default value: `true`
</Accordion>

</Accordion>

<Accordion title="infisical secrets get">
This command allows you selectively print the requested secrets by name

```
$ infisical secrets get <secret-name-a> <secret-name-b> ...
# Example
$ infisical secrets get DOMAIN
┌─────────────┬──────────────┬─────────────┐
│ SECRET NAME │ SECRET VALUE │ SECRET TYPE │
├─────────────┼──────────────┼─────────────┤
│ DOMAIN │ example.com │ shared │
└─────────────┴──────────────┴─────────────┘
```

### Flags
None
</Accordion>

<Accordion title="infisical secrets set">
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.

```
$ infisical secrets set <key1=value1> <key2=value2>...
## Example
$ infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jebhfbwe
┌────────────────┬───────────────┬────────────────────────┐
│ SECRET NAME │ SECRET VALUE │ STATUS │
├────────────────┼───────────────┼────────────────────────┤
│ STRIPE_API_KEY │ sjdgwkeudyjwe │ SECRET VALUE UNCHANGED │
│ DOMAIN │ example.com │ SECRET VALUE MODIFIED │
│ HASH │ jebhfbwe │ SECRET CREATED │
└────────────────┴───────────────┴────────────────────────┘
```

### Flags
None
</Accordion>

<Accordion title="infisical secrets delete">
This command allows you to delete secrets by their name(s).

```
$ infisical secrets delete <keyName1> <keyName2>...
## Example
$ infisical secrets delete STRIPE_API_KEY DOMAIN HASH
secret name(s) [STRIPE_API_KEY, DOMAIN, HASH] have been deleted from your project
```

### Flags
None
</Accordion>
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"cli/commands/login",
"cli/commands/init",
"cli/commands/run",
"cli/commands/secrets",
"cli/commands/export",
"cli/commands/vault"
]
Expand Down

0 comments on commit 078c67f

Please sign in to comment.