AI-powered Reddit marketing strategist & post generator for startups
Node.js SQLite OpenRouter License: ISC
Analyze your startup β Research subreddits β Understand the vibe β Generate authentic posts
Reddit Growth Agent (v2) is an interactive CLI tool that helps startups gain their first users from Reddit β powered by AI. It walks you through a complete Reddit marketing workflow:
- π§ Startup Analysis β Breaks down your value prop, identifies your ICP (Ideal Customer Profile), and finds the best subreddits to target.
- π‘ Subreddit Research β Fetches real top posts from each subreddit so the AI understands what actually performs well.
- π Vibe Reports β Generates a "vibe check" for each subreddit: tone, slang, unwritten rules, what gets upvoted vs. downvoted.
- βοΈ Post Generation β Creates multiple ready-to-post Reddit entries tailored to each subreddit's culture and your startup's story.
- π Interactive Refinement β Chat with the AI to tweak and polish your posts until they're perfect.
- πΎ Export β Save everything to Markdown files for easy use.
All research and generated content is cached in a local SQLite database, so you never lose progress and can pick up where you left off.
| File | Description |
|---|---|
index.js |
π Entry point β Runs the interactive CLI menu and orchestrates the full workflow |
api.js |
π€ AI & I/O β Handles OpenRouter API calls and readline-based user input |
db.js |
ποΈ Database β SQLite operations for startups, subreddits, vibe reports, and posts |
prompts.js |
π Prompt templates β All AI system prompts for analysis, vibes, and post generation |
reddit.js |
π‘ Reddit fetcher β Pulls top posts from subreddits via Reddit's .json endpoints |
scraper.js |
π Website scraper β Extracts context from your startup's website automatically |
workflows.js |
βοΈ Workflow engine β Core logic for each step: analysis, research, vibes, generation, refinement, export |
.env.example |
π Config template β Template for required environment variables |
package.json |
π¦ Dependencies β Project metadata and npm scripts |
npm install
cp .env.example .env
Open .env and add your OpenRouter API key (get one at openrouter.ai/keys):
OPENROUTER_API_KEY=sk-or-v1-your-key-here OPENROUTER_MODEL=google/gemini-2.5-flash
Important
This step is required. Reddit blocks unauthenticated requests to its .json endpoints with a 403 Forbidden. The agent bypasses this by using your browser's session cookie β no official API keys or OAuth needed.
πͺ How to get your Reddit cookie (click to expand)
- Open reddit.com in your browser while logged in
- Open Developer Tools (
F12orCmd+Opt+I) - Go to the Network tab
- Refresh the page
- Click on any request made to
www.reddit.com - In the Headers section, find
Cookie:under Request Headers - Copy the entire value (it's one long string)
- Paste it into your
.envfile:
REDDIT_COOKIE=reddit_session=abc123; edgebucket=xyz; ...
[!NOTE] The cookie is a long string β paste it all on one line, no quotes needed. It may expire after a while; just repeat these steps to get a fresh one.
npm start
You'll be greeted with an interactive menu:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Reddit Growth Agent v2 π β
β AI post generator with SQLite caching β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π MAIN MENU
0. π Run Full Flow (Analysis β Research β Vibes β Posts)
1. βΆοΈ Run Startup Analysis & ICP
2. βΆοΈ Fetch Subreddit Research
3. βΆοΈ Generate Vibe Reports
4. βοΈ Generate Reddit Posts
5. π View Saved Posts
6. π Refine Posts (interactive)
7. πΎ Export All Posts to Markdown
8. π Switch Startup
9. β Exit
Contributors are welcome! Whether it's improving the AI prompts, adding new features, squashing bugs, or enhancing docs β all contributions are appreciated.
- Fork the repo
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Built with β€οΈ for indie hackers and startup founders
Go get those users. π―