# secret

Operations with secrets

## Usage

```bash
apolo secret [OPTIONS] COMMAND [ARGS]...
```

Operations with secrets.

**Commands:**

| Usage         | Description                    |
| ------------- | ------------------------------ |
| [*add*](#add) | Add secret KEY with data VALUE |
| [*get*](#get) | Get secret KEY                 |
| [*ls*](#ls)   | List secrets                   |
| [*rm*](#rm)   | Remove secret KEY              |

### add

Add secret KEY with data VALUE

#### Usage

```bash
apolo secret add [OPTIONS] KEY VALUE
```

Add secret `KEY` with data `VALUE`.

If `VALUE` starts with @ it points to a file with secrets content.

#### Examples

```bash

$ apolo secret add KEY_NAME VALUE
$ apolo secret add KEY_NAME @path/to/file.txt
```

#### Options

| Name                | Description                                                      |
| ------------------- | ---------------------------------------------------------------- |
| *--help*            | Show this message and exit.                                      |
| *--cluster CLUSTER* | Perform on a specified cluster (the current cluster by default). |
| *--org ORG*         | Look on a specified org (the current org by default).            |
| *--project PROJECT* | Look on a specified project (the current project by default).    |

### get

Get secret KEY

#### Usage

```bash
apolo secret get [OPTIONS] KEY
```

Get secret `KEY`.

If --file is specified, the secret content will be saved to the file. Otherwise, it will be displayed on stdout.

#### Examples

```bash

$ apolo secret get KEY_NAME
$ apolo secret get KEY_NAME --file secret.txt
```

#### Options

| Name                | Description                                                      |
| ------------------- | ---------------------------------------------------------------- |
| *--help*            | Show this message and exit.                                      |
| *--cluster CLUSTER* | Perform on a specified cluster (the current cluster by default). |
| *--org ORG*         | Look on a specified org (the current org by default).            |
| *-f, --file PATH*   | Save secret to file instead of displaying it.                    |
| *--project PROJECT* | Look on a specified project (the current project by default).    |

### ls

List secrets

#### Usage

```bash
apolo secret ls [OPTIONS]
```

List secrets.

#### Options

| Name                | Description                                                   |
| ------------------- | ------------------------------------------------------------- |
| *--help*            | Show this message and exit.                                   |
| *--all-orgs*        | Show secrets in all orgs.                                     |
| *--all-projects*    | Show secrets in all projects.                                 |
| *--cluster CLUSTER* | Look on a specified cluster (the current cluster by default). |
| *--full-uri*        | Output full secret URI.                                       |
| *--org ORG*         | Look on a specified org (the current org by default).         |
| *--project PROJECT* | Look on a specified project (the current project by default). |

### rm

Remove secret KEY

#### Usage

```bash
apolo secret rm [OPTIONS] KEY
```

Remove secret `KEY`.

#### Options

| Name                | Description                                                      |
| ------------------- | ---------------------------------------------------------------- |
| *--help*            | Show this message and exit.                                      |
| *--cluster CLUSTER* | Perform on a specified cluster (the current cluster by default). |
| *--org ORG*         | Look on a specified org (the current org by default).            |
| *--project PROJECT* | Look on a specified project (the current project by default).    |
