api-router
v2.0.1Gorilla: Training and Evaluating LLMs for Function Calls (Tool Calls) api-router, python, api, api-documentation, chatgpt, claude-api.
Installation
API Router
API Router v2.0.0 — a developer workflow automation tool for initializing projects, running checks, building, testing, deploying, generating templates, and managing documentation from the command line.
Commands
| Command | Description |
|---|---|
api-router init |
Initialize a new project in the current directory |
api-router check |
Run lint, type check, and test checks |
api-router build |
Build the project |
api-router test |
Run the test suite |
api-router deploy |
Show the deploy pipeline guide (build → test → stage → prod) |
api-router config |
Show configuration file path |
api-router status |
Check project health and status |
api-router template <name> |
Generate a code template for the given name |
api-router docs |
Generate project documentation |
api-router clean |
Clean build artifacts |
api-router help |
Show usage info and all available commands |
api-router version |
Show version (v2.0.0) |
How It Works
API Router provides a unified CLI for common developer workflow tasks. Each command performs its action and logs the activity with a timestamp to history.log for full traceability.
init— scaffolds a new project in the current working directorycheck— runs lint + type check + tests in sequencebuild— triggers the build processtest— executes the test suitedeploy— outputs the recommended deployment pipeline (build → test → stage → prod)template— generates boilerplate code for a given componentdocs— auto-generates documentationclean— removes build artifactsconfig— points to the configuration file locationstatus— reports on overall project health
Data Storage
- Location:
~/.local/share/api-router/(override withAPI_ROUTER_DIRorXDG_DATA_HOME) - History:
history.log— audit trail of all commands executed with timestamps - Config:
config.json(referenced by the config command) - Data log:
data.log— general-purpose data store
Requirements
- Bash (4.0+)
- Standard Unix utilities (
date,echo) - No external dependencies or API keys required
When to Use
- Starting a new project — run
api-router initto scaffold the project structure, thenapi-router configto review settings - Pre-commit validation — use
api-router checkto run lint, type checks, and tests before committing code - Building and deploying — execute
api-router buildfollowed byapi-router deployto see the full deployment pipeline - Generating boilerplate —
api-router template controllerto quickly create code templates for common patterns - Project maintenance — run
api-router cleanto remove stale artifacts, thenapi-router statusto verify project health
Examples
# Initialize a new project
api-router init
# Run all checks (lint + type check + tests)
api-router check
# Build the project
api-router build
# Run tests
api-router test
# Show the deployment pipeline
api-router deploy
# Generate a code template
api-router template auth-middleware
# Generate documentation
api-router docs
# Check project health
api-router status
# Clean build artifacts
api-router clean
# View configuration
api-router config
# Show all available commands
api-router help
Output
Results go to stdout. Redirect output with api-router build > build.log. All commands are logged to history.log for auditability.
Configuration
Set API_ROUTER_DIR environment variable to change the data directory. Alternatively, set XDG_DATA_HOME (data will go to $XDG_DATA_HOME/api-router/). Default: ~/.local/share/api-router/
Powered by BytesAgain | bytesagain.com | [email protected]