Skip to content

Repository files navigation

🚀 Reddit Growth Agent

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


✨ What Is It?

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:

  1. 🧠 Startup Analysis — Breaks down your value prop, identifies your ICP (Ideal Customer Profile), and finds the best subreddits to target.
  2. 📡 Subreddit Research — Fetches real top posts from each subreddit so the AI understands what actually performs well.
  3. 🎭 Vibe Reports — Generates a "vibe check" for each subreddit: tone, slang, unwritten rules, what gets upvoted vs. downvoted.
  4. ✍️ Post Generation — Creates multiple ready-to-post Reddit entries tailored to each subreddit's culture and your startup's story.
  5. 🔄 Interactive Refinement — Chat with the AI to tweak and polish your posts until they're perfect.
  6. 💾 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.


📁 Project Structure

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

🛠️ Getting Started

1. Install dependencies

npm install

2. Set up environment variables

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

3. Set up the Reddit Cookie

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)
  1. Open reddit.com in your browser while logged in
  2. Open Developer Tools (F12 or Cmd+Opt+I)
  3. Go to the Network tab
  4. Refresh the page
  5. Click on any request made to www.reddit.com
  6. In the Headers section, find Cookie: under Request Headers
  7. Copy the entire value (it's one long string)
  8. Paste it into your .env file:
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.

4. Run the agent

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

🤝 Contributing

Contributors are welcome! Whether it's improving the AI prompts, adding new features, squashing bugs, or enhancing docs — all contributions are appreciated.

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request


Built with ❤️ for indie hackers and startup founders

Go get those users. 🎯

About

AI-powered Reddit marketing strategist & post generator agent for startups organic customer acquisition

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages