Skip to main content

kagura open

Open the Kagura UI in your default browser. If a server is already listening on the target port, the browser just opens; if nothing is listening, open spawns a detached kagura run first, waits for the port to come up, then opens the browser.

kagura open
# spawns `kagura run` if needed, waits up to 10s, then opens http://localhost:5253/

Use this when you want one command that "just shows me Kagura" without caring whether the server is already running.

Options

FlagDefaultNotes
--port <n> / -p <n>5253Port the server is on (or will be spawned on).

How it works

  1. Probe localhost:<port> with a 250 ms TCP connect. If something is already listening, skip to step 3.
  2. Otherwise, spawn kagura run --port <port> as a detached child process. The spawned server is the same kagura binary on your $PATH — so kagura open only works while the global tool is installed.
  3. Poll the port every 200 ms for up to 10 seconds. If it never comes up, exit with server did not become ready on :<port> within 10s.
  4. Open the URL using open (macOS), xdg-open (Linux), or cmd /c start (Windows).

Exit codes

CodeMeaning
0Browser launched successfully.
1Could not spawn kagura run (binary missing from PATH), the server never bound to the port, or the browser launcher failed.

See also

  • kagura run — the underlying server command that open spawns for you.