Platform Overview
api-quick is a zero-dependency, polyglot API workbench engineered to combine the raw speed of terminal utilities (curl / httpie) with the visual depth of interactive workbenches (Postman / Insomnia).
api-quick web) provides live proxy execution, automatic JWT token capture, and workspace AST scanning.
System Architecture
| Layer | Technologies | Description |
|---|---|---|
| CLI Runtime | TypeScript / Node.js 20+ / Hono | Sub-10ms cold start engine with ANSI color formatting and POSIX exit codes. |
| AST Sniffer | Regex AST Scanner | Statically inspects source code across 8 backend frameworks without execution. |
| CORS Proxy | Hono Web Server | Local HTTP server on port 4000 bypassing CORS restrictions for browser testing. |
| E2E Workflows | WorkflowEngine | Sequential multi-step request chaining with JSONPath token interpolation. |
Installation Guide
You can install @skjuve/api-quick globally via NPM or execute commands instantly using NPX or Bun.
Global Installation via NPM (Recommended)
Installs the global api-quick binary on your PATH:
npm install -g @skjuve/api-quick
Instant Zero-Installation Execution via NPX
Run any subcommand without installing global packages:
npx @skjuve/api-quick web
Execution via Bun
bun install -g @skjuve/api-quick
Verification
Verify that the installation was successful by running:
api-quick --help
Command Matrix & CLI Reference
Comprehensive list of available subcommands and flags for api-quick:
| Command | Arguments | Description |
|---|---|---|
api-quick web |
[--port 4000] |
Launch Apple Liquid Glass Web UI Workbench & CORS Proxy |
api-quick tui |
None | Launch full interactive Terminal UI workbench |
api-quick sniff |
[dir] |
Scan local source code AST for API routes across 8 frameworks |
api-quick bench |
<url> -n 100 -c 10 |
Run high-throughput concurrent load benchmark |
api-quick mock |
[--port 8080] |
Launch zero-latency AST mock API server |
api-quick diff |
<url1> <url2> |
Visual structural JSON diffing engine |
CLI Request Examples
# Basic GET Request
api-quick GET https://api.github.com/repos/SKJUV/api-quick
# POST Request with form-encoded payload
api-quick POST https://api.stripe.com/v1/charges amount=2000 currency=usd
# POST Request with raw JSON payload
api-quick POST https://api.example.com/users name:="Alice" role:="ADMIN"
Polyglot AST Route Sniffer
The AST Sniffer inspects backend source code statically without executing code, extracting routes, pre-filling JSON bodies, and grouping routes by OpenAPI tags.
Supported Frameworks
- Express.js / Node.js: Scans
app.get(),router.post(), and Express sub-router mount prefixes (e.g.app.use('/api/v1/admin', adminRoutes)). - NestJS: Scans
@Get(),@Post(),@Controller('prefix'), and DTO body decorators. - Next.js: Scans App Router
route.tsexports (GET, POST) and Pages Router API routes. - FastAPI & Flask (Python): Scans
@app.get(),@router.post(). - Django REST Framework: Scans
urlpatternsand@api_view()decorators. - Go Gin & Fiber: Scans
r.GET(),router.POST(). - Spring Boot (Java/Kotlin): Scans
@GetMapping,@PostMapping,@RestController. - Laravel (PHP): Scans
Route::get(),Route::post()inroutes/api.php.
Execution Command
api-quick sniff ./src
E2E Workflow Chaining Engine
The E2E Workflow engine executes sequential multi-step request flows, automatically extracting JWT tokens and intermediate variables for seamless end-to-end testing.
Workflow Features
- JWT Token Auto-Capture: Automatically extracts token keys (
token,accessToken,access_token) from step responses. - Variable Interpolation: Pass dynamic variables like
{{authToken}}or{{userId}}between steps. - Execution Ordering: Automatically sorts steps by identity dependency (Auth $\rightarrow$ Profile $\rightarrow$ Workflows $\rightarrow$ Admin Ops).
Example Scenario Structure
Step 1: POST /api/v1/auth/sync -> Captures {{authToken}}
Step 2: GET /api/v1/auth/me -> Injects Header Authorization: Bearer {{authToken}}
Step 3: GET /api/v1/admin/dashboard -> Verifies Admin access
High-Throughput Load Benchmark Engine
The benchmark engine spawns worker pools to measure backend request throughput and percentile latencies under load.
Calculated Metrics
- Requests Per Second (Req/sec)
- Latency Percentiles: p50 (median), p95 (95th percentile), p99 (99th percentile)
- Latency Range: Min, Average, Max latency in milliseconds
- Success / Failure Count: HTTP status 2xx vs 4xx/5xx count
CLI Benchmark Execution
api-quick bench http://localhost:4000/api/v1/auth/me -n 500 -c 20
Zero-Latency Mock Server
The mock server engine creates a virtual Hono HTTP server on port 8080 responding dynamically to all sniffed AST routes with structured JSON data when backend servers are stopped.
CLI Execution
api-quick mock --port 8080
Mock Status Verification
curl http://localhost:8080/_mock/status
Structural JSON Diff Engine
Recursively compares JSON response structures between local, staging, and production API endpoints to highlight schema drift or missing keys.
CLI Execution
api-quick diff http://localhost:4000/api/v1/products https://staging.api.com/v1/products
Web GUI Workbench
The local Web UI launched via api-quick web features an Apple Liquid Glass translucent aesthetic, zero-CORS proxy server, and interactive controls.
Key Capabilities
- Theme Switcher: Toggle between Liquid Dark, Light, and OLED themes.
- Active Backend Port Auto-Probing: Automatically detects running backend servers (ports 3000, 4000, 5000, 8080).
- Security Level Filtering: Filter discovered AST routes by
🔒 Token Requiredvs🔓 Public. - Auth Guide Modal: Interactive modal explaining token response keys for Express, NestJS, FastAPI, Django, and Laravel.
Universal Polyglot Code Transpiler (--to)
Transpile any live CLI request directly into production code in 8 languages:
api-quick POST https://api.stripe.com/v1/charges amount=2000 --to python
Generated Python Code Output
import requests
url = "https://api.stripe.com/v1/charges"
payload = {"amount": "2000"}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.status_code)
print(response.json())
CI/CD Assertion DSL & GitHub Actions
Run zero-dependency automated API tests in CI/CD pipelines with POSIX exit code alignment.
Assertion Flags
--expect-status <code>: Assert HTTP status code (e.g. 200)--expect-max-time <ms>: Assert maximum latency (e.g. 150ms)--expect-json <path=val>: Assert JSONPath equality (e.g. $.status = OK)
GitHub Actions Pipeline Example
name: API Integration Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install -g @skjuve/api-quick
- run: api-quick GET https://api.example.com/health --expect-status 200 --expect-max-time 200ms
Troubleshooting & Diagnostic Guide
Common Scenarios & Solutions
1. HTTP 401 Unauthorized / Token Manquant
Cause: The endpoint requires Bearer authentication, but no token was supplied.
Solution: Execute POST /api/v1/auth/sync (or your login endpoint) in the Web UI to auto-capture the JWT token into the Bearer token bar.
2. HTTP 404 Route Not Found
Cause: The route path contains a module mount prefix or singular name (e.g. /api/v1/product/products instead of /products).
Solution: Use the left sidebar catalog in api-quick web or run api-quick sniff to see exact AST route paths.
3. Port Conflict
Cause: Port 4000 is already in use by your backend server.
Solution: api-quick web automatically detects port conflicts and switches to an available port (e.g. port 4001).