Command-line interface for Reddit via Composio — no API registration required
Browse subreddits, search posts, read comments, post and comment, and track account warm-up — all from your terminal.
Reddit's official API registration process is painful: approval delays, app reviews, and strict rate limits. Composio handles OAuth so you don't have to. Connect your Reddit account once via Composio's dashboard, then use rdt from anywhere.
No app registration. No client secrets. Just a Composio API key and a connected Reddit account.
git clone https://github.com/insightslab-ai/rdt
cd rdt
pip install -e .
# Make the wrapper executable and add to PATH
chmod +x rdt
ln -s "$(pwd)/rdt" /usr/local/bin/rdtGo to https://app.composio.dev and create a free account.
In the Composio dashboard, go to Apps → Reddit and connect your Reddit account via OAuth. This is the account rdt will act as.
Go to https://app.composio.dev/settings and copy your API key.
Create ~/.config/composio/secrets.env:
COMPOSIO_API_KEY=your_api_key_hereOr copy the example:
cp config.example.env ~/.config/composio/secrets.env
# Edit and fill in your API keyrdt setupThis fetches your Reddit connection from Composio and saves the connection ID automatically. You only need to do this once.
rdt merdt loads config in this order:
~/.config/composio/secrets.env(recommended)- Environment variables
Required:
COMPOSIO_API_KEY— your Composio API key
Optional (or auto-discovered via rdt setup):
COMPOSIO_REDDIT_CONNECTION_ID— your Reddit connected account ID
Warm-up state file (optional):
- Default:
~/.config/rdt/warm-up-state.json - Override:
RDT_WARMUP_STATE=/path/to/file.json
Discover and save your Reddit connection ID.
rdt setupShow your Reddit connection status.
rdt me
rdt me --jsonGet posts from a subreddit.
rdt feed Python
rdt feed learnprogramming --sort hot --limit 10
rdt feed MachineLearning --jsonOptions:
--sort hot|new|top|rising(default: hot)--limit N(default: 25)--time hour|day|week|month|year|all--json— raw JSON output
Search posts within a subreddit (or all of Reddit).
rdt search Python "asyncio best practices"
rdt search all "open source CLI tools" --sort top
rdt search learnpython "beginner resources" --limit 5Options:
--sort relevance|hot|top|new(default: relevance)--limit N(default: 25)--json
Use all as the subreddit to search site-wide.
Get comments on a post.
rdt comments abc123
rdt comments t3_abc123 --limit 50
rdt comments abc123 --jsonThe t3_ prefix is optional.
Fetch subreddit rules (uses Reddit's public API — no auth required).
rdt rules learnpython
rdt rules MachineLearning --jsonList available post flairs.
rdt flairs learnpythonPost a comment. Requires --confirm flag.
rdt comment t3_abc123 "Great write-up, thanks!" --confirmCreate a new post. Requires --confirm flag.
# Text post
rdt post learnpython --title "My first Python script" --text "Here's what I built..." --confirm
# Link post
rdt post Python --title "Interesting article on asyncio" --url "https://example.com/article" --confirm
# With flair
rdt post learnpython --title "Question about decorators" --text "..." --flair-id <uuid> --confirmUse rdt flairs <subreddit> to get valid flair IDs.
All write commands (comment, post) require an explicit --confirm flag. Running without it will print a warning and exit without making any changes.
# This does nothing — safe to run
rdt comment t3_abc123 "Hello world"
# ⚠️ Write action requires --confirm flag. Rerun with --confirm to proceed.
# This actually posts
rdt comment t3_abc123 "Hello world" --confirmThis prevents accidental writes when testing commands or reviewing syntax.
Fresh Reddit accounts get flagged for spam if they jump straight into posting links or promotional content. The warm-up command helps you track a healthy engagement period first.
Why warm-up matters:
- Reddit's spam filters look at account age and karma
- New accounts that only post links get shadowbanned
- Genuine comments in relevant communities build karma and credibility
- 2–4 weeks of organic activity before any promotional posts is recommended
Usage:
# Start tracking
rdt warm-up --start
# Log a genuine comment you left
rdt warm-up --log learnpython t3_abc123 "This explanation of decorators is really clear!"
# Check progress
rdt warm-up --statusState is stored at ~/.config/rdt/warm-up-state.json. Override the path with RDT_WARMUP_STATE.
Suggested warm-up checklist:
- 20+ genuine comments across 5+ different subreddits
- Comment karma > 50
- Account age > 14 days
- No comment-only account pattern (mix in occasional posts too)
These Reddit actions are not available via the Composio integration:
- Voting — no upvote/downvote endpoint
- Direct messages — no inbox access
- Moderation actions — no mod queue
Available write actions: comment, post, delete (via Composio dashboard), edit (via Composio dashboard).
MIT — see LICENSE
Built by Insights Lab