docs-ssh
Documentation over SSH for AI coding agents
A self-hosted SSH server serving 174+ documentation sources
as searchable markdown. Your AI agent connects over SSH and uses the
tools it already knows — rg, bat, tree —
to search and read docs with the same interface it uses for your code.
SSH config
Add this to ~/.ssh/config to skip the port and user on every command:
Host docs.erfi.io User docs Port 2222 StrictHostKeyChecking no UserKnownHostsFile /dev/null LogLevel ERROR
Then all commands simplify to ssh docs.erfi.io ...
Quick setup
-
Install custom tools for your agent
# OpenCode — custom tools + rules $ ssh docs.erfi.io tools > .opencode/tools/docs.ts $ ssh docs.erfi.io agents >> AGENTS.md # Claude Code / Cursor / Gemini $ ssh docs.erfi.io agents claude >> CLAUDE.md
-
Or pipe the setup guide to your agent
$ ssh docs.erfi.io setup | opencode
-
Or just explore
$ ssh docs.erfi.io "rg -i 'RLS' /docs/supabase/" $ ssh docs.erfi.io "bat --plain --paging=never /docs/postgres/indexes.md" $ ssh docs.erfi.io "tree /docs/cloudflare/ -L 2"
Built-in commands
ssh docs.erfi.io help # Usage and examples ssh docs.erfi.io sources # List doc sets with file counts ssh docs.erfi.io agents # AGENTS.md (raw SSH patterns) ssh docs.erfi.io agents opencode # OpenCode (uses custom tools) ssh docs.erfi.io agents claude # CLAUDE.md format ssh docs.erfi.io agents skill # SKILL.md with YAML frontmatter ssh docs.erfi.io agents help # Show all output formats ssh docs.erfi.io tools # OpenCode custom tools (rg --json, bat) ssh docs.erfi.io setup # Interactive setup guide
Token efficiency
Custom tools use a search → summary → targeted read workflow. Output capped at 51K chars (~12K tokens) with truncation hints. Numbers below are representative; see tests/benchmark/ for the harness.
| Approach | Tokens | vs MCP |
|---|---|---|
| docs_search | ~480 | 98% smaller |
| docs_summary | ~200 | n/a |
| docs_grep | ~1,500 | 77% smaller |
| MCP search | ~30,000 | baseline |
Documentation sources
API specs
Sources refreshed daily at 02:00 UTC. All docs under /docs/{source}/.
Self-host
$ docker run -d -p 2222:2222 -p 8080:8080 ghcr.io/erfianugrah/docs-ssh:latest $ ssh -p 2222 docs@localhost help
See the source on GitHub for build instructions and production deployment.