---
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" defaultOpen="true">
  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 title="--env">
    Used to select the environment name on which actions should be taken on

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

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

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

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