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.
Named tunnels keep their ID across process restarts. Tunnels without --name
are revoked when their process exits.
Read and write tunnel state in this directory instead of
~/.momentic/mo-tunnels. Use the same directory for every tunnel command and
supervisor. To share it between accounts on one machine, grant those accounts
read and write access; Linux accounts need a shared group. The directory
contains private credentials.tunnel start
Start a tunnel to one or more addresses.
One or more
hostname:port addresses reachable from this machine. Required
for a new tunnel. When resuming with --name, omit them to reconnect the
saved tunnel.Create or resume a named tunnel.
qa tunnel stop <tunnel-id> stops its process
and keeps its saved identity. Add --delete to revoke the tunnel and delete
that identity.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.--api-key, set MOMENTIC_API_KEY to that same key before running
the suggested commands. The summary never prints your API key.
Use --json for structured output:
Ctrl+C.
Resume a named tunnel on the same machine without addresses or an API key:
tunnel update
Replace a tunnel’s destinations without restarting its host:
--server as the tunnel.
Sessions created with live tunnel access get the new routes; older sessions keep
their original destinations. Changes take effect asynchronously; open
connections may continue. If routing changes fail to apply, the CLI asks you to
retry the same update.
tunnel stop
Stop the local host. Named tunnels keep their registration and saved identity so
they can resume with the same name; no API key is needed to stop them.
qa tunnel start --name quiet-river-jump to resume a named tunnel. To
revoke its registration and remove its saved identity, pass --delete with an
API key:
{ "tunnelId": "..." } on success.
tunnel list
List tunnels started from this machine.
status is starting, running, offline (a named tunnel saved on this
machine but not running; resume it with qa tunnel start --name), 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). mode is detached or foreground. Offline entries have no mode,
pid or startedAt. An entry has an error string when the tunnel recorded a
failure.
Example: test a local dev server
Keep the tunnel open while Mo and its sub-agents work. Export the report before closing it: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
qa tunnel listshows tunnels saved in the selected state directory.- Multiple tunnels can run on the same machine and use the same state directory. Each tunnel ID has one running process and can serve several addresses.
- A background tunnel outlives your shell. It stays open until you run
qa tunnel stop.