> For the complete documentation index, see [llms.txt](https://docs.coupler.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coupler.io/destinations/categories/ai/gemini.md).

# Gemini CLI

Send business data to Gemini CLI for terminal-native analysis via natural language queries. Analyze trends and generate insights without leaving the command lin

Gemini CLI is Google's command-line AI tool that lets you explore and analyze data through natural language conversation directly in your terminal. By connecting Coupler.io to Gemini CLI, you can pull in business data from any source and ask questions, spot trends, and generate insights — all without leaving the command line.

## Why use Gemini CLI as a destination?

* **Terminal-native analysis** — ask Gemini questions about your data in plain English directly from the command line
* **Any source, one session** — connect Google Ads, TikTok Ads, Google Drive, or any other Coupler.io source, and analyze it all in one place
* **No credentials needed** — Gemini CLI accesses your data through a connector, so there are no database passwords or OAuth flows to manage on the destination side
* **Always fresh data** — schedule your data flow to refresh automatically so Gemini CLI always has up-to-date data to work with

## Prerequisites

* Gemini CLI installed on your machine
* A Google account with access to Gemini

## Quick start

{% hint style="success" %}
Install and configure Gemini CLI first, then create your data flow in Coupler.io. Having Gemini CLI ready before you run the flow means you can start querying your data immediately.
{% endhint %}

### How to connect

{% stepper %}
{% step %}
**Add a source to your data flow.** In Coupler.io, create a new data flow and add at least one source — for example, Google Ads, TikTok Ads, or any other supported integration.
{% endstep %}

{% step %}
**Select Gemini CLI as the destination.** In the destination step of your data flow, choose **Gemini CLI** from the list of available destinations.
{% endstep %}

{% step %}
**Add Coupler.io MCP server to Gemini**. Generate the proper command to add the MCP. It will look like `gemini mcp add coupler --transport=http --scope=user https://mcp.coupler.io/mcp/xxx`
{% endstep %}

{% step %}
**Authenticate Coupler.io MCP**. Use the following command inside Gemini CLI: `/mcp auth coupler`
{% endstep %}

{% step %}
**Run the data flow.** Click **Run** to execute the data flow manually. Once it completes successfully, your data is available to Gemini CLI. Open your terminal, start a Gemini CLI session, and begin asking questions about your dataset.
{% endstep %}
{% endstepper %}

## Supported features

| Feature              | Supported |
| -------------------- | --------- |
| Replace mode         | Yes       |
| Append mode          | No        |
| Automatic scheduling | Yes       |
| Type enforcement     | No        |
| Templates            | No        |

## Gemini CLI common issues

### Connection issues

<details>

<summary>Gemini CLI can't see my data after the flow runs successfully</summary>

This usually means the Coupler.io connector isn't active or properly configured in your Gemini CLI session. Check the following:

* Confirm that the Coupler.io connector is set up and enabled in your Gemini CLI configuration.
* Start a **new Gemini CLI session** after confirming the connection — an existing session may not pick up a newly activated connector.

If the connector is active but Gemini CLI still can't access the data, try removing and re-adding the connector configuration.

</details>

<details>

<summary>MCP connector timeouts or data fetch gets stuck</summary>

Intermittent timeouts when Gemini CLI calls the data connector are a known issue with MCP-based integrations. This can happen when datasets are large or the connection experiences latency.

{% hint style="warning" %}
If you're hitting this frequently, try reducing the amount of data sent to Gemini CLI by filtering at the source level in Coupler.io. Sending a focused, smaller dataset is more reliable than sending everything.
{% endhint %}

If the problem persists across multiple sessions, contact Coupler.io support — this may require investigation by the engineering team.

</details>

### Data issues

<details>

<summary>Gemini CLI sees fewer rows than the Coupler.io preview shows</summary>

A mismatch between the Preview in Coupler.io and the data Gemini CLI receives can occur when the same identifier (for example, an `ad_id`) appears multiple times, and deduplication logic affects the export differently than the preview.

{% hint style="danger" %}
Don't rely on the Preview tab alone to confirm what Gemini CLI will receive. Always verify the actual row count in Gemini CLI after running the flow. You can also configure a Google Sheets export to verify that the number of rows is the same and to check what's missing.
{% endhint %}

If you notice specific rows are missing, note the relevant IDs and contact Coupler.io support with the data flow details — this type of discrepancy requires engineering investigation.

</details>

### Permission errors

<details>

<summary>"You've reached your destination limit" or AI usage is restricted</summary>

Coupler.io plans have limits on **destination type**. If you're using Gemini CLI as a destination and also sending data elsewhere (for example, Google Sheets), you may hit this limit.

To resolve this, either:

* Remove the other destination and use only Gemini CLI, or
* Upgrade to a higher Coupler.io plan that supports multiple destination types.

{% hint style="info" %}
Each active data flow counts toward your plan limits. If you created a test flow with a different destination, delete it to free up your destination slot or upgrade to a higher plan.
{% endhint %}

</details>

## Gemini CLI FAQ

<details>

<summary>What is Gemini CLI?</summary>

Gemini CLI is Google's command-line AI tool that lets you interact with Gemini directly from your terminal. You can ask questions, analyze data, and get insights without leaving the command line. When connected to Coupler.io, Gemini CLI can access your business data from any supported source.

</details>

<details>

<summary>How does my data get to Gemini CLI?</summary>

Coupler.io creates a connector that Gemini CLI accesses through the MCP (Model Context Protocol) pattern. When you run a data flow with Gemini CLI as the destination, Coupler.io makes the data available through this connector. Gemini CLI then fetches the data on demand when you ask questions about it — no files are written to disk or stored locally.

</details>

<details>

<summary>Can I send data from multiple sources to Gemini CLI in one flow?</summary>

Yes. A single Coupler.io data flow supports multiple sources, and you can combine them using **Join** or **Append** transformations before the data reaches Gemini CLI. This is useful when you want to correlate data from different platforms — for example, combining Google Ads spend with TikTok Ads performance in a single session.

</details>

<details>

<summary>Do I need any special credentials to set up the Gemini CLI destination?</summary>

No. The Gemini CLI destination in Coupler.io does not require database credentials, OAuth, or API keys on the destination side. You just select Gemini CLI as your destination and run the flow. Authentication happens on the Gemini CLI side through your Google account.

</details>

<details>

<summary>How do I keep Gemini CLI's data up to date without re-running manually?</summary>

Once your data flow has completed a successful manual run, you can set up a **schedule** in Coupler.io to refresh the data automatically — hourly, daily, or at a custom interval. Gemini CLI will then have access to fresh data whenever you start a new session.

</details>

{% hint style="info" %}
For help setting up specific data sources for Gemini CLI, see the individual source articles in the **Sources** section of this Help Center.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coupler.io/destinations/categories/ai/gemini.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
