Commands
Commands Overview
Reference for all chowbea-axios CLI commands.
chowbea-axios provides seven commands for managing your API client generation workflow.
Command Summary
| Command | Purpose | When to Use |
|---|---|---|
init | Full project setup | First time setup, adding to new project |
fetch | Fetch spec + generate | When API changes, CI/CD pipelines |
generate | Generate from cache | Quick regeneration, local spec files |
watch | Continuous polling | During development |
status | Show current state | Debugging, verification |
validate | Check spec quality | Before deployment, debugging issues |
diff | Preview changes | Before updating, reviewing API changes |
Typical Workflow
Initial Setup
# Run once to set up your project
chowbea-axios initDuring Development
# Start watch mode alongside your dev server
chowbea-axios watch
# Or manually fetch when needed
chowbea-axios fetchBefore Deployment
# Validate spec quality
chowbea-axios validate --strict
# Preview what would change
chowbea-axios diff
# Generate fresh types
chowbea-axios fetch --forceCommon Flags
These flags are available on most commands:
| Flag | Short | Description |
|---|---|---|
--config | -c | Path to custom config file |
--quiet | -q | Suppress non-error output |
--verbose | -v | Show detailed output |
NPM Scripts
After running init, these scripts are added to your package.json:
{
"scripts": {
"api:fetch": "chowbea-axios fetch",
"api:generate": "chowbea-axios generate",
"api:watch": "chowbea-axios watch",
"api:status": "chowbea-axios status",
"api:validate": "chowbea-axios validate",
"api:diff": "chowbea-axios diff"
}
}Use them with your package manager:
npm run api:fetch
pnpm api:watch
yarn api:status