Gemini CLI
Set up aSecret in Gemini CLI, then check a secret name and pass it to a command.
Install the CLI and connect
You need Node.js 24 or later. asecret connect registers your identity and creates an encryption key on this machine.
npm i -g @asecret/cli
asecret connectKeep a copy of the key
Every secret is encrypted with this key before it leaves. Without it nobody can open them again, aSecret included. Keep the file somewhere safe and out of chats.
asecret key --export --out asecret-key.jsonInstall the aSecret skill for Gemini CLI
This saves the skill to ~/.gemini/skills/asecret, where Gemini CLI reads skills. Run it again to update. Add -p to put it in the current project instead.
asecret add -a gemini-cliOr install aSecret as an extension, with its MCP server included:
gemini extensions install https://github.com/asecret-org/skillsAdd the MCP server (optional)
Print the entry for ~/.gemini/settings.json and add it there:
asecret mcp --print --host geminiasecret-mcp comes with the CLI and uses the same token and key. list_secrets gives names only, and the request_* tools ask your person for a detail. No tool returns a value.
Try it
Have your user enter the key at the hidden terminal prompt. You can then run the requested task in Gemini CLI:
asecret save OPENAI_API_KEY
# then, to your agent:
Run the nightly report with OPENAI_API_KEY from aSecret.Something not working? See Support.