{"id":30354144,"url":"https://github.com/mascanho/ruddit","last_synced_at":"2025-08-19T02:05:56.326Z","repository":{"id":309250222,"uuid":"1035202922","full_name":"mascanho/ruddit","owner":"mascanho","description":"CLI to interact with Reddit's API to programatically retrieve data  ","archived":false,"fork":false,"pushed_at":"2025-08-18T18:26:19.000Z","size":1882,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-18T20:34:47.465Z","etag":null,"topics":["cli","data","marketing","rust","rust-lang","rustlang","sales"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mascanho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-09T21:54:12.000Z","updated_at":"2025-08-18T18:26:23.000Z","dependencies_parsed_at":"2025-08-10T21:25:31.080Z","dependency_job_id":null,"html_url":"https://github.com/mascanho/ruddit","commit_stats":null,"previous_names":["mascanho/ruddit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mascanho/ruddit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascanho%2Fruddit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascanho%2Fruddit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascanho%2Fruddit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascanho%2Fruddit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mascanho","download_url":"https://codeload.github.com/mascanho/ruddit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascanho%2Fruddit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271088140,"owners_count":24697081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","data","marketing","rust","rust-lang","rustlang","sales"],"created_at":"2025-08-19T02:04:22.520Z","updated_at":"2025-08-19T02:05:56.300Z","avatar_url":"https://github.com/mascanho.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/mascanho/ruddit/blob/master/src/public/ruddit.png\" alt=\"Ruddit Logo\" width=\"200\" style=\"border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); margin: 20px 0;\"\u003e\n  \u003ch1\u003eRuddit\u003c/h1\u003e\n\u003c/div\u003e\n\n**Ruddit** is a command-line (CLI) application for interacting with Reddit and leveraging Google's Gemini AI, built with Rust.\n\n## ✨ Features\n\n- **Reddit API Interaction**: Connects to the Reddit API to fetch posts from subreddits and perform searches.\n- **Gemini AI Integration**: Uses Google's Gemini AI to analyze and answer questions based on the collected Reddit data, providing structured JSON responses.\n- **Lead Generation**: Automatically generate leads from the collected Reddit data using Gemini AI.\n- **Command-Line Interface**: All operations are performed through a comprehensive set of commands using `clap`.\n- **Database Storage**: Uses a local SQLite database to store Reddit post data.\n- **Data Export**: Export collected data to Excel format.\n- **Secure API Key Management**: Securely stores and manages your Reddit and Gemini API keys in a configuration file.\n\n## 🚀 Installation\n\nTo install Ruddit, you need to have Rust and Cargo installed. If you don't, follow the instructions on the [official Rust website](https://www.rust-lang.org/tools/install).\n\nOnce Rust is set up, clone the repository and install the application:\n\n```bash\ngit clone https://github.com/mascanho/ruddit.git\ncd ruddit\ncargo install --path .\n```\n\nThis will install the `ruddit` executable in your Cargo bin directory (usually `~/.cargo/bin`), making it available from anywhere in your terminal.\n\n## ⚙️ Configuration\n\nBefore using Ruddit, you need to configure your Reddit and Gemini API keys.\n\n1. **Create a Reddit App**: Go to your [Reddit apps](https://www.reddit.com/prefs/apps) page and create a new \"script\" app.\n2. **Get a Gemini API Key**: Obtain a Gemini API key from [Google AI Studio](https://aistudio.google.com/app/apikey).\n3. **Set API Keys**: When you first run `ruddit`, it will create a `settings.toml` file in your system's config directory. You can also run `ruddit --settings` to open the configuration file for editing.\n\n   - **Linux:** `~/.config/ruddit/settings.toml`\n   - **macOS:** `~/Library/Application Support/ruddit/settings.toml`\n   - **Windows:** `C:\\Users\\\u003cYourUser\u003e\\AppData\\Roaming\\ruddit\\settings.toml`\n\n   The `settings.toml` file will look like this:\n\n   ```toml\n   [api_keys]\n   REDDIT_API_ID = \"your_api_id_here\"\n   REDDIT_API_SECRET = \"your_api_secret_here\"\n   GEMINI_API_KEY = \"your_api_key_here\"\n   SUBREDDIT = \"supplychain\"\n   RELEVANCE = \"hot\"\n   ```\n\n## 💻 Usage\n\nRuddit provides several command-line options to interact with Reddit and Gemini.\n\n### Fetching Reddit Posts\n\nFetch posts from a specific subreddit and relevance (hot, new, top, etc.).\n\n```bash\nruddit --subreddit \u003csubreddit_name\u003e --relevance \u003crelevance\u003e\n```\n\nIf no subreddit or relevance is provided, it will default to `supplychain` and `hot`.\n\n### Searching Reddit\n\nSearch for posts on Reddit with a specific query.\n\n```bash\nruddit --find \"\u003csearch_query\u003e\" --relevance \u003crelevance\u003e\n```\n\n### Interacting with Gemini AI\n\nAsk a question to the Gemini AI based on the data stored in the local database.\n\n```bash\nruddit --gemini \"\u003cyour_question\u003e\"\n```\n\n### Generating Leads with Gemini AI\n\nAutomatically generate leads from the collected Reddit data using Gemini AI.\n\n```bash\nruddit --leads\n```\n\n### Exporting Data\n\nExport the collected Reddit data to an Excel file. The file will be saved in a `Reddit_data` folder on your desktop.\n\n```bash\nruddit --export\n```\n\n### Clearing the Database\n\nClear all the data from the local SQLite database.\n\n```bash\nruddit --clear\n```\n\n### Managing Settings\n\nOpen the `settings.toml` configuration file for editing.\n\n```bash\nruddit --settings\n```\n\n### Adding API Keys\n\nAdd your Reddit API key directly from the command line.\n\n```bash\nruddit --apikey \u003cyour_api_key\u003e\n```\n\n## 🛠️ Technologies Used\n\n- [Rust](https://www.rust-lang.org/)\n- [Reqwest](https://docs.rs/reqwest/latest/reqwest/) (for HTTP requests to the Reddit API)\n- [Serde](https://serde.rs/) (for serialization/deserialization)\n- [Tokio](https://tokio.rs/) (for asynchronous operations)\n- [Clap](https://docs.rs/clap/latest/clap/) (for argument parsing)\n- [Rusqlite](https://docs.rs/rusqlite/latest/rusqlite/) (for SQLite database)\n- [Chrono](https://docs.rs/chrono/latest/chrono/) (for date and time)\n- [TOML](https://docs.rs/toml/latest/toml/) (for configuration file parsing)\n- [Rust XlsxWriter](https://docs.rs/rust_xlsxwriter/latest/rust_xlsxwriter/) (for writing Excel files)\n- [gemini-rust](https://crates.io/crates/gemini-rust) (for interacting with the Gemini API)\n\n## 🙌 Contributing\n\nContributions are welcome! If you have ideas for new features or find a bug, please open an issue or submit a pull request.\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmascanho%2Fruddit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmascanho%2Fruddit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmascanho%2Fruddit/lists"}