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

# Utility commands

> Authentication, diagnostics, versioning, updates, AI-assistant setup, and shell completion.

These commands manage the CLI itself rather than a NeetoKB resource.

## Authentication

### login

```bash theme={"system"}
neetokb login --subdomain your-workspace
```

Opens your browser to sign in and saves credentials for the workspace. Omit `--subdomain` to be prompted.

```text Sample output theme={"system"}
Authenticated as oliver@example.com on acme.neetokb.com.
```

### logout

```bash theme={"system"}
neetokb logout --subdomain your-workspace
neetokb logout --all
```

| Flag    | Type   | Required | Default | Description                       |
| ------- | ------ | -------- | ------- | --------------------------------- |
| `--all` | `bool` |          | `false` | Sign out of every saved subdomain |

```text Sample output theme={"system"}
Signed out of acme.neetokb.com.
```

### whoami

```bash theme={"system"}
neetokb whoami
```

Lists each signed-in account and marks it `(default)` when only one is signed in. Pass `--subdomain <name>` to show one workspace.

```text Sample output theme={"system"}
Authenticated as oliver@example.com on acme.neetokb.com (default).
```

## Diagnostics

### doctor

```bash theme={"system"}
neetokb doctor
```

Checks authentication, API reachability, and the CLI version. See [Troubleshooting](/cli/troubleshooting). When several workspaces are signed in, pass `--subdomain <name>`.

```text Sample output theme={"system"}
✓ Authentication: authenticated as oliver@example.com on acme.neetokb.com
✓ API connection: https://acme.neetokb.com (responding in 214ms)
✓ CLI version: 1.0.6
```

### version

```bash theme={"system"}
neetokb version
```

Prints the CLI version, commit hash, and build date.

```text Sample output theme={"system"}
neetokb 1.0.6 (commit: a1b2c3d, built: 2026-07-01)
```

### commands

```bash theme={"system"}
neetokb commands
```

Prints the complete command and flag catalog for the installed version as JSON. It is useful in scripts and with AI assistants.

```json Sample output theme={"system"}
[
  {
    "command": "neetokb articles",
    "description": "Manage articles",
    "subcommands": [
      {
        "command": "neetokb articles list",
        "description": "List articles",
        "flags": [
          { "name": "state", "type": "string", "description": "Filter by state (draft/published)" }
        ]
      }
    ]
  }
]
```

## Updates

### update

```bash theme={"system"}
neetokb update
```

Detects how the CLI was installed and runs the matching upgrade command: `brew upgrade` for a Homebrew install, the install script otherwise, and the PowerShell installer on Windows.

```text Sample output theme={"system"}
Detected Homebrew install.
Running: brew update && brew upgrade neetozone/tap/neetokb
```

## AI-assistant setup

Add NeetoKB instructions to your AI coding assistant. See [AI assistants](/cli/ai-assistants) for details.

```bash theme={"system"}
neetokb setup claude
neetokb setup cursor
neetokb setup windsurf
neetokb setup copilot
neetokb setup gemini
neetokb setup codex
```

```text Sample output theme={"system"}
NeetoKB plugin extracted to /Users/oliver/.config/neetokb/claude-plugin

To finish installation, open Claude Code and run these slash commands:
  /plugin marketplace add /Users/oliver/.config/neetokb/claude-plugin
  /plugin install neetokb@neetokb

(Claude Code installs plugins via interactive slash commands — there is no shell equivalent today.)
```

## Shell completion

Shell completion fills in command names, subcommands, and flags when you press `Tab`. It saves you from having to remember the full command tree or look up `--help`.

`neetokb completion <shell>` installs completion for your shell. It writes a script under `~/.config/neetokb/completions` and configures your shell to load it the next time it starts.

<CodeGroup>
  ```bash Zsh theme={"system"}
  neetokb completion zsh
  ```

  ```bash Bash theme={"system"}
  neetokb completion bash
  ```

  ```bash Fish theme={"system"}
  neetokb completion fish
  ```

  ```powershell PowerShell theme={"system"}
  neetokb completion powershell
  ```
</CodeGroup>

Start a new shell (or run `source ~/.zshrc`) to enable it. After upgrading the CLI, run the command again to update the available completions. Re-running it replaces the existing script and configuration without adding duplicates.

<Note>
  To configure it yourself, pass `--print` to write the raw script to standard output instead of installing it:

  ```bash theme={"system"}
  neetokb completion zsh --print
  ```
</Note>
