Skip to content

darula-hpp/coldrunner

Repository files navigation

Cold Runner

Run AI-powered cold outreach campaigns on your laptop. No cloud dependencies, no context window limits, no API costs.

Cold Runner is a desktop application that automates cold outreach (job applications, sales, partnerships) using local AI models. Unlike cloud-based tools that burn through context windows and rack up API costs, Cold Runner uses a stateless architecture that works efficiently with small, local models.

Why Cold Runner?

The Problem with Existing Tools

Tools like OpenClaw pioneered AI-powered outreach but have a critical flaw: they maintain conversation history in memory, causing context windows to grow unbounded. This means:

  • ❌ You need expensive, large-context models (32k+ tokens)
  • ❌ High compute requirements even for local inference
  • ❌ Dependency on cloud providers for practical use
  • ❌ Escalating API costs as campaigns scale

Cold Runner's Solution

We redesigned the architecture from the ground up:

  • βœ… Stateless AI calls - Each operation uses only the data it needs, no conversation history
  • βœ… Small model friendly - Works great with 7B models (Mistral, Llama 3.2)
  • βœ… Runs on laptops - 8GB RAM is enough for full functionality
  • βœ… 100% local - Your data never leaves your machine
  • βœ… Zero API costs - No OpenAI, Anthropic, or cloud inference bills

Key Features

πŸ€– Local AI-Powered

  • Uses Ollama for local inference (Mistral, Llama, Qwen, etc.)
  • Intelligent lead discovery and email generation
  • Works offline once models are downloaded
  • Built-in setup wizard for one-click Ollama installation

🎯 Multi-Source Lead Discovery

  • Brave Search API integration
  • Crunchbase, GitHub, Y Combinator scraping
  • Automated email finding (Hunter.io + pattern matching)
  • Founder/decision-maker identification

πŸ“§ Intelligent Outreach

  • AI-generated personalized emails
  • Template system with variable substitution
  • Multi-type support (jobs, sales, partnerships, investors)
  • Extensible adapter pattern for custom outreach types

⏰ Campaign Automation

  • Cron-based scheduled campaigns
  • Rate limiting and throttling
  • Campaign analytics and tracking
  • Run history with success/failure logs

πŸ’Ύ Data Chat Interface

  • Natural language queries over your outreach data
  • SQL generation with safety checks
  • Interactive data exploration
  • Export results to CSV

πŸ–₯️ Native Desktop Experience

  • Built with Electron + Next.js
  • Single-user mode (no authentication needed)
  • SQLite database (portable, no server required)
  • Cross-platform (macOS, Windows, Linux)

Architecture Highlights

Cold Runner's architecture is designed for efficiency and developer experience:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Electron (Desktop Shell)                      β”‚
β”‚  - Window management                           β”‚
β”‚  - Native OS integration                       β”‚
β”‚  - Hidden background server process            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Next.js 15 (Backend Server)                   β”‚
β”‚  - API routes for all operations               β”‚
β”‚  - Standalone build (self-contained)           β”‚
β”‚  - React 19 UI                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Core Modules                                   β”‚
β”‚  - Lead finder (multi-source)                  β”‚
β”‚  - Job scheduler (cron-based)                  β”‚
β”‚  - Adapter system (extensible outreach types)  β”‚
β”‚  - Setup wizard (Ollama installation)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Data Layer                                     β”‚
β”‚  - SQLite with better-sqlite3                  β”‚
β”‚  - Umzug migrations (industry-standard)        β”‚
β”‚  - 278 tests (unit + property-based)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Design Decisions:

  • Stateless AI: Each LLM call is independent, no conversation history
  • Webpack over Turbopack: Better native module support for production
  • Explicit externals: Native modules (better-sqlite3, playwright) properly externalized
  • Dynamic ports: Prevents conflicts when running multiple instances

Quick Start

Prerequisites

  • Node.js 18+ and npm
  • macOS, Windows, or Linux
  • 8GB RAM minimum (16GB recommended)

Installation

# Clone the repository
git clone https://github.com/darula-hpp/cold-runner.git
cd cold-runner

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys (Brave Search, Hunter.io)

# Run database migrations
npm run migrate

# Start development server
npm run electron:dev

The app will:

  1. Launch the Electron window
  2. Start the Next.js dev server on port 3000
  3. Open the setup wizard if Ollama isn't installed

