> ## Documentation Index
> Fetch the complete documentation index at: https://docs.northernlogic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI reference

> Reference for everyday replica checks, service management, orientation, and updates.

Install and enroll through [Connections](/connections/local-sync) before using
replica commands. `--root` is the knowledge folder; `--data-dir` is managed
client state. They are different locations.

## Inspect

| Command               | Purpose                                                                  |
| --------------------- | ------------------------------------------------------------------------ |
| `nlkb version`        | Print the installed version.                                             |
| `nlkb doctor`         | Check replica, mount, and service health.                                |
| `nlkb doctor --json`  | Read diagnostic results as JSON.                                         |
| `nlkb status --json`  | Inspect the local replica status.                                        |
| `nlkb status --watch` | Wait until healthy, then exit; it is not a perpetual monitor.            |
| `nlkb service status` | Check whether the daemon is running.                                     |
| `nlkb orient`         | Fetch live workspace orientation and include local root/mount locations. |
| `nlkb update check`   | Inspect available updates without installing one.                        |

Use your editor or filesystem tools to search local Markdown. The CLI does not
provide the web Search interface or interactive conflict resolution.

## Manage the background service

```sh theme={null}
nlkb service install
nlkb doctor
```

`service install` registers the platform service and starts it. Use
`service start`, `service stop`, or `service repair` for an existing
installation. `service uninstall` removes service registration; it is not cloud
connection revocation.

On systemd Linux, installation enables user lingering so sync can survive
logout. On macOS it uses launchd; on Windows it uses a service. On Linux without
systemd, it reports `supervisor=none` and `persist=host_lifetime`.
Host/container recycle requires a restart strategy.

`nlkb service run` is the long-running daemon entry point. Do not start it as a
blocking interactive repair command when `service start` is the intended action.
`nlkb sync` is one-shot and should not run alongside a watching daemon.

## Pause and update

Use `nlkb pause --help` and `nlkb resume --help` to choose the scope for your
installed version. Pause stops transfer but keeps local queueing while the
daemon runs.

```sh theme={null}
nlkb update
nlkb doctor
```

Update installs a newer verified build when available and restarts a running
service. A stopped service stays stopped. Use **Copy update prompt** on a
connection card for agent-assisted updates without reenrollment.

Avoid `reset` as routine troubleshooting. It can remove managed state needed for
queued work; recovery should start with
[health diagnostics](/connections/sync-health).
