agent-secrets CLI

agent-secrets lends keys to an AI agent for a limited time: age encryption, TTL leases, an access log and an emergency revoke.

  • 114 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • The agent receives the key in plain text and can use or pass it on.
  • The tool keeps all keys and the encryption identity on the user disk and runs a background daemon.
All reasons and checks

joelhooks/agent-secrets

Install

Manual install

curl -fsSL https://raw.githubusercontent.com/joelhooks/agent-secrets/main/install.sh | bash

The first README option for macOS, Linux and WSL. Others: build from a clone and `go install`.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The agent receives the key in plain text and can use or pass it on.
  • The tool keeps all keys and the encryption identity on the user disk and runs a background daemon.

This is third-party code. Review the repository files before installing.

What it does

A Go secrets manager for agents. Keys live in an age-encrypted store, and the agent gets a lease rather than the raw password: `secrets lease github_token --ttl 30m` returns the value for a limited time. Every operation lands in an append-only log, and `secrets audit` shows recent entries. The daemon listens on a Unix socket. `secrets revoke --all` revokes every lease, and optional rotation hooks (for example `gh auth refresh`) renew keys. The root `secrets` command prints a JSON command tree, so an agent discovers commands itself. An OpenClaw skill teaches the agent how to use the tool.

Who it is for. Developers who run agents with access to API keys and want to hand them out temporarily, with a log and a revoke button.

Good fit when

  • An agent needs a GitHub token for half an hour, not forever.
  • After a suspicious session all issued keys must be revoked with one command.
  • You need a log of which agent got which secret and when.
  • Keys from `.env` should move into an encrypted store.

Not a fit when

  • You need a ready cloud password manager with team features.
  • The host cannot keep a background daemon with a socket.
  • The agent must read secrets without leases and a log.

Example request

Lease `github_token` for 30 minutes with `secrets lease`, run git push and revoke the lease right after.

Limitations

The agent sees the issued secret value in plain text: a lease limits the time but does not hide the key from the process that received it. Most commands need the daemon running: `secrets serve &` starts it, and the install script does that itself. Installing with `curl ... | bash` runs a script from the network, so read it first. In v0.5.x some flags are deprecated and go away in 0.6.0, so old scripts need updates.

How to disable. Run `secrets revoke --all`, stop the daemon and delete the `~/.agent-secrets` folder with the `secrets` binary. Reissue the keys that lived in the store at their providers.

FAQ

How does an agent get a secret?

Run `export GITHUB_TOKEN=$(secrets lease github_token)`. By default the command prints only the value, and `--json` adds lease metadata.

How do I revoke everything?

`secrets revoke --all` invalidates all active leases at once. Optionally it also rotates secrets and wipes the store.

What is the maximum lease time?

24 hours by default, set in `config.json` with `max_lease_ttl`.

Where is the log kept?

The append-only access log can be read with `secrets audit --tail 20`.

What is the agent skill?

The OpenClaw skill is added with `npx openclaw skills add https://github.com/joelhooks/agent-secrets` and documents how to use the tool.

Discussion

No questions or reviews yet.

CLI tools

A utility keeps keys in the system keychain and injects them at the transport layer, so the agent never sees a value.

CLIBroad access197Repository stars

Vahta lets an agent use your passwords and API keys from an encrypted vault without ever showing it the values

CLIBroad access71Repository stars

A command-line tool that finds secrets in local AI agent history and redacts them while keeping JSONL structure intact.

CLIExtended access88Repository stars

AgentGuard checks a coding agent's actions before they run and scans third-party skills for secrets, backdoors and injections.

PluginExtended access494Repository stars

Vigils sits between an AI agent and its tools: it hides secrets, asks for approval and keeps a tamper-evident log of calls

CLIBroad access74Repository stars

The elbab CLI keeps keys and passwords encrypted and lets an agent run commands with secrets without ever showing them.

CLIBroad access268Repository stars

README in short

The README explains why secret leases matter and covers installation, quick start, JSON response format, commands, daemon diagram, security model and config. A migration guide from 0.4.x to 0.5.x is included.

README badge

Report a problem