Agent Commands
Overview
Section titled “Overview”The katachi CLI manages the agent daemon running on your machine. Here’s every command you need to know.
katachi start
Section titled “katachi start”Start the agent daemon. On first run, guides you through device-flow authentication.
katachi start # Start with defaultskatachi start --port 3001 # Custom portkatachi start --debug # Enable debug loggingkatachi start --home ~/my-dir # Custom data directoryThe agent runs as a background process via PM2, so it survives terminal closures.
katachi stop
Section titled “katachi stop”Stop the agent daemon.
katachi stopThis also disconnects the Cloudflare tunnel.
katachi restart
Section titled “katachi restart”Restart the agent daemon. Preserves the current port configuration.
katachi restartkatachi status
Section titled “katachi status”Check if the agent is running and view tunnel information.
katachi statusOutput includes PID, port, memory usage, uptime, and tunnel URL.
katachi logs
Section titled “katachi logs”View agent logs.
katachi logs # Show recent logskatachi logs -f # Follow logs in real-time (tail -f)katachi logs -n 50 # Show last 50 lineskatachi version
Section titled “katachi version”Display version information.
katachi versionkatachi unregister
Section titled “katachi unregister”Deregister the agent from Katachi servers and remove local credentials.
katachi unregister # Normal: deregister from backend firstkatachi unregister --force # Force: remove local credentials even if backend is unreachablekatachi unregister -y # Skip confirmation prompt