---
url: https://docs.mochiexec.io/reference/cli/mochi_secret_get.md
description: Get the value of a secret in the current vault.
---

# mochi secret get

Get the value of a secret in the current vault.

```shell
mochi secret get REFERENCE [flags]
```

## Examples

```shell
mochi secret get MY_TOKEN
mochi secret get MY_TOKEN --as-plain-text
mochi secret get MY_TOKEN --copy
```

## Options

| Flag | Type | Description |
|------|------|-------------|
| `--copy` |  | Copy the secret value to the clipboard |
| `-h, --help` |  | help for get |
| `-o, --output` | `string` | Output format. One of: yaml, json, or tui. |
| `-p, --plaintext` |  | Output the secret value as plain text instead of an obfuscated string |
| `-V, --vault` | `string` | Vault name to use instead of the current vault. |

## Options inherited from parent commands

| Flag | Type | Description |
|------|------|-------------|
| `-L, --log-level` | `string` | Log verbosity level (debug, info, fatal) (default "info") |
| `--sync` |  | Sync flow cache and workspaces |

## See also

* [mochi secret](mochi_secret.md) — Manage secrets stored in a vault.
