Skip to main content
The Keystroke documentation is the source of truth for APIs, patterns, and examples — and your agent can search and read it as it works, with no setup. Prefer what the docs return over prior knowledge. Docs access comes in two forms that mirror the two ways to build: the CLI for local work, and the MCP server for chat-first agents. Both are read-only and reach the same documentation.

From the CLI

The CLI ships two documentation commands. They need no authentication and no project — they work the moment the CLI is installed.
Pass a path returned by search (with its .mdx extension) to query to read it: keystroke docs query "cat /learn/agents/build-agents.mdx".

From the MCP server

MCP clients get the same two capabilities as tools, always available once connected:

By URL

When an agent works over plain HTTP fetch instead of the CLI or MCP, the docs are still reachable as clean markdown:
  • A single page — append .md to any docs URL to get a markdown version, e.g. https://keystroke.ai/docs/quickstart.md.
  • The whole indexhttps://keystroke.ai/docs/llms.txt is a machine-readable map of every page, handy for pointing an agent at the full docs at once.

How query works

query (and query_docs) run against a virtualized, read-only documentation filesystem rooted at / — not a shell on any machine. A few things to know:
  • Stateless — each call resets the working directory to /. Use absolute paths, or chain with &&.
  • Output is capped (~30KB per call). Prefer a targeted rg -C 3 "term" /path.mdx or head -n 120 /path.mdx over cat on large pages, and batch several files into one read.
  • Convert a filesystem path to a docs URL by dropping the .mdx extension (/quickstart.mdx/quickstart).

Baseline context: AGENTS.md

keystroke init scaffolds an AGENTS.md guide (symlinked to CLAUDE.md) with concise baseline context — the CLI, project layout, discovery, and working habits — that most coding agents read automatically. The CLI keeps AGENTS.md in sync with your installed version whenever you run a command in the project. AGENTS.md orients your agent; the docs commands above are how it goes deeper.

Next steps

CLI for agents

Headless behavior, JSON output, and the deploy-first loop.

MCP for agents

Build from any MCP client in a hosted workspace.

Build agents

Author agents, configure models, and add tools.

CLI reference

Every command and flag.