Desktop app, CLI, and command line

What runs on your machine, what talks to the gateway, and how to script it.

There is no separate nib CLI to install. Nib ships as a desktop application. Version 0.22 removed the standalone npm install -g @nib/cli package; anything you read elsewhere that starts with nib login describes a product that no longer exists.

What actually ships

ComponentWhat it doesHow you reach it
Nib desktopThe app: chat, projects, scheduled tasks, plugins, MCP, voice.Download from /download
nib-hostHeadless host used for remote machines. The desktop installs and upgrades it over SSH.Managed by the app — no manual install
Nib gatewayOpenAI-, Anthropic-, and Gemini-compatible inference endpoint.https://api.nib.am/v1

Signing in

Sign-in happens in the app: Settings → Account → Sign in with Nib. The app opens nib.am/device, you approve a short code, and the credential is written to your OS keychain — never to a config file, never to the repository.

On a headless or remote machine, the desktop drives the same flow over SSH and stores the result on that machine.

Using your key outside the app

Create a key in the console under API keys. Then point any compatible client at the gateway:

export NIB_API_KEY="sk-nib-..."
export OPENAI_BASE_URL="https://api.nib.am/v1"

The same key works for the Anthropic and Gemini protocols — see API reference. Every request is billed to the same credit balance as the app, and the response reports what it charged.

Scripting the gateway

curl https://api.nib.am/v1/chat/completions \
  -H "Authorization: Bearer $NIB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "messages": [{"role": "user", "content": "Summarise this diff."}]
  }'

Balances and plan limits are control-plane routes and take the console session, not the API key:

RoutePurpose
GET /api/v1/product/entitlementPlan, credits, caps, reset date
GET /api/v1/downloadsCurrent release manifest (public)

Remote machines

Settings → Remote hosts adds a machine over SSH. The desktop copies a nib-host bundle to it, verifies the published SHA-256 before unpacking, and keeps it in sync on every app upgrade. You do not remove and re-add a host to upgrade it; reconnecting realigns the host version.

Exit codes and failure behaviour

The desktop is a GUI application, so it has no meaningful exit codes. When it fails to start the local service it shows Can't reach the local service with an Open logs link, and the installer refuses to finish if the application binary is missing rather than leaving a dead shortcut behind.