CLI
The Von CLI provides local development tools, including secure tunnels for receiving webhooks on your local machine.
Installation
npm install -g @usevon/cli
Quick Start
# Login to Von
von login
# Start a tunnel to localhost:3000
von dev -p 3000
Commands
von login
Authenticate with Von using device authorization flow.
von login
Options:
| Option | Description |
|---|---|
--local | Use local development server |
--api-url <url> | Custom API URL |
--tunnel-url <url> | Custom tunnel URL |
--force | Force re-authentication |
The login flow:
- Opens browser with authorization code
- You approve in the browser
- CLI receives authentication token
von logout
Clear stored credentials.
von logout
von status
Show current authentication and organization status.
von status
Output:
Logged in as: user@example.com
Organization: My Company
Environment: development
von switch
Switch to a different organization.
von switch
Displays a list of your organizations to choose from.
von dev
Start development tunnels to forward webhooks to your local machine.
von dev -p 3000
Options:
| Option | Description |
|---|---|
-p, --port <ports...> | Port(s) to tunnel (up to 3) |
-v, --verbose | Show request headers and body |
Examples:
# Single port
von dev -p 3000
# Multiple ports
von dev -p 3000 -p 4000 -p 5000
# Verbose mode
von dev -p 3000 -v
Output:
✓ Connected to Von
Tunnel URLs:
→ https://abc123.tunnel.usevon.com → localhost:3000
Waiting for webhooks...
Use the tunnel URL in Von's endpoint configuration or in third-party webhook settings.
von rotate
Rotate your tunnel secret. Use this if your tunnel URL is compromised.
von rotate
Options:
| Option | Description |
|---|---|
-p <port> | Rotate secret for specific port |
After rotation, your old tunnel URLs will stop working.
Configuration
The CLI stores configuration in ~/.von/config.json:
{
"apiUrl": "https://api.usevon.com",
"tunnelUrl": "wss://tunnel.usevon.com",
"token": "...",
"organizationId": "org_123"
}
You can also use environment variables:
| Variable | Description |
|---|---|
VON_API_KEY | API key for authentication |
VON_BASE_URL | Custom API URL |
Development Workflow
Testing Outbound Webhooks
- Start your local server
- Start a tunnel:
von dev -p 3000 - Create an endpoint with the tunnel URL
- Trigger events in your app
- See webhooks arrive locally
# Terminal 1: Your app
npm run dev # Running on port 3000
# Terminal 2: Von tunnel
von dev -p 3000 -v
Testing Inbound Webhooks
- Start your local server
- Start a tunnel:
von dev -p 3000 - Create an inbound endpoint with your tunnel as the forward URL
- Configure the third-party service with Von's inbound URL
- Trigger the third-party webhook
Tunnel Features
Auto-Reconnect
If the connection drops, the CLI automatically reconnects with exponential backoff.
Real-Time Forwarding
Webhooks are forwarded in real-time via WebSocket connection.
Request Inspection
Use -v flag to see full request details:
von dev -p 3000 -v
→ POST localhost:3000/webhooks
Headers:
content-type: application/json
x-von-signature: abc123...
Body:
{"eventType":"order.created","payload":{...}}
← 200 OK (45ms)
Multiple Tunnels
Run up to 3 simultaneous tunnels:
von dev -p 3000 -p 4000 -p 5000
Each port gets its own tunnel URL.
Troubleshooting
"Not authenticated"
Run von login to authenticate.
"Connection refused"
Make sure your local server is running on the specified port.
"Tunnel URL not working"
Your secret may be rotated. Run von dev again to get a new URL.
"Multiple orgs, which one?"
Run von switch to select the organization you want to use.