| name | reddit-cli |
| version | 1.0.2 |
| description | Reddit CLI using cookies for authentication. Read posts, search, and get subreddit info. |
| author | kelsia14 |
Reddit CLI
Read Reddit using your session cookies. No API key needed.
Quick start
reddit-cli posts programming 10
reddit-cli posts gaming 5 top
reddit-cli search "python tutorial"
reddit-cli search "help" --sub linux
reddit-cli info AskReddit
reddit-cli check
Commands
Get posts from subreddit
reddit-cli posts <subreddit> [limit] [sort]
- limit: number of posts (default: 10)
- sort: hot, new, top, rising (default: hot)
Search Reddit
reddit-cli search <query> [--sub <subreddit>] [limit]
Get subreddit info
reddit-cli info <subreddit>
Check connection
reddit-cli check
Environment
Set these in ~/.bashrc:
export REDDIT_SESSION="your_reddit_session_cookie"
export TOKEN_V2="your_token_v2_cookie"
Getting cookies
- Go to reddit.com (logged in)
- DevTools (F12) → Application → Cookies → reddit.com
- Copy
reddit_session value
- Optionally copy
token_v2 value
Notes
- Cookies expire, you may need to refresh them periodically
- Respects Reddit's rate limits
- For personal use only