monkeys

export

Write a vault lookup for your shell's startup file.

monkeys export [@profile] [KEY[,KEY...]]

For a secret that every shell should carry from startup, export writes the lines and you paste them into your startup file:

monkeys export ANTHROPIC_API_KEY

On macOS:

export ANTHROPIC_API_KEY="$(security find-generic-password -s monkeys -a ANTHROPIC_API_KEY -w)"

On Linux:

export ANTHROPIC_API_KEY="$(secret-tool lookup service monkeys account ANTHROPIC_API_KEY)"

No secret is in either line. Each asks the vault when the shell starts, the way you would have written it by hand, so a startup file written on one machine is for that machine's vault. With no keys, inside a project, it writes one line per key the file lists, each under the profile's full name:

monkeys export
export DATABASE_URL="$(security find-generic-password -s monkeys -a foo.test/DATABASE_URL -w)"

monkeys writes nothing into your startup file for you: a secret that every process on the machine inherits is a decision to make with the file open.

The keychain treats security as its own program, so the first shell that runs the line asks once whether to allow it. Answer Always Allow and it stays quiet.