Tools
CLI
`groundsocial`: Reddit data from a terminal or a coding agent, with `--json` on every command.
Built for agents in a shell. Strict flags with did-you-mean, data on stdout and messages on stderr, and a --json envelope on every command. Install with npm i -g @groundsocial/cli or run it with npx -y @groundsocial/cli.
npx -y @groundsocial/cli initinit reuses a working key if it finds one, or creates a free account (no human needed). If signup asks a question, it prints it; run init --answer <word>.
Commands
| Command | What it does |
|---|---|
groundsocial init [--answer <word>] [--agent-name <name>] | Reuse a working key, or create a free account. |
groundsocial login | Sign in through the browser (device login). --no-wait prints the code and exits; finish with --poll. --api-key <key> stores a key; --email <address> signs in by email, needed for keys. |
groundsocial logout | Forget the stored key and session. |
groundsocial whoami | Which account and key are in use. |
groundsocial balance | Credits left. Free. |
groundsocial keys list|create <name>|revoke <key_id> | Manage keys. --daily-cap and --monthly-cap set caps on a new key. Needs login --email: a key can’t manage keys. |
groundsocial mcp | Print MCP client config for the stdio and remote servers. Edits nothing. |
groundsocial reddit <command> [args] [flags] | Read Reddit data; one command per endpoint. |
groundsocial estimate <command>[:count] … | Price a job before running it. Local and free; needs no key. |
groundsocial endpoints | Every reddit command with its price. Free. |
Reading data
The reddit commands are subreddit, subreddit-posts, post, more-comments, user, user-posts, user-comments, search-posts and search-subreddits. Path parameters (or the search query) are positional; everything else is a flag with the API’s own name. Listings take --max-pages <n> to follow the cursor.
groundsocial reddit subreddit-posts LocalLLaMA --sort new --limit 25
groundsocial reddit search-posts "self-hosted backups" --sort new --max-pages 3 --json
groundsocial estimate search-posts:100 post:20Global flags
--json: machine output on stdout,{ok: true, …}or{ok: false, error}.--api-key <key>: use this key for one command (otherwise the environment, then the config file).--api-url <url>: API base URL.--help,--version.
Errors in --json mode carry code, message, next_action and suggested_commands, and where useful likely_cause, retry_after, request_id or the signup challenge.