-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Logan McDuffie edited this page Dec 23, 2025
·
1 revision
The api-docs CLI uses sensible defaults and requires no configuration for basic usage. This page covers cache settings and advanced options.
API specifications are cached locally for fast repeated access:
~/.cache/api-docs-cli/specs/
On Windows:
%USERPROFILE%\.cache\api-docs-cli\specs\
~/.cache/api-docs-cli/
specs/
manifest.json # Index of all cached specs
<hash>.json # Individual spec files (SHA256 hash of URL)
| Cache Type | TTL | Description |
|---|---|---|
| API Specifications | 24 hours | Cached OpenAPI/Swagger specs |
| Provider Lookups | 7 days | APITracker.io provider-to-URL mappings |
| Indefinite | No expiry | Specs cached with ttl: null
|
# Bypass spec cache for a single fetch
api-docs fetch https://api.example.com/openapi.json --no-cache
# Force refresh for endpoints command
api-docs endpoints stripe --force
# Force refresh APITracker lookup
api-docs fetch stripe --forceThe CLI uses Puppeteer for extracting documentation from JavaScript-rendered pages (Swagger UI, Redoc).
By default, Puppeteer downloads its own Chromium binary. To use a system-installed browser:
# Set Chrome/Chromium path
export PUPPETEER_EXECUTABLE_PATH=/path/to/chromeCommon paths:
-
macOS:
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome -
Linux:
/usr/bin/google-chromeor/usr/bin/chromium-browser -
Windows:
C:\Program Files\Google\Chrome\Application\chrome.exe
Default timeouts for extraction operations:
| Operation | Timeout |
|---|---|
| Direct OpenAPI fetch | 15 seconds |
| DOM scraping | 30 seconds |
| Swagger UI extraction | 30 seconds |
| Page navigation | 30 seconds |
| Variable | Description |
|---|---|
PUPPETEER_EXECUTABLE_PATH |
Path to Chrome/Chromium binary |
NO_COLOR |
Disable colored output (set to any value) |
The package is published as @tidalstudios/api-docs-cli. No additional npm configuration is required.
npm install -g @tidalstudios/api-docs-clinpx @tidalstudios/api-docs-cli endpoints stripe