Skip to content

CLI Reference

FlagDescription
-V, --versionOutput version number
-h, --helpDisplay help

Start the Katachi agent daemon.

Terminal window
katachi start [options]
FlagDefaultDescription
-p, --port <port>7676HTTP server port
-d, --debugfalseEnable debug logging
--home <dir>~/.katachiAgent data directory

Behavior:

  • On first run, initiates device-flow authentication
  • Starts the agent as a background process via PM2
  • Establishes a Cloudflare tunnel to the backend
  • Performs a health check after startup

Stop the Katachi agent daemon.

Terminal window
katachi stop [options]
FlagDefaultDescription
--home <dir>~/.katachiAgent data directory

Restart the Katachi agent daemon.

Terminal window
katachi restart [options]
FlagDefaultDescription
--home <dir>~/.katachiAgent data directory

Behavior: Detects current port configuration from the running process and restarts with the same settings.


Check agent daemon status and tunnel information.

Terminal window
katachi status [options]
FlagDefaultDescription
--home <dir>~/.katachiAgent data directory

Output includes: PID, port, CPU usage, memory usage, uptime, tunnel URL.


View agent logs.

Terminal window
katachi logs [options]
FlagDefaultDescription
-f, --followfalseFollow log output (like tail -f)
-n, --lines <n>100Number of lines to show
--home <dir>~/.katachiAgent data directory

Show version information.

Terminal window
katachi version

Output includes: Version number, Node.js version, platform, architecture.


Deregister the agent and remove all credentials.

Terminal window
katachi unregister [options]
FlagDefaultDescription
--forcefalseRemove local credentials even if backend is unreachable
-y, --yesfalseSkip confirmation prompt
--home <dir>~/.katachiAgent data directory

Behavior:

  1. Stops the agent if running
  2. Sends deregister request to backend (HMAC-authenticated)
  3. Removes credentials from disk

With --force, ignores failures in step 2 (useful when the backend is unreachable).