RedCli
reddit client for cli with python , enjoy!
Install / Use
/learn @samunder12/RedCliREADME
🎮 CursesReddit TUI v0.3: Browse Reddit like a Terminal Pro 🚀
Tired of endless scrolling, distracting sidebars, and resource-hogging browser tabs just to check Reddit? CursesReddit TUI strips it all away, giving you a pure, fast, keyboard-first Reddit experience right in your terminal.
Think newsboat but for Reddit. It's lightweight, built with Python and curses, configured via a simple config.ini, and designed for terminal lovers.
✨ What's New in v0.3
- Config File: No more hardcoding secrets! Credentials, user agent, and subreddits are now stored in
config.ini. (Safer for sharing!) - Load More Comments: Hit
lon a "Load More" item in the comments view to fetch the replies. - Better Loading: Panes now show a clear "Loading..." message during data fetches.
- Stickied Indicator: Stickied posts are marked with
[S]. - Comment Selection: The entire selected comment block is highlighted for clarity.
✨ Core Features
- Configurable Subreddit Hopping: Browse your fave subs (defined in
config.ini). - Post Glancer: Quickly view the latest posts (titles, score, author, time, stickied).
- Link vs. Text: See instantly if it's a link
[L]or text[T]post. - Distraction-Free Reading: View post selftext or link URLs without leaving the terminal.
- Comment Diving: Read comment threads with indentation, depth colors, and load more functionality.
- Browser Escape Hatch: Quickly open post links or comment permalinks in your default browser (
okey!). - Keyboard Is King: Navigate everything with keys (Vim/
less/newsboatstyle). - Lightweight AF: Uses minimal resources thanks to
curses. Runs smooth even on a potato. 🥔 - Looks Legit: That sweet, sweet terminal aesthetic.
👍 The Good Stuff (Pros)
- Seriously Fast:
cursesleaves web browsers in the dust. Low RAM and CPU usage. - Zero Distractions: No ads, no suggested posts, no flashy avatars. Just the content you want. Pure focus mode.
- Keyboard Wizardry: Navigate Reddit at the speed of thought (or typing). Perfect for keyboard addicts.
- Terminal Native: Fits perfectly into your
tmuxorscreenworkflow. Impress your friends. - Bandwidth Friendly: Fetches primarily text via the API. Great for crappy Wi-Fi or mobile hotspots.
- Configurable: Easily change subreddits and settings in
config.ini. - Safer: Credentials stored externally, not directly in the script.
👎 The Real Talk (Cons / Limitations)
- Read-Only Zone: Still for browsing. You cannot vote, comment, post, send messages, check your inbox, etc.
- Text Is King: No images, videos, or fancy embeds are displayed directly in the terminal. Use 'Open Link' (
o). - API Key Needed: You still gotta set up your own Reddit API key (see Setup).
- API Limits Apply: You're using the free Reddit API tier. Normal browsing is fine, but excessive refreshing could hit limits.
- Basicville: No multi-account support, advanced search/filtering, comment collapsing/replying, or saved posts. Simple on purpose.
- Blocking IO: Fetching posts/comments still blocks the UI briefly on slow connections. Patience needed.
- Terminal Funks:
curseslooks/acts slightly differently depending on your terminal/OS. - 'Load More' is Basic: Loading more comments replaces the placeholder; fine-grained loading isn't implemented.
🔧 Requirements
- Python 3.x (3.7+ recommended)
- A Reddit Account
- Reddit API Credentials (See Setup!)
- Python Libraries:
prawwindows-curses(ONLY if you're on Windows)
🛠️ Setup - Get Ready to Rock
-
Clone or Download:
git clone https://your-repo-url-here/curses-reddit-tui.git cd curses-reddit-tui(Or download the
.pyscript) -
Install Python Stuff:
pip install prawIf you are on Windows:
pip install windows-curses -
Get Reddit API Keys:
- (If you did this before, you can reuse your keys!)
- Go to: https://www.reddit.com/prefs/apps
- Click "are you a developer? create an app...".
- Name:
MyCursesClient(or similar) - Select
scriptapp type. - Redirect URI:
http://localhost:8080 - Click "create app".
- Copy your Client ID (under app name) and Client Secret.
-
Create
config.ini:- The script will automatically create a default
config.inithe first time you run it if it doesn't exist, and then exit. - Open the generated
config.inifile. - Fill in the
[Credentials]section:ClientID = YOUR_CLIENT_ID_HEREClientSecret = YOUR_CLIENT_SECRET_HEREUsername = YOUR_REDDIT_USERNAMEPassword = YOUR_REDDIT_PASSWORDUserAgent = CursesRedditClient/0.3 by YOUR_REDDIT_USERNAME(Customize this!)
- Customize the
[Settings]section:Subreddits = commandline, linux, python(Change to your preferred subs, comma-separated)- Adjust
PostLimitorCommentLimitif desired.
- Save the file.
- The script will automatically create a default
-
IMPORTANT (If using Git): Add
config.inito your.gitignorefile! You do NOT want to accidentally commit your secret credentials. Create a file named.gitignorein the same directory if it doesn't exist, and add this line:config.ini -
Run It!
python reddit_curses_v3.py- It should now read your
config.iniand authenticate directly. If there's an issue with the config, it might fall back to prompting you.
- It should now read your
⌨️ How to Use It (Keybindings)
General:
q: Quit the application (in List View)
List View (Subreddits / Posts):
Up / k: Move selection upDown / j: Move selection downPgUp/PgDn: Scroll list page up/downHome/End: Jump to top/bottom of listTab: Switch focus between Subreddit pane (left) and Post pane (right)Enter:- On Subreddit: Load posts & focus Post pane
- On Post: Switch to Post View
c: (When post selected) Switch to Comments Viewo: (When post selected) Open post URL in web browserr: Refresh posts for the current subreddit
Post View (Reading Selftext/Link):
Arrows/jk/PgUp/PgDn/Home/End: Scroll contento: Open post's URL/Permalink in browserq / Esc: Go back to List View
Comments View:
Up / k: Select previous comment objectDown / j: Select next comment objectPgUp/PgDn: Scroll visible comment lines page up/downHome/End: Jump to top/bottom comment & scroll viewl: (When "Load More" selected) Attempt to load more replieso: Open the original post's Permalink in browserq / Esc: Go back to List View
🤝 Contributing
Fork it, fix it, feature it!
- Open an Issue for bugs/suggestions.
- Submit Pull Requests. Ideas: Async fetching, comment collapsing, better error handling...
Keep calm and terminal on! 😎
