Skip to main content

Identifier Formats

DocuLayer accepts five identifier formats for specifying documentation sources.

Formats

FormatExampleResolved via
Bare namefastapiShortcut table → PyPI → npm
pypi: prefixpypi:httpxPyPI JSON API
npm: prefixnpm:reactnpm registry
gh: prefixgh:owner/repoGitHub URL
Direct URLhttps://docs.example.comPassthrough

Bare Names

When you pass a bare name like fastapi, DocuLayer resolves it in order:

  1. Shortcut table — 15 popular packages have hardcoded doc URLs for speed (see doculayer sources)
  2. PyPI JSON API — fetches https://pypi.org/pypi/{name}/json and reads the project_urls.Documentation field
  3. npm registry — falls back to https://registry.npmjs.org/{name} if PyPI returns nothing useful

pypi: Prefix

Forces resolution via PyPI, skipping the shortcut table:

doculayer fetch pypi:httpx
doculayer search "timeouts" --source pypi:httpx

npm: Prefix

Forces resolution via npm:

doculayer fetch npm:react
doculayer search "hooks" --source npm:react

gh: Prefix

Resolves to the GitHub Pages or docs/ folder of the given repo:

doculayer fetch gh:pydantic/pydantic
doculayer search "validators" --source gh:tiangolo/fastapi

Direct URLs

Pass any URL directly — DocuLayer will probe for llms.txt at that origin automatically:

doculayer fetch https://docs.anthropic.com
doculayer search "tool use" --source "https://docs.anthropic.com"

This is the most powerful format: use it for internal docs, custom deployments, or any site not in the shortcut table.

Packages with llms.txt (Fastest Access)

These packages publish an llms.txt index that DocuLayer uses to fetch only the 1–3 pages most relevant to your query, instead of crawling the whole docs site:

anthropic · astro · fastapi · httpx · langchain · nextjs · openai · pydantic · react · shadcn · supabase · svelte · tailwindcss · vite · vue

Any package without llms.txt falls back to HTML parsing of the root docs page. Passing a direct URL also works — DocuLayer probes for llms.txt automatically.