---
title: Keys
description: Manage keys stored in thru config
source_url:
  html: https://thru.org/docs/cli-reference/keys-commands/
  md: https://thru.org/docs/cli-reference/keys-commands.md
---

# Keys

Use `thru keys` when you need to inspect or mutate the keys saved in CLI config.

## Commands

| Command | Use it for |
| - | - |
| `list` | List saved key names. |
| `add <name> <key>` | Add a hex private key to config. |
| `get <name>` | Print a saved key value. |
| `generate <name>` | Generate a new random key. |
| `rm <name>` | Remove a saved key. |

## Important Details

- key names are normalized case-insensitively
- `add` expects a 64-character hex private key
- `generate` and `add` support `--overwrite`

## Minimal Pattern

```bash
thru keys list
thru keys generate alice
thru keys get alice
```

## Notes

- Treat this family as local config mutation, not on-chain state mutation.
- Many other command families rely on these key names for flags like `--fee-payer` and `--authority`.
