> **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.

# What is PushAI? \[An AI Git assistant for your terminal]

PushAI is an AI Git assistant for your terminal. You run `pai commit`, it reads
your staged changes, writes a Conventional Commit message for you, and shows it
to you before anything is created. Accept it, regenerate it, or push it straight
through — all without leaving your shell.

Your Git workflow, quietly smarter.

## The problem it solves

Writing a good commit message takes effort. You want every message to follow the
Conventional Commit format so `git log` stays readable, you want the body to say
*why* the change happened, and you want to do all of that without alt-tabbing to
a chatbot to paste your diff. Most days that means either writing `update stuff`
for the fiftieth time or breaking your flow to get help.

PushAI takes the tedious part away and leaves you the decision:

* **Consistent messages.** Every message follows the Conventional Commit format —
  `feat(auth): add wallet connection modal` — with a subject line and a short
  body explaining what changed and why.
* **You review before anything happens.** PushAI never commits behind your back.
  It shows you the proposed message and waits for you.
* **You stay in the terminal.** No browser tab, no copy-paste, no context
  switch.

## What `pai commit` does

`pai commit` is the whole product in one command. It runs this flow:

1. **Repository check.** If the current directory is not a Git repository, it
   offers to initialize one (creating a `README.md` if the directory is empty)
   or to connect to an existing remote repository. You can also skip and exit.
2. **Stage and read.** It stages everything (`git add .`) and reads the staged
   diff.
3. **Conflict check.** If any files have unresolved merge conflicts, it stops
   and lists them before doing anything else.
4. **Generate.** Your active provider turns the diff into a Conventional Commit
   message. This step is skipped entirely when you pass `-m, --message`.
5. **Review.** It shows you the message and asks how you would like to proceed:
   save locally (local Ollama mode only), publish to remote, regenerate, or keep
   the working tree and walk away.
6. **Commit.** It creates the commit and shows you the short hash. Every commit
   gets a `Generated-with: PushAI (...)` trailer appended to the body.
7. **Push (optional).** With `-p, --push` — or if you chose *publish to
   remote* — it pushes the commit and confirms the result.

## Three ways to generate

:::info
Your model, your rules. Pick the generation mode that fits how much of your code
you want to leave the machine.
:::

| Mode | What it uses | Where your diff goes |
| --- | --- | --- |
| **Local** | [Ollama](https://ollama.com) and a model you have installed | Nowhere — it never leaves your machine |
| **BYOK** | Anthropic, OpenAI, Google Gemini, or Hugging Face with your own API key | To the provider you chose |
| **Cloud Hosted** | Managed PushAI AI, no key required | Coming soon — disabled in `pai setup` for now |

You can configure several providers at once and hop between them with
[`pai switch`](/commands/switch). Your keys live in your OS keychain, and your
config file never contains secrets.

## Push when you are ready

Committing and pushing do not have to be one step, but they can be:

```bash
pai commit -p   # commit and push in one go
pai push        # or push your local commits later
```

## Quick start

```bash
npm install -g pushai   # installs the `pai` binary
pai setup               # choose a provider and, if needed, a key or local model
pai commit              # stage, generate, review, commit
```

Once you have run `pai setup`, [`pai commit`](/commands/commit) is the only
command you need day to day.

## Next steps

* Follow [Getting Started](/introduction/getting-started) to install PushAI and
  make your first commit.
* Read the [Setup Wizard](/introduction/setup-wizard) walkthrough before you
  run `pai setup` the first time.
* Browse every command in the [CLI reference](/reference/cli).
