Introducing Reddit Bot CLI, the powerful command-line tool that keeps you engaged in your favorite subreddits effortlessly. Monitor keywords, respond automatically, and customize settings with just a few commands. Say goodbye to missing out on relevant discussions—let the Reddit Bot CLI amplify your online voice!
Reddit Bot CLI is a command-line tool that automatically monitors specific subreddits for keywords and posts comments when those keywords are found. This tool is ideal for automating responses to relevant Reddit posts.
.ini file.To install the Reddit Bot CLI, use pip:
pip install reddit-bot-cli
The bot requires a configuration file to store your Reddit API credentials and bot settings. You can create the configuration interactively using the following command:
reddit-bot-cli --create-config
This will prompt you for the required information:
The configuration will be saved in a file (e.g., config.ini).
Alternatively, you can manually create the config.ini file in the following format:
[reddit]
client_id = YOUR_CLIENT_ID
client_secret = YOUR_CLIENT_SECRET
username = YOUR_USERNAME
password = YOUR_PASSWORD
user_agent = YOUR_USER_AGENT
[bot_settings]
subreddits = subreddit1, subreddit2
keywords = keyword1, keyword2
comment_text = This is an automated comment matching one of the keywords!
http://localhost:8080.reddit-bot-cli/1.0).Once the configuration is ready, you can start the bot by running:
reddit-bot-cli --config /path/to/config.ini
Example:
reddit-bot-cli --config reddit_bot/config.ini
The bot will start monitoring the specified subreddits and post comments when it finds matching keywords.
--config : Specify the path to your configuration file (default: config.ini).--create-config : Create a new configuration file interactively.All bot activity is logged to the logs/bot.log file. You can check this file to see when the bot found a post and posted a comment.
If you want to contribute to this project or run it locally, you can clone the repository and install dependencies in a virtual environment:
git clone https://github.com/VashonG/reddit-bot-cli.git
cd reddit-bot-cli
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
pip install -r requirements.txt
To run the bot:
python -m reddit_bot.cli --config reddit_bot/config.ini
This project is licensed under the MIT License - see the LICENSE file for details.
Notes:
YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, YOUR_USERNAME, YOUR_PASSWORD, and YOUR_USER_AGENT in the example config with actual values.No comments yet.
Sign in to be the first to comment.