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

# Gemini CLI

> Connect TryPost to Gemini CLI for AI-powered social media management from the terminal

[Gemini CLI](https://github.com/google-gemini/gemini-cli) is Google's command-line AI assistant. You can connect it to TryPost's MCP server to manage your social media scheduling with natural language.

## Prerequisites

* Gemini CLI installed
* A TryPost Cloud account with an active trial or subscription ([start a 7-day free trial](/knowledge-base/plans-and-billing))

## Setup

<Steps>
  <Step title="Open the settings file">
    Edit your Gemini CLI settings at `~/.gemini/settings.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "trypost": {
          "httpUrl": "https://app.trypost.it/mcp/trypost",
          "oauth": {
            "enabled": true
          }
        }
      }
    }
    ```

    With `oauth.enabled`, Gemini CLI discovers TryPost's OAuth metadata from the URL and registers dynamically. For project-level configuration, create `.gemini/settings.json` in your project root instead.
  </Step>

  <Step title="Restart Gemini CLI and sign in">
    Close and reopen Gemini CLI. The first TryPost call prompts you to sign in — Gemini CLI prints the authorize URL or opens your browser. Approve and return to the terminal.
  </Step>

  <Step title="Verify the connection">
    Ask Gemini to interact with your TryPost account:

    ```
    List all my TryPost posts
    ```
  </Step>
</Steps>

<Tip>
  Gemini CLI uses `"httpUrl"` for HTTP-streaming servers (not `"url"`). The `"url"` field is used for SSE transport only.
</Tip>

<Accordion title="Bearer token fallback">
  For headless environments, use a Personal Access Token instead of OAuth:

  ```json theme={null}
  {
    "mcpServers": {
      "trypost": {
        "httpUrl": "https://app.trypost.it/mcp/trypost",
        "headers": {
          "Authorization": "Bearer YOUR_API_KEY"
        }
      }
    }
  }
  ```

  Create the key from **Settings > API Keys** on the [TryPost dashboard](https://app.trypost.it).
</Accordion>

## Example prompts

```
Create a new signature called "Growth Hacking"
```

```
What workspace am I connected to?
```

```
Show me all my labels
```
