# Install & sign in {#install--sign-in}




> [!IMPORTANT]
> This page is for terminal, CI, and headless agent-runner workflows. Claude Desktop, Claude.ai, and Claude Cowork users should not install the CLI to connect Nitrosend; enable the official Nitrosend connector under **Settings → Connectors** instead (see [Claude Desktop](https://docs.nitrosend.com/integrations/claude-desktop.md)).





> [!IMPORTANT]
> All plans, including free plans, have full access to Nitrosend MCP/API/CLI. Install and sign-in work the same way on Free; plan limits apply to usage volume and paid add-ons.




## Install {#install}


The CLI ships as `@nitrosend/cli` on npm. Install globally with your package manager of choice:





**npm**

```bash
npm install -g @nitrosend/cli
```





**pnpm**

```bash
pnpm add -g @nitrosend/cli
```





**yarn**

```bash
yarn global add @nitrosend/cli
```





Requires Node.js 18 or newer. Confirm the install:

```bash
nitrosend --version
```


## Sign in {#sign-in}


The CLI supports two auth modes. OAuth for humans on a workstation, API keys for CI and headless agents.


### OAuth (recommended for humans) {#oauth-recommended-for-humans}


```bash
nitrosend login
```

Opens a browser window for OAuth PKCE. The resulting profile is stored under your platform config directory (or `NITROSEND_CONFIG_DIR` if set) — never inside your repo.

Pass `--profile <name>` to keep multiple accounts side by side:

```bash
nitrosend login --profile work
nitrosend login --profile personal
nitrosend whoami --profile work
```


### API key (recommended for CI and headless) {#api-key-recommended-for-ci-and-headless}


Get an API key from **Settings > API Keys** in the Nitrosend dashboard ([app.nitrosend.com/my/settings/api-keys](https://app.nitrosend.com/my/settings/api-keys)), then either store it as a profile:

```bash
nitrosend login --api-key nskey_live_...
```

…or pass it through the environment without writing to disk:

```bash
export NITROSEND_API_KEY=nskey_live_...
nitrosend mcp tools list
```

Environment variables take precedence over stored profiles, which makes the CLI safe to drop into a CI runner that injects secrets at job time.


### Sign up without a browser {#sign-up-without-a-browser}


An agent or script with no account yet can create one from the CLI (0.3.11 or later). The password is read from stdin, never from a flag:

```bash
printf '%s' "$PASSWORD" | nitrosend signup --email you@example.com --password-stdin
```

Signup returns `verification_required` and leaves your current profile untouched. Read the verification email, then supply JSON containing its `token` and your **final** `password` through stdin:

```bash
nitrosend signup verify --verification-stdin --profile default < verification.json
```

Keep that input file private and remove it after use, or stream the JSON directly from your secret store. Do not put passwords or verification tokens in command arguments. Verification creates the account, makes an API key, and saves that key as the profile. The final password replaces the password used to start signup.

If the link expires, run `nitrosend signup resend --email you@example.com`. If verification succeeded but activation, key creation or local profile storage was interrupted, resume without another email:

```bash
printf '%s' "$PASSWORD" | nitrosend signup resume --email you@example.com --password-stdin --profile default
```

Use the same `--api-url` and `--profile` throughout. Resending has a one-minute cooldown and three-per-address daily limit; global acquisition limits also apply. Respect `Retry-After` on HTTP 429. Existing API-key and browser OAuth login remain available.

`--utm-source`, `--utm-medium` and `--utm-campaign` record where the signup came from.



> [!TIP]
> In `--non-interactive` or `--machine` mode, OAuth login is rejected — interactive auth would block the run. Use an API key or a pre-existing profile for those workflows.




## Confirm the connection {#confirm-the-connection}


```bash
nitrosend whoami
```

Prints the active auth source, profile name, and API endpoint. If `whoami` succeeds, the next step is the dashboard — a single read that summarises account state, blockers, and what to do next:

```bash
nitrosend
```

The bare `nitrosend` invocation is the dashboard alias. It calls `nitro_get_status` and renders the response envelope's `blockers` and `next_action` fields. From here, list MCP tools to confirm the platform surface is reachable:

```bash
nitrosend mcp tools list
```


## Sign out {#sign-out}


```bash
nitrosend logout
```

Removes the active profile. Use `--profile <name>` to remove a specific one. `logout` does not revoke the underlying token — to revoke, do that from the dashboard.


## Custom API endpoints {#custom-api-endpoints}


Point the CLI at a non-production endpoint with `--api-url` or `NITROSEND_API_URL`:

```bash
nitrosend login --api-url https://api.staging.nitrosend.com/mcp
# or
export NITROSEND_API_URL=https://api.staging.nitrosend.com/mcp
```

Project-level defaults live in `.nitrosend.yml` — see [Project config](https://docs.nitrosend.com/cli/project-config.md).
