Prerequisites:
- Node.js 18 or later
- A Decipher account
- A local dev server running on a known port (e.g.,
localhost:3000)
Step 1: Install the CLI
Install the tunnel CLI globally using your preferred package manager:Step 2: Authenticate
Start the login flow
Run the login command in your terminal:Your browser will open to the Decipher dashboard.
Copy your token
The dashboard displays a one-time authentication token. Click the copy button to copy it to your clipboard.
Step 3: Start a Tunnel
Start your local dev server
Make sure your app is running locally. For example:Confirm it’s accessible at
http://localhost:3000 (or whichever port you use).Open the tunnel
In a separate terminal window, run:Replace Incoming requests are logged in real-time so you can see test traffic as it arrives.
3000 with your local server’s port. The CLI will start the tunnel and display your public URL:Step 4: Use the Tunnel URL in Decipher
Once your tunnel is running, use the public URL as the Base URL when recording or running tests in the Decipher dashboard. Any test pointed at that URL will hit your local server through the tunnel.CLI Reference
| Command | Description |
|---|---|
decipher-tunnel login | Authenticate with Decipher |
decipher-tunnel logout | Revoke stored credentials |
decipher-tunnel forward -p <port> | Start a tunnel to the given local port |
decipher-tunnel me | Show the currently authenticated user |
decipher-tunnel list | Show the active tunnel |
decipher-tunnel kill | Stop the active tunnel |
Troubleshooting
Tunnel already running / port already in use
Tunnel already running / port already in use
Only one tunnel can be active at a time. Stop the existing tunnel first:Then start a new one with
decipher-tunnel forward -p <port>.'Not logged in' error
'Not logged in' error
Your session may have expired. Log in again:If the issue persists, log out first and then log back in:
502 errors in the tunnel logs
502 errors in the tunnel logs
This usually means your local dev server isn’t running. Make sure your app is started and accessible at the port you forwarded before sending traffic through the tunnel.
Need help? Contact our support team.