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

# utility

> Sign in, diagnose, upgrade, configure assistants, and install shell completion.

Commands that manage the CLI itself rather than workspace data.

## login

Sign in to a workspace through the browser. Omit `--subdomain` and the CLI prompts for it.

```bash theme={"system"}
neetoinvoice login --subdomain acme
```

```
Authenticated as oliver@example.com on acme.neetoinvoice.com.
```

Credentials for every signed-in subdomain live together in
`~/.config/neetoinvoice/auth.json`. See [Authentication](/cli/authentication).

## logout

Sign out of one workspace, or all of them.

```bash theme={"system"}
neetoinvoice logout --subdomain acme
```

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

```
Signed out of acme.neetoinvoice.com.
```

With no flag, `logout` removes the only entry when exactly one is signed in, and errors when
several are.

## whoami

List the signed-in accounts. The entry is marked `(default)` when exactly one is signed in.

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

```
Authenticated as oliver@example.com on acme.neetoinvoice.com (default).
```

Pass `--subdomain <name>` to show just one.

## doctor

Check authentication, API reachability, and version. Each check runs independently, so one
failure does not hide the others.

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

```
✓ Authentication: authenticated as oliver@example.com on acme.neetoinvoice.com
✓ API connection: https://acme.neetoinvoice.com (responding in 142ms)
✓ CLI version: 1.0.7
```

`doctor` needs `--subdomain` too when several workspaces are signed in.

## version

Print the version, commit, and build date.

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

```json theme={"system"}
{
  "binary": "neetoinvoice",
  "commit": "3f9a1c2",
  "date": "2026-07-21T09:14:22Z",
  "version": "1.0.7"
}
```

## update

Upgrade the CLI in place. The command detects how the binary was installed and runs the
matching upgrade: `brew update && brew upgrade` for Homebrew, the PowerShell installer on
Windows, and the shell installer everywhere else.

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

## commands

Emit the full command and flag catalog as JSON. This is the source of truth for what the
installed binary supports, and it is what generates the
[commands overview](/cli-reference/overview).

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

Each entry has `command`, `description`, optional `flags` (with `name`, `type`, `default`,
`description`, and `required`), and `subcommands`.

## setup

Write NeetoInvoice instructions into an AI coding assistant's config. Run it from the
repository you are working in. See [AI assistants](/cli/ai-assistants).

```bash theme={"system"}
neetoinvoice setup claude
```

| Command          | What it writes                                      |
| ---------------- | --------------------------------------------------- |
| `setup claude`   | Registers the NeetoInvoice plugin with Claude Code. |
| `setup cursor`   | `.cursor/rules/neetoinvoice.mdc`                    |
| `setup windsurf` | `.windsurf/rules/neetoinvoice.md`                   |
| `setup copilot`  | Appends to `.github/copilot-instructions.md`        |
| `setup gemini`   | Appends to `GEMINI.md`                              |
| `setup codex`    | Appends to `AGENTS.md`                              |

## Shell completion

`neetoinvoice completion <shell>` writes the completion script under
`~/.config/neetoinvoice/completions` and wires your shell to load it on next start. No manual
sourcing is needed.

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

  ```bash bash theme={"system"}
  neetoinvoice completion bash
  ```

  ```bash fish theme={"system"}
  neetoinvoice completion fish
  ```

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

```
Installed zsh completion:
  script: /Users/oliver/.config/neetoinvoice/completions/_neetoinvoice (overwritten)
  loader: added to /Users/oliver/.zshrc
Start a new shell (or run: source /Users/oliver/.zshrc) to use it.
Re-run "neetoinvoice completion zsh" after upgrading to keep completions current with the latest commands.
```

Re-running refreshes both the script and the shell config in place, so it never duplicates the
loader block. fish needs no loader: it picks the script up automatically.

<Note>
  Re-run the completion install after every upgrade. The script on disk is generated from the
  binary that wrote it, so commands added later will not be suggested until you refresh it.
</Note>

Pass `--print` to emit the raw script to standard output instead of installing it:

```bash theme={"system"}
neetoinvoice completion zsh --print
```
