Skip to content

Repository files navigation

Gary

AI agent for marketing & go-to-market. Like Claude Code, but for growth.

 ██████╗ █████╗ ██████╗ ██╗ ██╗
██╔════╝ ██╔══██╗██╔══██╗╚██╗ ██╔╝
██║ ███╗███████║██████╔╝ ╚████╔╝
██║ ██║██╔══██║██╔══██╗ ╚██╔╝
╚██████╔╝██║ ██║██║ ██║ ██║
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝

What is Gary?

Gary is an open-source CLI agent that helps you with marketing and go-to-market tasks. It connects to your marketing platforms, runs research, writes copy, audits funnels, and executes strategy -- all from your terminal.

Think of it as having a senior marketing hire that can:

  • Audit your SEO and give prioritized fixes
  • Write landing page copy grounded in your product context
  • Analyze competitor positioning and find gaps
  • Plan launch strategies with specific channel recommendations
  • Optimize conversion funnels with data-backed suggestions
  • Research market trends and benchmark data
  • Connect to your analytics, ads, email, and CRM platforms

Installation

Prerequisites

  • Bun v1.0+ (the JavaScript runtime)
  • At least one LLM API key (OpenAI, Anthropic, Google, xAI, or use Ollama for free local models)

Setup

# 1. Clone the repo
git clone https://github.com/deorbiting/gary.git
cd gary
# 2. Install dependencies
bun install
# 3. Set up your API keys
cp env.example .env

Open .env and add at minimum one LLM key:

# Pick one (or more):
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AI...

Optionally add keys for your marketing platforms (analytics, SEO, ads, email, CRM, payments). See env.example for the full list.

Or run /init after starting Gary for a guided setup wizard.

Run

bun run start

Or in watch mode during development:

bun run dev

Usage

Gary is an interactive CLI agent. Type your marketing question or task and press Enter. Gary will use its tools and skills to research, analyze, and execute.

Example prompts

Audit my landing page at https://example.com and suggest improvements
Write a cold email sequence for a B2B SaaS targeting CFOs
What are the top 10 keywords my competitor ranks for that I don't?
Create a launch strategy for a new feature targeting enterprise users
Analyze my signup funnel and find the biggest drop-off points

Direct Skill & Tool Invocation

Run any skill or tool directly from the command line:

/skill seo-audit https://example.com # Run SEO audit on a site
/skill copywriting # Run the copywriting skill
/skill cold-email B2B SaaS targeting CFOs # Write cold emails for an audience
/skill launch-strategy # Plan a product launch
/tool web_search competitor analysis # Search the web
/tool web_fetch https://example.com # Fetch and read a page
/tool browser https://example.com # Screenshot a live site
/tool marketing_search GA4 traffic # Query your analytics

Without arguments, /skill and /tool list all available options.

Slash Commands

Type / to see autocomplete suggestions. Available commands:

CommandDescription
/initSet up Gary (API keys, platforms, context)
/help [command]Show commands, or detailed help for a specific command
/modelSwitch LLM provider and model
/skill <name> [args]Run a specific marketing skill
/tool <name> [args]Run a specific tool directly
/skillsList all loaded marketing skills
/toolsList all available tools
/mcpManage MCP (Model Context Protocol) servers
/configShow current configuration
/contextShow product marketing context status
/historyBrowse past conversations
/export [filename]Save last response to a markdown file
/clearClear conversation history
/exitExit Gary

Keyboard Shortcuts

KeyAction
EnterSubmit query
EscapeCancel current operation / close overlay
Ctrl+CCancel or exit
Up/DownNavigate input history
TabAccept autocomplete suggestion
?Show keyboard shortcuts & commands overlay

Multi-Provider LLM Support

Gary supports 8 LLM providers. Switch anytime with /model:

ProviderModelsEnv Variable
OpenAIgpt-5.2, gpt-4.1, etc.OPENAI_API_KEY
Anthropicclaude-4.5-sonnet, claude-haiku, etc.ANTHROPIC_API_KEY
Googlegemini-3-flash, gemini-2.5-pro, etc.GOOGLE_API_KEY
xAIgrok-4-1, grok-4-1-fast, etc.XAI_API_KEY
DeepSeekdeepseek-chat, deepseek-reasonerDEEPSEEK_API_KEY
Moonshotkimi-k2, etc.MOONSHOT_API_KEY
OpenRouterAny model on openrouter.aiOPENROUTER_API_KEY
OllamaAny local modelOLLAMA_BASE_URL

