Skip to main content
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.

tunnel start

Start a tunnel to one or more addresses.
string
required
One or more hostname:port addresses reachable from this machine.
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:
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.
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.
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:
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 list only 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.