> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://pushai.vercel.app/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# CLI reference \[Every command on one page]

```bash
pai <command> [options]
```

PushAI installs one binary, `pai`. Everything it does lives in seven commands.
This page is the whole surface — grep-friendly, no clicking required.

## Help output

`pai --help` prints Commander's standard layout:

```text
Usage: pushai [options] [command]

An AI Git assistant for your terminal

Options:
  -v, --version        show version
  -h, --help           display help for command

Commands:
  commit               create an ai-generated git commit
  push                 push local commits to the remote
  peak                 peek at current pushai configuration
  reset                delete local configuration
  switch               switch the active ai provider
  setup                run pushai setup wizard
  update               check for a newer version of pushai
  help [command]       display help for command
```

Per-command help works the same way — `pai commit --help`, `pai reset --help`,
and so on — listing that command's flags with their descriptions.

:::info
The program name in the usage line is the npm package name (`pushai`), while
the binary you type is `pai`. They are the same tool; only the label differs.
:::

## Version

```bash
pai --version
pai -v
```

```text
v3.1.24
» node v22.11.0 (from PATH)
```

The first line is the installed PushAI version. The second is the Node version
found on your `PATH`, which is useful when a version check misbehaves on a
machine with several Node installs.

## Commands

| Command | Synopsis | Flags |
| --- | --- | --- |
| [`commit`](/commands/commit) | `pai commit [options]` | `-p, --push` · `-m, --message <text>` · `--type <type>` · `--scope <scope>` · `--dry-run` |
| [`push`](/commands/push) | `pai push` | — |
| [`switch`](/commands/switch) | `pai switch` | — |
| [`peak`](/commands/peak) | `pai peak [options]` | `-k, --key` |
| [`reset`](/commands/reset) | `pai reset [options]` | `-a, --all` |
| [`setup`](/introduction/setup-wizard) | `pai setup` | — |
| [`update`](/commands/update) | `pai update` | — |

### `pai commit`

```bash
pai commit [options]
```

Create an AI-generated Git commit: stage everything, read the diff, check for
conflicts, generate a Conventional Commit message, let you review it, then
commit — and optionally push.

| Flag | Description |
| --- | --- |
| `--dry-run` | Preview the message without creating a commit (uses a throwaway index; your real index is untouched). |
| `-p, --push` | Automatically push the commit. Skips the review menu. |
| `-m, --message <text>` | Use a custom commit message instead of generating one. |
| `--type <type>` | Conventional Commit type for `-m` — `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`. |
| `--scope <scope>` | Conventional Commit scope for `-m`. Requires `--type`. |

Full walkthrough: [pai commit](/commands/commit).

### `pai push`

```bash
pai push
```

Push local commits on the current branch to `origin`. Warns about uncommitted
changes, reports how many commits are unpushed, and sets the upstream on the
first push. No flags.

Full walkthrough: [pai push](/commands/push).

### `pai switch`

```bash
pai switch
```

List your configured providers (active one marked) and choose a new active
one. Offers to run `pai setup` if you have no configuration yet. No flags.

Full walkthrough: [pai switch](/commands/switch).

### `pai peak`

```bash
pai peak [options]
```

List saved providers, mark the active one, and show each key's status.

| Flag | Description |
| --- | --- |
| `-k, --key` | Reveal stored BYOK API keys in plaintext. |

Full walkthrough: [pai peak](/commands/peak).

### `pai reset`

```bash
pai reset [options]
```

Interactively remove one provider, delete all providers, or preserve your
configuration. Removing a BYOK provider also deletes its stored key.

| Flag | Description |
| --- | --- |
| `-a, --all` | Skip the selection menu and go straight to the delete-all confirmation. |

Full walkthrough: [pai reset](/commands/reset).

### `pai setup`

```bash
pai setup
```

Run the setup wizard: choose local (Ollama), BYOK, or — disabled for now —
cloud; validate your key live; pick a model. On later runs it offers to add a
provider, replace the active one, or leave setup unchanged. No flags.

Full walkthrough: [Setup Wizard](/introduction/setup-wizard).

### `pai update`

```bash
pai update
```

Check npm for a newer version of `pushai` and, if you confirm, install it
globally with your detected package manager. No flags.

Full walkthrough: [pai update](/commands/update).

## Global behaviour

* **Version notice.** Before most commands PushAI checks npm for a newer
  version, raced against a 1.5 second timeout and cached for 24 hours. It is
  skipped for `update`, `-h`, and `--help`.
* **Cancellation.** Ctrl+C at any prompt exits cleanly with
  `operation cancelled.` and exit code 130 — nothing is half-applied.
* **Prompt-aware command names.** PushAI adapts the command it shows you to how
  you invoked it: `pai commit` when installed globally, `npx pushai commit` or
  `bunx pushai commit` when run through a package runner.
* **Exit codes.** `0` on success, `1` on failure (including invalid `--type` or
  `--scope` values), `130` on cancellation.

## See also

* [Configuration](/reference/config) — the files these commands read and write.
* [What is PushAI?](/introduction/what-is-pushai) — the flow behind
  `pai commit`.
