Identifier Formats
DocuLayer accepts five identifier formats for specifying documentation sources.
Formats
| Format | Example | Resolved via |
|---|---|---|
| Bare name | fastapi | Shortcut table → PyPI → npm |
pypi: prefix | pypi:httpx | PyPI JSON API |
npm: prefix | npm:react | npm registry |
gh: prefix | gh:owner/repo | GitHub URL |
| Direct URL | https://docs.example.com | Passthrough |
Bare Names
When you pass a bare name like fastapi, DocuLayer resolves it in order:
- Shortcut table — 15 popular packages have hardcoded doc URLs for speed (see
doculayer sources) - PyPI JSON API — fetches
https://pypi.org/pypi/{name}/jsonand reads theproject_urls.Documentationfield - 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