> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> Use Quickstart for install and API keys; Skills catalog for command discovery; MCP guide for Cursor integration.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# Google Gemini CLI integration

> Run Google's Gemini CLI from Arka — interactive sessions, one-shot prompts, and native subcommand passthrough.

Arka wraps Google's official [**Gemini CLI**](https://github.com/google-gemini/gemini-cli) (`@google/gemini-cli`) for terminal use alongside built-in Arka skills.

## Usage

```bash theme={null}
arka gemini                          # interactive session
arka gemini explain asyncio in Python
arka gemini -m gemini-2.5-flash "summarize this diff"
arka gemini status                   # check install + auth
arka gemini mcp                      # native subcommands (passthrough)
arka gemini -- -p "hello" -m gemini-2.5-pro
```

From fish:

```fish theme={null}
gemini_cli explain Rust ownership
```

## Install

Node.js 18+ required:

```bash theme={null}
npm install -g @google/gemini-cli
# or one-shot:
npx @google/gemini-cli
```

## Authentication

Either:

1. Run `gemini` once and sign in with Google (browser OAuth), or
2. Set `GEMINI_API_KEY` in `~/.config/arka/.env` (Arka already uses this for built-in LLM calls).

```bash theme={null}
arka gemini status
```

## Override binary

```bash theme={null}
GEMINI_CLI=/path/to/gemini arka gemini status
```

## How it works

* Bare prompts are wrapped as `gemini --skip-trust -p "<prompt>"` for headless use.
* Flags and subcommands (`mcp`, `extensions`, `hooks`, etc.) pass through unchanged.
* If `gemini` is not on PATH, Arka falls back to `npx @google/gemini-cli`.

<Note>
  The Gemini CLI is separate from Arka's built-in Gemini provider. Use it for Gemini-specific features (MCP, extensions, hooks) that the native CLI exposes.
</Note>


## Related topics

- [Arka CLI command and flag reference](/guides/cli.md)
- [Arka — AI terminal agent documentation](/index.md)
- [Integrations](/guides/integrations.md)
- [How to code with Arka](/guides/code-with-arka.md)
- [MCP integration for Cursor and Claude](/guides/mcp.md)
