Skip to content

Reddit

Mode: 🔐 Browser · Domain: reddit.com

Commands

CommandDescription
opencli reddit hotHot posts from a subreddit (or frontpage if none)
opencli reddit frontpageFrontpage / r/all listing
opencli reddit homePersonalized Best feed (requires login)
opencli reddit popularTrending posts on /r/popular
opencli reddit searchSearch posts
opencli reddit subredditPosts from a specific subreddit, with sort and time filters
opencli reddit subreddit-infoSubreddit metadata (subscribers, active, NSFW, created, description)
opencli reddit readRead a post thread with comments
opencli reddit userView a user profile
opencli reddit user-postsA user's submitted posts
opencli reddit user-commentsA user's comments
opencli reddit whoamiShow the currently logged-in Reddit identity
opencli reddit upvoteVote on a post or comment
opencli reddit saveSave / unsave a post or comment
opencli reddit commentComment on a post
opencli reddit replyReply to a comment
opencli reddit subscribeJoin / leave a subreddit
opencli reddit subscribedList subreddits you are subscribed to
opencli reddit savedList your saved items
opencli reddit upvotedList your upvoted posts

Usage Examples

bash
# Quick start
opencli reddit hot --limit 5

# Read one subreddit
opencli reddit subreddit python --limit 10

# Subreddit metadata (subscribers / active / NSFW / created / description)
opencli reddit subreddit-info AskReddit

# Personalized Best feed (requires login)
opencli reddit home --limit 10

# Who am I logged in as?
opencli reddit whoami

# Subscribed subreddits (requires login)
opencli reddit subscribed --limit 50

# Read a post thread
opencli reddit read 1abc123 --depth 2

# Read with "more comments" expansion via /api/morechildren.json
opencli reddit read 1abc123 --depth 3 --expand-more --expand-rounds 3

# Comment on a post
opencli reddit comment 1abc123 "Great post"

# Reply to a comment
opencli reddit reply okf3s7u "Thanks for the context"

# JSON output
opencli reddit hot -f json

# Verbose mode
opencli reddit hot -v

Auth-required commands

whoami, home, subscribed, saved, upvoted, subscribe, upvote, save, comment, and reply all require a logged-in reddit.com cookie session. When the session is missing or expired they raise AuthRequiredError (exit code 5) instead of silently returning empty rows.

For subreddit-info, missing / banned / private / quarantined subreddits raise EmptyResultError (exit code 6) so the output table never contains a silent sentinel row.

For read, deleted / quarantined / private posts (HTTP 401/403/404 on /comments/<id>.json) also raise EmptyResultError. --expand-more follows Reddit's "more comments" stubs by calling /api/morechildren.json up to --expand-rounds times (default 2, max 5). If the morechildren endpoint itself rejects the request with 401/403, that's surfaced as AuthRequiredError because writeable/expand endpoints often require a logged- in session even though the post listing is public.

Prerequisites

Released under the Apache-2.0 License.