apiblaze
v0.3.6
Published
Dev tunnel CLI for APIblaze — route localhost projects through your APIblaze endpoints
Maintainers
Readme
apiblaze
CLI for APIblaze — instantly tunnel localhost to your APIblaze projects during development.
Installation
npm install -g apiblazeOr run without installing:
npx apiblaze --helpRequirements
- Node.js 18+
Quick start
# Create a proxy (no account needed)
npx apiblaze create --target https://api.example.com
# Optional: sign in if you want it under your team
npx apiblaze login
# Create a proxy under your team
npx apiblaze create --name myapi --target https://api.example.com --auth api_key
# Start a dev tunnel (defaults to port 3000)
npx apiblaze dev
# Or specify a port
npx apiblaze dev 3000
# Stream full request/response traffic to a file (JSON lines)
npx apiblaze dev 3000 --capture-file traffic.jsonl
Help
apiblaze --help
apiblaze help create
apiblaze help devCommands
| Command | Description |
|---|---|
| apiblaze login | Authenticate with your APIblaze account |
| apiblaze create [options] | Create a new API proxy (anonymous if not logged in) |
| apiblaze claim [code] | Claim an anonymously-created proxy into your team |
| apiblaze projects | List your team projects |
| apiblaze dev [port] | Start a dev tunnel for your localhost projects |
| apiblaze team [team] | Switch the active team |
| apiblaze whoami | Show the signed-in identity and active team |
| apiblaze logout | Sign out and remove stored credentials |
How it works
apiblaze dev automatically:
- Fetches your APIblaze projects that target
localhost(or other internal targets) - Registers a temporary dev tunnel with APIblaze
- Opens a secure connection and forwards incoming requests to your local server
- Streams live traffic logs to your terminal in real time
On Ctrl+C the tunnel is cleanly deregistered.
Zero-setup conveniences
- No project yet? If none of your projects point at this machine,
apiblaze devoffers to spin up a throwaway dev proxy (random name likebraveotter42) pointed athttp://localhost:<port>and tunnels it immediately — picknoneorapi_keyauth. - Server not running yet? If nothing is listening on the local port, requests aren't
dropped: each one is printed in full (headers + body, with API keys/JWTs masked and JWTs
decoded) and answered with a friendly synthetic
200. The moment your dev server comes up, the next request forwards to it automatically. Add--capture-file <path>to also stream every request/response to a JSON-lines file.
License
MIT
