node-proxylens
v1.3.4
Published
CLI for ProxyLens AI Traffic Inspector
Downloads
394
Maintainers
Readme
ProxyLens CLI
ProxyLens is an AI-powered traffic inspector for your local development environment. This package provides the CLI and Node.js SDK to connect your local applications to the ProxyLens dashboard.
Features
- Traffic Inspection: View and analyze HTTP/HTTPS requests in real-time.
- Tunneling: Expose your local server to the internet with a secure tunnel.
- Request Replay: Replay requests to test your backend.
- AI Analysis: Get AI-driven insights into your API traffic (via dashboard).
Installation
npm install -g node-proxylensCLI Usage
Start Proxying
To start proxying traffic to your local server:
# Proxy to a local port (e.g., 3000)
proxylens 3000
# Proxy to a specific URL
proxylens http://localhost:8080Running this command will start a proxy server (default port 8000) and open the web dashboard.
Public Tunneling
To expose your local server to the internet using a public subdomain:
# Expose port 3000 with a random or shared subdomain
proxylens 3000 -d my-appNote: You may need to login to use custom subdomains.
ProxyLens Dashboard
Visit proxylens.dev to:
- Get your authentication token for the CLI.
- Manage your domains and tunnels.
- View and analyze your traffic history.
- Collaborate with your team.
View Live Traffic: Go to proxylens.dev/interceptor to see all your traffic in real-time.
Authentication
Manage your ProxyLens account directly from the CLI.
# Login with your authentication token
proxylens login <your-token>
# Check which account you are logged in as
proxylens whoami
# Logout from the CLI
proxylens logoutOptions
| Flag | Description |
|------|-------------|
| target | The target URL or port to proxy to (e.g., 3000 or http://localhost:3000). |
| [port] | Optional. The port for ProxyLens to listen on (default: 8000). usage: proxylens <target> <port> |
| -d <subdomain> | Request a specific subdomain for the public tunnel. |
| -u <url> | Specify a custom server URL (for self-hosted ProxyLens instances, Enterprise option). |
| --domain <domain> | Specify a custom root domain (advanced usage). |
Node.js SDK (COMING SOON)
You can also use ProxyLens programmatically in your Node.js applications.
const { ProxyLens } = require('node-proxylens');
const http = require('http');
const uiServer = http.createServer();
const lens = new ProxyLens(uiServer, {
proxyTarget: 'http://localhost:3000'
});
// Start the UI server
uiServer.listen(8000, () => {
console.log('ProxyLens dashboard running at http://localhost:8000');
});License
Copyright (c) 2025 ProxyLens. All rights reserved.
