docs-ssh

Documentation over SSH for AI coding agents

$ssh -p 2222 docs@docs.erfi.io

A self-hosted SSH server serving 28,000+ documentation pages as searchable markdown. Your AI agent connects over SSH and uses standard Unix tools — grep, find, cat — 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

  1. Install custom tools for your agent
    # OpenCode — saves tools + agent rules
    $ ssh docs.erfi.io tools > .opencode/tools/docs.ts
    $ ssh docs.erfi.io agents >> AGENTS.md
  2. Or pipe the setup guide to your agent
    $ ssh docs.erfi.io setup | opencode
  3. Or just explore
    $ ssh docs.erfi.io "grep -rl 'RLS' /docs/supabase/"
    $ ssh docs.erfi.io "cat /docs/cloudflare/workers-ai.md"
    $ ssh docs.erfi.io "find /docs/vercel -name '*.md' | head -20"

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      # Output AGENTS.md snippet
ssh docs.erfi.io tools       # Output OpenCode custom tools
ssh docs.erfi.io setup       # Interactive setup guide

Token efficiency

Custom tools use a search → summary → targeted read workflow. Output capped at 16K chars (~4K tokens) with truncation pointers.

ApproachTokensvs MCP
docs_search~48098% smaller
docs_summary~200n/a
docs_grep~1,50077% smaller
MCP search~30,000baseline

Documentation sources

supabase
supabase-blog
cloudflare
cloudflare-blog
vercel
vercel-blog
vercel-changelog
postgres
aws
nextjs
astro
mcp
flyio
tailwindcss
rust-book
erfi-technical-blog
erfi-personal-blog

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.