Appearance
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 4317The 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
| Option | Default | Meaning |
|---|---|---|
--port NUMBER | 4317 | Listen port, from 1 to 65535. KLARS_PORT can supply the default. |
--host ADDRESS | 127.0.0.1 | Bind address. Any other literal value requires all remote TLS options. |
--data-dir PATH | KLARS_DATA_DIR, otherwise ~/.klars/app on a fresh install | Private store and discovery directory. |
--public-origin URL | unset | Exact HTTPS origin for direct remote access, with no path or trailing slash. |
--tls-cert FILE | unset | Certificate file for direct remote HTTPS. |
--tls-key FILE | unset | Private 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. The earlier TENSORVIZ_DATA_DIR spelling remains a fallback for KLARS_DATA_DIR. An older installation can keep using ~/.tensorviz/app if its automatic directory migration could not complete.
Python selection
The CLI checks these in order:
KLARS_PYTHON.- The active virtual environment’s
bin/python. .venv/bin/pythonunder the klars installation root.python3on the service’sPATH.
The initial check verifies that the interpreter runs and is new enough. It does not import PyTorch or your model libraries. A configured interpreter path that does not exist is skipped. If the configured interpreter is attempted and fails the version check or cannot run, startup fails.
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.