# 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).    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apolo.us/index/apolo-cli/commands/secret.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
