For the complete documentation index, see llms.txt. This page is also available as Markdown.

Kerno CLI

The Kerno CLI manages the Kerno agent on your machine and sets up MCP for your coding agent.

Install

The CLI is published as @kerno/cli on npm.

npm install -g @kerno/cli

Or run without installing.

npx @kerno/cli <command>

Requires Node.js 18 or higher. For the full setup walkthrough, see the Quickstart.

Commands

Command
Description

kerno init

Start the Kerno agent and print the MCP server configuration for your coding tool. The main entry point.

kerno stop

Stop the Kerno agent. Cancels in-flight tests and stops application services first.

kerno reset

Stop applications, clear workspace caches, and restart the agent fresh. The escape hatch when state is stuck.

kerno status

Show current status.

kerno doctor

Diagnose orphan agent processes and inconsistent state files. Use --clean to apply fixes.

kerno logs

Stream workspace logs from the running agent. Use -n <count> to set the number of log lines (default 40).

kerno export-logs

Export Kerno agent logs (workspace + terminal output) to a zip file. Requires -o <path> for the destination.

kerno login

Log in to Kerno via your browser.

kerno logout

Log out from Kerno.

kerno update

Update the Kerno CLI to the latest version from npm.

kerno uninstall

Stop the agent and remove installed binaries.

Run kerno with no arguments to launch the interactive shell.

Global options

Option
Description

-w, --workspace <path>

Workspace path. Defaults to the current directory.

-v, --verbose

Show Kerno diagnostic logs.

--force-update

Force re-download of the agent. Applies to init.

-V, --version

Show CLI version.

-h, --help

Show help.

kerno init options

Option
Description

--headless

Skip the interactive UI. Enabled automatically when stdin is not a TTY, such as inside a coding agent.

--force-switch

Stop an agent bound to a different workspace and rebind to this one, without prompting.

The agent serves one workspace at a time. Running kerno init against a different repository while an agent is already bound will fail unless you pass --force-switch.

Running inside a coding agent

kerno status and the bare kerno shell render an interactive terminal UI, which does not work in a non-interactive agent shell. When you need to check state from inside a coding agent, use kerno --version, docker info, and the kerno_healthcheck MCP tool instead.

Examples

Start the agent and print MCP config.

Point the agent at a repository from anywhere.

Move the agent to a different repository.

Fix orphan agent processes.

Clear workspace caches and restart cleanly.

Stream the most recent 100 log lines.

Export logs for support.

Last updated