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

# Introduction

> Automate social media posting from the command line with the Groniz CLI

<Warning>
  For your AI agent to work best with Groniz, install the skill by running:

  ```bash theme={null}
  npx skills add groniz/groniz-cli
  ```

  Or load the SKILL md file from [github.com/groniz/groniz-cli](https://github.com/groniz/groniz-cli).
</Warning>

The Groniz CLI is a command-line tool for automating social media posting across 32+ platforms. It wraps the [Public API](/public-api/introduction) so you can schedule posts, manage integrations, and upload media directly from your terminal or shell scripts.

## Installation

```bash theme={null}
curl -fsSL https://groniz.com/install.sh | sh
```

Installs a self-contained native `groniz` binary — no Node, npm, or pnpm
required. It detects your OS/arch, verifies the download's SHA-256 against the
signed manifest, installs to `~/.groniz/bin/groniz`, and adds that dir to
`PATH`. Supported: Linux/macOS on x64/arm64 (glibc). Ideal for a fresh box or a
coding agent.

Verify the installation:

```bash theme={null}
groniz --help
```

## Authentication

### Option 1: OAuth2 (Recommended)

Authenticate using the device flow — no client ID or secret needed:

```bash theme={null}
groniz auth login
```

This will:

1. Display a one-time code in your terminal
2. Open your browser to authorize
3. Automatically save credentials to `~/.groniz/credentials.json`

```bash theme={null}
# Check who you're signed in as
groniz whoami

# Remove stored credentials
groniz auth logout
```

### Option 2: API Key

Set your Groniz API key as an environment variable. You can get your API key from the Groniz Settings page.

```bash theme={null}
export GRONIZ_API_KEY=your_api_key_here
```

<Tip>
  Add this to your shell profile (`~/.bashrc`, `~/.zshrc`, etc.) so it persists across sessions.
</Tip>

<Note>
  OAuth2 credentials take priority over the API key when both are present.
</Note>

## Quick Start

```bash theme={null}
# 1. List your connected social media accounts
groniz integrations list

# 2. Create a scheduled post
groniz posts create \
  -c "Hello from the Groniz CLI!" \
  -s "2025-01-15T10:00:00Z" \
  -i "your-integration-id"

# 3. List your scheduled posts
groniz posts list
```

## Commands Overview

| Command | Description |
| - | - |
| `auth login` | Authenticate via OAuth2 device flow |
| `whoami` | Show who you're signed in as, and verify the credential |
| `auth logout` | Remove stored credentials |
| `integrations list` | List all connected social media accounts |
| `integrations settings` | Get the settings schema for an integration |
| `integrations trigger` | Trigger a dynamic tool on an integration |
| `posts create` | Create a new post |
| `posts list` | List posts with optional date filtering |
| `posts delete` | Delete a post by ID |
| `posts missing` | List available content from provider for a post with missing release ID |
| `posts connect` | Connect a post to its published content by release ID |
| `analytics platform` | Get analytics for an integration/channel |
| `analytics post` | Get analytics for a specific post |
| `reads x profile` | Read any public X account's profile |
| `reads x posts` | Read an X account's recent posts |
| `reads x post` | Read a single X post by id |
| `reads x search` | Search recent X posts by query |
| `reads x metrics` | Aggregate an X account's post performance over a window |
| `upload` | Upload a media file |

<Note>
  All commands output JSON, making the CLI easy to use in scripts and automation pipelines.
</Note>


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