| name | reddit-cli |
| description | Extract content from Reddit posts via CLI (title, body, images, videos, links). Use when a user asks to read a Reddit post, extract Reddit post content, or translate a task into safe reddit-cli commands with correct flags, output format, and confirmations. |
REDDIT-CLI SKILL
Overview
reddit-cli is a terminal tool for extracting content from Reddit posts. It fetches post data via Reddit's public JSON API (no authentication required) and outputs clean text or structured JSON. Designed for AI agents to read Reddit posts without a browser.
Installation
brew install rursache/tap/reddit-cli
go install github.com/rursache/reddit-cli@latest
git clone https://github.com/rursache/reddit-cli.git
cd reddit-cli && go build -o reddit-cli .
Defaults and safety
- No configuration file needed
- No authentication or API key required
- Uses Reddit's public JSON API (appends
.json to post URLs)
- Read-only tool — makes no changes to Reddit
- 15-second request timeout
- Follows up to 5 redirects
Quick start
reddit-cli <url>: extract post content as plain text
reddit-cli --json <url>: extract post content as JSON
reddit-cli --version: print version
reddit-cli -h: show help
Usage
reddit-cli [flags] <reddit-post-url>
The URL must be a full Reddit post URL. Supported hosts:
reddit.com, www.reddit.com
old.reddit.com, new.reddit.com
np.reddit.com, m.reddit.com
Short URLs (redd.it) are not supported — use the full URL instead.
Flags
| Flag | Description |
|---|
--json | Output as JSON instead of plain text |
--version, -v | Show version and exit |
-h, --help | Show help message |
Output
Plain text (default)
Post Title
──────────
r/subreddit • u/author • 2026-01-15 12:30 UTC
Score: 1234 • Comments: 56 • Flair: Discussion • Type: text
Post body text here...
JSON (--json)
{
"title": "Post Title",
"author": "username",
"subreddit": "subreddit",
"score": 1234,
"comments": 56,
"date": "2026-01-15 12:30 UTC",
"flair": "Discussion",
"type": "text",
"body": "Post body text here..."
}
JSON fields (all optional fields omitted when empty):
title, author, subreddit, score, comments, date — always present
flair — post flair text, if set
nsfw — true if marked NSFW
spoiler — true if marked spoiler
type — one of: text, image, gallery, video, embed, link
body — self-post body text
link_url — external URL for link posts
images — array of image URLs for image/gallery posts
video_url — video URL for video posts
Supported post types
| Type | Description | Extra fields |
|---|
text | Self posts with body text | body |
link | External URL posts | link_url |
image | Single image posts (i.redd.it) | images, link_url |
gallery | Multiple image posts | images |
video | Reddit-hosted video | video_url |
embed | Embedded content (YouTube, etc.) | link_url |
Crossposts are automatically resolved to the original post's content while preserving the crosspost's metadata.
Examples
reddit-cli https://www.reddit.com/r/golang/comments/abc123/some_post/
reddit-cli --json https://www.reddit.com/r/pics/comments/def456/cool_photo/
reddit-cli https://reddit.com/r/news/comments/xyz789/breaking/ | head -5
reddit-cli --json https://www.reddit.com/r/pics/comments/abc123/gallery/ | jq -r '.images[]'
Troubleshooting
- "not a Reddit URL" — The URL must be from a supported Reddit host. Check the URL format.
- "short URLs (redd.it) are not supported" — Expand the redd.it link to a full reddit.com URL first.
- "reddit returned status 403" — Reddit may be rate-limiting or blocking the request. Try again shortly.
- "reddit returned status 404" — The post may have been deleted or the URL is incorrect.
- "no post found at this URL" — The URL is valid but returned no post data. The post may have been removed.