Using HASP with gum
gum calls Google APIs. HASP protects the other secrets your agent needs to do the surrounding work.
Use HASP when a gum workflow also needs repo secrets: test tokens, deploy keys, staging credentials, billing sandbox keys, or service config. Keep Google refresh tokens in gum's OS-keychain path. Keep the rest in HASP.
HASP lives at github.com/gethasp/hasp. Start with its README and quickstart.
Install HASP
brew tap gethasp/homebrew-tap
brew install hasp
hasp setupHASP runs on your machine. It does not need a hosted control plane for the normal local broker flow.
Split the Jobs
Use gum for:
- Google API discovery
- OAuth login and local refresh-token storage
- read, write, and destructive Google API calls
- MCP tools for agents
Use HASP for:
- non-Google API keys
- deploy keys
- test credentials
- repo-level secret policy
- brokered command runs
Do not copy secrets into prompts, shell history, README snippets, or local agent notes. Give the command a grant instead.
Safe Setup
Register gum's OAuth client through stdin:
printf '%s' "$GOOGLE_OAUTH_CLIENT_SECRET" \
| gum auth use-oauth-client --client-id "$GOOGLE_OAUTH_CLIENT_ID" --secret-stdinAdd project secrets to HASP:
hasp secret add
hasp app connect gum-work --cmd 'gum doctor' --install=neverRun a gum command with a short-lived grant:
hasp run --project-root . \
--target gum-work \
--grant-project session \
--grant-secret session \
-- gum doctor --format=jsonUse hasp agent connect when your agent should talk to HASP through MCP:
hasp agent connect codex-cli --project-root .
hasp agent launch codex-cli -- codexSafety Checklist
- Use
gum auth use-oauth-client --secret-stdinfor Google OAuth client - Use HASP for repo and deploy secrets.
- Keep grants short. Prefer
sessionor a small time window. - Run
gum doctor --format=jsonbefore demos and CI checks. - Run
hasp secret diff .envbefore committing a repo that used to carry - Treat Google API responses, email bodies, docs, sheets, and plugin output as
secrets.
plaintext secrets.
untrusted input.
Agent Skill
gum ships a hasp skill alongside core and mcp.
gum skills list
gum skills show hasp
gum setup --target all --features skills,mcp --yesInstall the skills before asking an agent to work with Google APIs and local secrets in the same task.
