api-nest-cli
v1.0.9
Published
CLI agent for API Nest — intercepts HTTP calls in your dev project and streams them to the dashboard
Downloads
917
Maintainers
Readme
api-nest-cli
Official CLI for API Nest — intercept and stream HTTP calls from your dev app to your live monitoring dashboard.
Install
npx api-nest-cli@latest init --token <your-sdk-token>Or install globally:
npm install -g api-nest-cliUsage
api-nest init
Initialize API Nest monitoring in your project. Run this inside your project's root directory:
api-nest init --token sdk_xxxxxxxxxxxxxxxxxxxxOptions
| Option | Required | Description |
|---|---|---|
| --token <token> | ✅ Yes | Your SDK token (found in Dashboard → Get Command) |
| --project <projectId> | No | Project ID to associate calls with |
| --backend <url> | No | Custom backend URL (default: http://localhost:4000) |
What it does
Running api-nest init will:
- Save your config to
.api-nest.jsonin the current directory - Inject a
require('api-nest-cli/register')line at the top of your app's entry point - Activate HTTP interceptors (both
axiosand nativefetch) automatically
From then on, every HTTP call your dev app makes is captured and streamed in real-time to your API Nest dashboard.
How it works
Your Dev App ──(axios/fetch)──► api-nest-cli interceptor ──(WebSocket)──► API Nest DashboardThe interceptor patches both axios and the global fetch function to capture:
- Method, URL, host, path
- Status code & latency
- Timestamp
All captured calls appear instantly in the Live Feed and History tabs of your dashboard.
Requirements
- Node.js >= 18
- An API Nest account with a backend running (self-hosted or cloud)
Get your SDK token
- Log in at your API Nest dashboard
- Click Get Command on the home screen
- Copy the
--tokenvalue from the displayed command
License
MIT