Building for Production

# macOS
npm run dist:mac

# Windows
npm run dist:win

# Linux
npm run dist:linux

The built app will be in the dist/ folder.

Configuration

Required API Keys

Add these to your .env file:

# Brave Search (for lead discovery)
BRAVE_API_KEY=your-brave-api-key

# Hunter.io (for email finding)
HUNTER_API_KEY=your-hunter-api-key

# Ollama (local AI)
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=mistral

Recommended Ollama Models

Cold Runner works with any Ollama model, but we recommend:

  • mistral (7B) - Best balance of speed and quality
  • llama3.2 (3B) - Fastest, good for high-volume campaigns
  • qwen2.5 (7B) - Excellent for technical content

Install a model:

ollama pull mistral

Usage

1. Set Up Your Profile

Configure your regions, templates, and outreach preferences in Settings.

2. Discover Leads

Use the Lead Search to find companies and contacts:

  • Enter search queries (e.g., "YC startups hiring engineers")
  • AI automatically enriches with emails and decision-makers
  • Review and save promising leads

3. Create Campaigns

Schedule automated outreach campaigns:

  • Select lead type (jobs, sales, etc.)
  • Choose template and customize
  • Set schedule (cron expression)
  • Monitor results in real-time

4. Track Performance

Use the Data Chat interface to analyze your campaigns:

  • "Show me all applications sent this week"
  • "Which companies have the highest response rate?"
  • "Export all leads from San Francisco"

Development

Project Structure

cold-runner/
β”œβ”€β”€ app/                    # Next.js app directory
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”œβ”€β”€ chat/              # Data chat interface
β”‚   β”œβ”€β”€ setup/             # Setup wizard
β”‚   └── outreach-scheduler/# Campaign management
β”œβ”€β”€ modules/               # Core business logic
β”‚   β”œβ”€β”€ lead-finder/       # Multi-source lead discovery
β”‚   β”œβ”€β”€ scheduler/         # Cron job management
β”‚   β”œβ”€β”€ setup/             # Ollama installation
β”‚   └── adapters/          # Outreach type adapters
β”œβ”€β”€ agent-core/            # AI/LLM integration
β”œβ”€β”€ db/                    # Database and migrations
β”œβ”€β”€ electron/              # Electron main process
└── __tests__/             # Test suites

Running Tests

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Watch mode
npm run test:watch

Database Migrations

# Run pending migrations
npm run migrate

# Check migration status
npm run migrate:status

# Create new migration
npm run migrate:create my-migration-name

# Rollback last migration
npm run migrate:rollback

# Fresh database (dev only)
npm run migrate:fresh

Extending Cold Runner

Adding a New Outreach Type

Cold Runner uses an adapter pattern for different outreach types:

// modules/adapters/my-adapter.ts
import { BaseAdapter } from './base';

export class MyAdapter extends BaseAdapter {
  async generateEmail(target: any, template: string): Promise<string> {
    // Your custom email generation logic
  }
  
  async enrichTarget(target: any): Promise<any> {
    // Your custom enrichment logic
  }
}

// Register in modules/adapters/registry.ts
registry.register('my-type', new MyAdapter());

Adding a New Lead Source

Implement the discovery source interface:

// modules/lead-finder/sources/my-source.ts
export async function searchMySource(query: string): Promise<Lead[]> {
  // Your scraping/API logic
  return leads;
}

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Areas We'd Love Help With

  • Windows/Linux testing and bug fixes
  • Additional lead sources (LinkedIn, Apollo, etc.)
  • More outreach adapters (investor outreach, PR, etc.)
  • UI/UX improvements
  • Documentation and tutorials

Roadmap

  • Multi-user support with authentication
  • Cloud sync (optional, for backup)
  • Browser extension for one-click lead capture
  • A/B testing for email templates
  • Response tracking and follow-up automation
  • Integration with email providers (Gmail, Outlook)
  • Mobile companion app

License

MIT License - see LICENSE for details.

Acknowledgments

  • Inspired by OpenClaw's vision of AI-powered outreach
  • Built with Ollama for local AI inference
  • Uses Next.js and Electron

Built with ❀️ for developers who want to own their outreach infrastructure.

About

Run AI-powered cold outreach campaigns on your laptop. No cloud dependencies, no context window limits, no API costs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors