Goose
Goose is Block’s open-source, extensible AI agent for the terminal (and desktop). It is MCP-native and works with many LLM providers. Use varlock to inject provider API keys at runtime so they never sit in a plain text .env or shell history.
For install, schema setup, and shared patterns, see the AI Tools overview.
Launch commands: goose (interactive), goose session, goose run (see CLI commands)
Environment variables (see environment variables and providers):
- Provider keys such as
ANTHROPIC_API_KEY,OPENAI_API_KEY,OPENROUTER_API_KEY,GOOGLE_API_KEY - Optional:
GOOSE_PROVIDERandGOOSE_MODELto select provider/model withoutgoose configure
You can also store credentials via goose configure. Env injection is a better fit for shared machines, CI, and keeping secrets out of goose’s local secret store.
In a project
Section titled “In a project”Add to .env.schema:
# @sensitive @requiredANTHROPIC_API_KEY=op(op://api-local/anthropic/api-key)
# @sensitiveOPENAI_API_KEY=op(op://api-local/openai/api-key)
# @type=stringGOOSE_PROVIDER=anthropic
# @type=stringGOOSE_MODEL=claude-sonnet-4-5-20250929varlock run -- goose
# one-shot taskvarlock run -- goose run -t "summarize recent git changes"From any directory
Section titled “From any directory”Personal schema at ~/.env.goose:
# @sensitive @requiredANTHROPIC_API_KEY=op(op://api-local/anthropic/api-key)
# @type=stringGOOSE_PROVIDER=anthropic
# @type=stringGOOSE_MODEL=claude-sonnet-4-5-20250929varlock run -p ~/.env.goose -- gooseShell alias (optional)
Section titled “Shell alias (optional)”alias vgoose='varlock run -p ~/.env.goose --no-redact-stdout -- goose'--no-redact-stdout keeps Goose’s own terminal output unredacted while secrets stay out of your shell history.
See the Goose docs for install, extensions/MCP, and recipes. Pair with the MCP guide when wiring secret-backed MCP servers.