Marketing Skills (33 built-in)

Gary ships with 33 marketing skills that provide specialized workflows and best practices:

CategorySkills
SEOseo-audit, ai-seo, programmatic-seo, site-architecture, schema-markup
Copy & Contentcopywriting, copy-editing, cold-email, email-sequence, social-content, content-strategy
CROpage-cro, signup-flow-cro, onboarding-cro, form-cro, popup-cro, paywall-upgrade-cro
Adspaid-ads, ad-creative
Analyticsanalytics-tracking, ab-test-setup
Strategymarketing-ideas, marketing-psychology, launch-strategy, pricing-strategy, competitor-alternatives, product-marketing-context
Researchsocial-research
Growthfree-tool-strategy, referral-program, churn-prevention
Salesrevops, sales-enablement

Skills are loaded automatically. Use /skills to list them, or /skill <name> to run one directly.

Adding Custom Skills

Create a SKILL.md file in any of these locations:

.gary/skills/<skill-name>/SKILL.md # Project-level
~/.gary/skills/<skill-name>/SKILL.md # User-level (all projects)
.agents/skills/<skill-name>/SKILL.md # Compatible with npx skills add

Each SKILL.md has YAML frontmatter with name and description, followed by markdown instructions that guide Gary's behavior when the skill is activated.

Platform Integrations

Connect to your marketing stack via API keys in .env:

CategoryPlatforms
AnalyticsGA4, PostHog, Mixpanel, Amplitude
SEOAhrefs, SEMrush, Google Search Console
AdsGoogle Ads, Meta Ads, LinkedIn Ads, TikTok Ads
EmailMailchimp, Klaviyo, Resend, SendGrid
CRMHubSpot, Intercom
PaymentsStripe, Paddle
SearchExa, Perplexity, Tavily

MCP (Model Context Protocol)

Gary supports MCP servers for extending its capabilities with external tools. Manage servers with /mcp or configure them in .gary/mcp.json:

{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "@some/mcp-server"],
"env": { "API_KEY": "..." }
}
}
}

Config locations (project-level overrides user-level):

  • .gary/mcp.json (project)
  • ~/.gary/mcp.json (user)

Product Context

Gary reads your product marketing context from .agents/product-marketing-context.md to personalize all advice. Run /init for guided setup, or use /skill product-marketing-context to set this up -- it will interview you about your product, audience, positioning, and competitors, then generate the context file.

Built-in Tools

ToolDescription
marketing_searchQuery connected marketing platforms (analytics, SEO, ads, email, CRM)
web_searchResearch competitors, trends, benchmarks via Exa/Perplexity/Tavily
web_fetchRead and analyze any web page (HTML to markdown)
browserAudit live websites with Playwright (screenshots, interaction)
read_fileRead local files for analysis
write_fileCreate marketing assets, reports, documents
edit_fileModify existing files
skillRun specialized marketing workflows

Architecture

src/
├── agent/ # Core agent loop, prompts, scratchpad
├── model/ # Multi-provider LLM abstraction
├── tools/
│ ├── marketing/ # Marketing platform integrations
│ ├── search/ # Web search (Exa/Tavily/Perplexity)
│ ├── browser/ # Playwright web scraping
│ ├── fetch/ # Web page reader
│ └── filesystem/ # File operations
├── skills/ # 32 built-in + custom skill discovery
├── mcp/ # MCP client and config management
├── commands/ # Slash command system
├── components/ # Terminal UI components
├── controllers/ # Agent runner, model selection, input history
└── utils/ # Config, caching, tokens, logging

Configuration

PathPurpose
.envAPI keys for LLMs and marketing platforms
.gary/settings.jsonModel preferences, tool limits
.gary/mcp.jsonMCP server definitions
.gary/messages/Persisted chat history
.gary/cache/Tool result cache
.agents/product-marketing-context.mdYour product context
SOUL.mdGary's personality and marketing philosophy

Development

bun run dev # Watch mode
bun run typecheck # Type checking
bun test# Run tests

License

PolyForm Noncommercial 1.0.0 — free to use, modify, and share for any noncommercial purpose. Commercial use requires permission from the author.

Credits

About

Claude Code BUT For Marketing, GTM, SEO , AD'S Anything Marketing releated

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages