Skip to content

Command line ​

Use the CLI when you already have a provisioned headless installation. It runs the same browser workspace and local service used by desktop.

sh
klars serve --help
klars serve --port 4317

The machine needs Node.js 22.13+ and Python 3.9+ for service-side Python detection. Capturing a model also requires its ML libraries in the selected environment. There is no public archive install command advertised by this site yet.

Options ​

OptionDefaultMeaning
--port NUMBER4317Listen port, from 1 to 65535. KLARS_PORT can supply the default.
--host ADDRESS127.0.0.1Bind address. Any other literal value requires all remote TLS options.
--data-dir PATH~/.klars/appPrivate store and discovery directory.
--public-origin URLunsetExact HTTPS origin for direct remote access, with no path or trailing slash.
--tls-cert FILEunsetCertificate file for direct remote HTTPS.
--tls-key FILEunsetPrivate key file for direct remote HTTPS.
--help, -h—Print usage; use alone after serve.

Pass each option followed by its value. Duplicate and unknown options are rejected.

Python selection ​

The CLI checks these in order:

  1. KLARS_PYTHON.
  2. The active virtual environment’s bin/python.
  3. .venv/bin/python under the klars installation root.
  4. python3 on the service’s PATH.

The initial check verifies that the interpreter runs and is new enough. It does not import PyTorch or your model libraries. An explicitly configured but unavailable interpreter fails rather than silently selecting a different one.

Browser handoff ​

The service prints a one-time owner URL to its controlling terminal. Do not pipe that URL to a log or share it. Start another serve session to obtain a new handoff if it expires or has already been used.

Press Ctrl C to stop. Only one service can own a data directory at a time. If startup reports an existing lock, verify that its recorded process has exited before removing a stale lock.

See remote browser access for a complete SSH-forwarding example.

Your models. Your machine. Your next idea.