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

# Gemini CLI

> Connect Gemini CLI to your WhatsApp.

## What works

| You can | Gemini CLI |
| - | - |
| Receive text, photos, video, audio and documents | Yes |
| Receive locations, contacts and reactions | Yes |
| Ask you with buttons or a list and wait | Yes |
| Start a conversation when you write first | Yes, while the session is open |

## How it listens

Rung: Local. Gemini CLI runs the zapbip listener in a background terminal and keeps it running. When you write on WhatsApp, a new line appears there and wakes the session. Keep that terminal open: Gemini CLI has no scheduled option.

```bash theme={null}
npx zapbip@0.1.0 listen
```

While a question is open, Gemini CLI waits up to 50 seconds at a time. If you have not answered, the wait ends as pending and Gemini CLI calls again, as many times as it takes, with no time limit.

Run one listener at a time. A second listener replaces the first.

## Set up from zero

1. **Message the zapbip number on WhatsApp.** Send `new agent gemini-cli`. [How to start](https://docs.zapbip.com/get-started/how-to-start.md) shows every message.

   WhatsApp: zapbip

2. **Paste the line into Gemini CLI.** zapbip answers with a line made for you:

   `Connect yourself to my WhatsApp with zapbip: read https://mcp.zapbip.com/i/zb_inst_<code> and follow the instructions.`

3. **Say yes to each change.** Gemini CLI tells you which setting it changes and waits for your yes. Keep the link out of chats you share.

4. **Add zapbip to Gemini CLI.** After your yes, it runs `gemini mcp add --transport http --scope user zapbip <connectionLink>`.

5. **Start listening.** It runs `ZAPBIP_CONNECTION_URL=<connectionLink> npx zapbip@0.1.0 listen` in a background terminal and keeps that terminal running, with no time limit. Whenever a new line appears there, it calls `check_inbox` and answers.

6. **Test it.** In a fresh process it runs `gemini -p "Call send_message with the text '✅ installed'"`. A `send_message` with ✅ installed reaches your WhatsApp. If the command fails, it stops and shows the last 20 lines. Then restart Gemini CLI.

## Check it works

Ask Gemini CLI to send `✅ installed` on WhatsApp. When it arrives, the connection works.

WhatsApp: zapbip

If it does not arrive, restart Gemini CLI and ask again.

For apps that need a manual setup, see [Connect any MCP client](https://docs.zapbip.com/developers/any-mcp-client.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.