monkeys

export

For a secret that every shell should carry from startup, export writes the lines and you paste them into your 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 TYPESAFE_API_KEY

On macOS:

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

On Linux:

export TYPESAFE_API_KEY="$(secret-tool lookup service monkeys account TYPESAFE_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.

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.