CLI Reference
The doculayer command-line tool gives you direct access to all features from your terminal.
Global Options
doculayer [OPTIONS] COMMAND [ARGS]...
| Flag | Description |
|---|---|
--version | Show version and exit |
--help | Show help |
doculayer setup
Configure DocuLayer for your IDE. Auto-detects the running IDE by default.
doculayer setup [OPTIONS]
| Option | Description |
|---|---|
--ide <name> | Target a specific IDE: cursor, windsurf, vscode, zed, claudecode |
--all-ides | Write 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
doculayer search
Search live documentation for a query.
doculayer search QUERY --source SOURCE [--results N]
| Argument / Option | Description |
|---|---|
QUERY | Search terms |
--source / -s | Package name or URL (required) |
--results / -n | Max 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 / Option | Description |
|---|---|
IDENTIFIER | Package name, pypi:pkg, npm:pkg, gh:owner/repo, or direct URL |
--section / -S | Extract 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:
| Variable | Default | Description |
|---|---|---|
DOCULAYER_CACHE_TTL | 3600 | Cache entry lifetime in seconds |
DOCULAYER_MAX_CACHE | 256 | Max cached pages (oldest evicted on overflow) |
DOCULAYER_FETCH_TIMEOUT | 12.0 | HTTP timeout per request |
DOCULAYER_MAX_BYTES | 524288 | Max page size (512 KB) |
DOCULAYER_MAX_WORDS | 400 | Max words per returned section |
Set them in your shell before running any command:
DOCULAYER_CACHE_TTL=7200 doculayer search "validators" --source pydantic