LLLanyard

Guides

Keep keys out of Codex, Copilot, Gemini, Windsurf and Cursor

Every AI coding tool has the same problem: to use an API or a server it needs a secret, and the easy place to put one is a .env file or a config file the tool can read. LLLanyard keeps the secrets in your keychain and tells each tool to run commands through lllanyard exec and lllanyard ssh, so it uses a key without ever holding it.

Connect a tool

lllanyard setup codex                      # OpenAI Codex (CLI and IDE extension)
lllanyard setup copilot                    # GitHub Copilot CLI
lllanyard setup copilot --project .        # VS Code Copilot Chat, for this folder
lllanyard setup gemini                     # Gemini CLI
lllanyard setup windsurf                   # Windsurf
lllanyard setup cursor                     # Cursor
lllanyard setup agent                      # anything else

Each command does two things. It adds a short section to the tool's own instructions file, telling it to run scripts with lllanyard exec, to use lllanyard ssh for servers, and never to look for keys in .env files. And it adds LLLanyard's MCP server to the tool's settings. Your other settings are kept, the old file is saved as <file>.lllanyard-backup, and --remove undoes it. Run lllanyard setup with no arguments to see what's connected.

Where it goes

ToolInstructionsMCP server
OpenAI Codex~/.codex/AGENTS.md~/.codex/config.toml
GitHub Copilot CLI~/.copilot/copilot-instructions.md~/.copilot/mcp-config.json
VS Code Copilot Chat.github/copilot-instructions.md.vscode/mcp.json
Gemini CLI~/.gemini/GEMINI.md~/.gemini/settings.json
Windsurf~/.codeium/windsurf/memories/global_rules.md~/.codeium/windsurf/mcp_config.json
CursorIts settings (Rules): run setup agent and paste the section~/.cursor/mcp.json

The project files for VS Code name lllanyard rather than paths on your computer, so they're safe to commit. Each person on the team still needs LLLanyard and their own keys.

A tool that isn't listed

Any agent that can run shell commands can use lllanyard exec and lllanyard ssh; it only needs to be told to. lllanyard setup agent adds the instructions to AGENTS.md, which many tools read, and prints the MCP settings to paste into one that supports MCP:

{ "mcpServers": { "lllanyard": { "command": "lllanyard", "args": ["mcp", "--run"] } } }

What this does and doesn't do

More guides