CLI Reference
Install and use @reddgrow/cli to query Reddit data from the terminal or shell scripts
@reddgrow/cli is the official command-line interface for the ReddGrow API. It supports both interactive human-readable output and raw JSON for scripting and AI agent pipelines.
Installation
# npm
npm install -g @reddgrow/cli
# yarn
yarn global add @reddgrow/cli
# pnpm
pnpm add -g @reddgrow/cli
# bun
bun add -g @reddgrow/cliVerify the install:
reddgrow --versionQuick Start
1. Save your API key
reddgrow auth login rg_your_key_here2. Verify the connection
reddgrow auth whoami3. Make your first data request
reddgrow subreddits about MachineLearningCommand Groups
| Group | Alias | Description |
|---|---|---|
| auth | — | Manage API key and connection |
| subreddits | r | Community data, posts, comments, rules, wiki |
| posts | — | Post search, batch fetch, comments, duplicates |
| users | u | User profiles and activity history |
| domains | d | Track Reddit mentions of any domain |
Global Options
| Flag | Description |
|---|---|
--mode agent | Force raw JSON output |
--mode human | Force rich colored output |
--help | Show help for any command |
--version | Print installed version |
Further Reading
- Auth — Login, logout, and connection status
- Subreddits — All 10 subreddit commands
- Posts — Post search and retrieval
- Users — User profile and history
- Domains — Domain mention tracking
- Output Modes — Human vs agent mode
- Configuration — Environment variables and config file