qa tunnel - Momentic
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Mo runs on its own machine, so it cannot see localhost:3000 or an internal staging host. A tunnel exposes one or more hostname:port addresses from your machine to Mo through a Momentic Connector. Start the tunnel, pass its ID to qa start --tunnel, and stop it when the session is done.
qa tunnel start <address...> [--foreground]
qa tunnel stop <tunnel-id>
qa tunnel list
tunnel start
Start a tunnel to one or more addresses.
qa tunnel start localhost:3000
qa tunnel start localhost:3000 api.internal:8080
<address...>
string
required
One or more hostname:port addresses reachable from this machine.
--foreground
boolean
Keep the tunnel attached to the terminal and run until you press Ctrl+C. By default the tunnel detaches and keeps running in the background.
When the tunnel is ready, the command prints its ID as JSON:
{ "tunnelId": "tunnel-6f1c2a4e-..." }
In background mode the command returns immediately after printing. In foreground mode it prints the ID and then blocks; stopping the process also revokes the tunnel.
tunnel stop
Stop a tunnel and revoke Mo’s access to it.
qa tunnel stop tunnel-6f1c2a4e-...
The command asks the local tunnel process to shut down, then revokes the Connector tunnel on the server. If the local process is already gone, the command still revokes the tunnel and prints a warning. On success it prints { "tunnelId": "..." }.
tunnel list
List tunnels started from this machine.
qa tunnel list
{
"tunnels": [
{
"tunnelId": "tunnel-6f1c2a4e-...",
"addresses": ["localhost:3000"],
"mode": "detached",
"pid": 48213,
"startedAt": "2026-09-02T04:01:12.000Z",
"status": "running"
}
]
}
status is starting, running, unreachable (the state file exists but the process does not respond), or cleanup_failed (the process exited without revoking the tunnel; run qa tunnel stop to finish cleanup).
Example: test a local dev server
Keep the tunnel open while Mo and its sub-agents work. Export the report before closing it:
tunnel_id=$(qa tunnel start localhost:3000 | jq -r .tunnelId)
session=$(qa start "Test the signup flow on http://localhost:3000" --tunnel "$tunnel_id")
session_id=$(jq -r .sessionId <<<"$session")
if qa wait "$session_id" --json; then
qa report "$session_id" --require-idle --output mo-report &&
qa tunnel stop "$tunnel_id"
fi
If qa wait exits 2, answer Mo with qa send and wait again. If it fails or the session is stopped, decide whether to resume the session before closing the tunnel with qa tunnel stop.
Notes
- Tunnel state lives in
~/.momentic/mo-tunnels.qa tunnel listonly shows tunnels started from this machine. - One tunnel can serve several addresses; start it with every host Mo needs before you create the session.
- A background tunnel outlives your shell. It stays open until you run
qa tunnel stop.