Skip to main content

CLI Reference

The doculayer command-line tool gives you direct access to all features from your terminal.

Global Options

doculayer [OPTIONS] COMMAND [ARGS]...
FlagDescription
--versionShow version and exit
--helpShow help

doculayer setup

Configure DocuLayer for your IDE. Auto-detects the running IDE by default.

doculayer setup [OPTIONS]
OptionDescription
--ide <name>Target a specific IDE: cursor, windsurf, vscode, zed, claudecode
--all-idesWrite config for every supported IDE

Examples

# Auto-detect
doculayer setup

# Target Cursor specifically
doculayer setup --ide cursor

# All IDEs at once
doculayer setup --all-ides

Search live documentation for a query.

doculayer search QUERY --source SOURCE [--results N]
Argument / OptionDescription
QUERYSearch terms
--source / -sPackage name or URL (required)
--results / -nMax results (default: 3)

Examples

doculayer search "dependency injection" --source fastapi
doculayer search "AsyncClient" -s httpx -n 5
doculayer search "streaming" -s "https://docs.anthropic.com"

doculayer fetch

Fetch a documentation page or section.

doculayer fetch IDENTIFIER [--section HEADING]
Argument / OptionDescription
IDENTIFIERPackage name, pypi:pkg, npm:pkg, gh:owner/repo, or direct URL
--section / -SExtract a specific heading section

Examples

doculayer fetch fastapi
doculayer fetch httpx --section "AsyncClient"
doculayer fetch pypi:pydantic -S "Field"
doculayer fetch https://docs.anthropic.com

doculayer resolve

Print the resolved documentation URL for an identifier (useful for debugging).

doculayer resolve IDENTIFIER

Examples

$ doculayer resolve fastapi
https://fastapi.tiangolo.com

$ doculayer resolve pypi:httpx
https://www.python-httpx.org

$ doculayer resolve npm:react
https://react.dev

doculayer sources

List all packages with built-in llms.txt support.

doculayer sources

Output:

Packages with llms.txt support (15):
anthropic astro fastapi httpx langchain nextjs openai
pydantic react shadcn supabase svelte tailwindcss vite vue

Identifier formats: bare-name · pypi: · npm: · gh: · https://

doculayer mcp

Start the DocuLayer MCP server over stdio. Normally called by your IDE via the MCP config — not run manually.

doculayer mcp

Environment Variables

All runtime settings are environment variables — no config files:

VariableDefaultDescription
DOCULAYER_CACHE_TTL3600Cache entry lifetime in seconds
DOCULAYER_MAX_CACHE256Max cached pages (oldest evicted on overflow)
DOCULAYER_FETCH_TIMEOUT12.0HTTP timeout per request
DOCULAYER_MAX_BYTES524288Max page size (512 KB)
DOCULAYER_MAX_WORDS400Max words per returned section

Set them in your shell before running any command:

DOCULAYER_CACHE_TTL=7200 doculayer search "validators" --source pydantic