-
Notifications
You must be signed in to change notification settings - Fork 0
Command Reference
Logan McDuffie edited this page Dec 23, 2025
·
1 revision
Complete documentation for all api-docs CLI commands.
api-docs <command> [options]Use --help with any command for detailed usage information.
List all API endpoints in a scannable, color-coded format.
api-docs endpoints <query> [options]| Argument | Description |
|---|---|
query |
Provider name (e.g., "stripe", "n8n") or URL to API docs |
| Option | Short | Description | Default |
|---|---|---|---|
--force |
-f |
Force fresh fetch (bypass cache) | false |
--verbose |
-v |
Show full descriptions instead of summaries | false |
--grouped |
-g |
Group endpoints by category/tag | true |
# List endpoints by provider name
api-docs endpoints stripe
# List endpoints from a URL
api-docs endpoints https://api.example.com/docs
# Show full descriptions
api-docs endpoints stripe --verbose
# Force refresh, ungrouped
api-docs endpoints stripe --force --no-groupedGet detailed information for a specific API endpoint.
api-docs endpoint <url> <path> [options]| Argument | Description |
|---|---|
url |
URL of the cached API spec |
path |
Endpoint path (e.g., /users/{id}) |
| Option | Short | Description |
|---|---|---|
--method |
-m |
HTTP method to show (e.g., GET, POST) |
# Show all methods for an endpoint
api-docs endpoint https://api.stripe.com/openapi /v1/customers
# Show only GET method
api-docs endpoint https://api.stripe.com/openapi /v1/customers --method GETDisplays:
- HTTP method and path
- Summary and description
- Parameters (with required indicators)
- Request body information
- Response codes and descriptions
Fetch and cache an API specification.
api-docs fetch <query> [options]| Argument | Description |
|---|---|
query |
Provider name or URL to API docs |
| Option | Short | Description | Default |
|---|---|---|---|
--force |
-f |
Force refresh (bypass APITracker cache) | false |
--no-cache |
Bypass spec cache (fetch fresh) | false |
# Fetch by provider name
api-docs fetch stripe
# Fetch by URL
api-docs fetch https://api.example.com/openapi.json
# Force refresh from source
api-docs fetch stripe --force
# Fetch without caching
api-docs fetch https://api.example.com/openapi.json --no-cacheShow all cached API specifications.
api-docs listDisplays for each cached spec:
- API title
- Source URL
- Cache timestamp
- Expiration status
api-docs listOutput:
Cached API Specs (2):
Stripe API
URL: https://api.stripe.com/openapi
Cached: 2024-01-15T10:30:00Z
n8n API (expired)
URL: https://docs.n8n.io/api
Cached: 2024-01-10T08:00:00Z
Clear cached API specifications.
api-docs clear [url]| Argument | Description |
|---|---|
url |
(Optional) URL of spec to clear. Omit to clear all. |
# Clear all cached specs
api-docs clear
# Clear specific cached spec
api-docs clear https://api.stripe.com/openapiThe CLI uses multiple extraction methods in order:
-
Direct OpenAPI fetch - For URLs ending in
.json,.yaml, or containingopenapi/swagger - DOM scraping - Extracts from Scalar, Redoc, and generic documentation pages
- Swagger UI extraction - Uses Puppeteer to extract from JavaScript-rendered Swagger UI pages
- APITracker discovery - For provider names, looks up documentation URLs via APITracker.io
Each method falls back to the next if extraction fails.