CLI Reference

The goon CLI is your project companion. It configures services, adds features, applies themes, and deploys your app.

Installation

npm install -g goon

Or use via npx (no install needed):

npx goon setup payments

Commands Overview

CommandDescription
goon setup <service>Configure a service interactively
goon initOne-shot setup (all services at once)
goon add <feature>Add optional features to your project
goon add listList all available features
goon deployDeploy to a hosting provider

goon setup

Configure individual services. Each command validates credentials and writes to .env.

goon setup app

Set your app's identity:

goon setup app

Configures: NEXT_PUBLIC_APP_NAME, NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_APP_DESCRIPTION, SUPPORT_EMAIL, NEXT_PUBLIC_TWITTER_HANDLE

goon setup auth

Generate auth secrets and configure OAuth:

goon setup auth
  • Generates a 256-bit cryptographic secret
  • Sets BETTER_AUTH_SECRET and BETTER_AUTH_URL
  • Optionally configures Google OAuth inline

goon setup db

Connect your database:

goon setup db
  • Validates connection string format
  • Supports Neon, Supabase, PlanetScale, custom
  • Sets DATABASE_URL (and DATABASE_URL_UNPOOLED for migrations)

goon setup payments

Configure payments (multi-provider):

goon setup payments

Providers: Stripe, Polar, LemonSqueezy, DodoPayments

Each provider:

  • Validates your API key with a real API call
  • Fetches products/prices for interactive selection
  • Configures webhook secrets
  • Updates .goon/manifest.json

goon setup email

Configure email sending (multi-provider):

goon setup email

Providers: Resend, Postmark, SendGrid, Mailgun, Nodemailer (SMTP)

Each provider:

  • Validates credentials with a real API call
  • Sets from name and address
  • Updates .goon/manifest.json

goon setup ratelimit

Configure Upstash Redis for API rate limiting:

goon setup ratelimit
  • Validates connection via ping
  • Sets UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN

goon setup theme

Apply a UI theme to your project:

goon setup theme

10 themes available:

ThemeTierVibe
DefaultFreeClean black & white
ZincFreeNeutral grays
SlateFreeCool blue-gray
MidnightFreeDeep navy
OceanProTeal & cyan
AuroraProPurple-to-green
EmberProWarm amber
ForestProEarthy greens
CandyBundleBubbly pinks
BrutalBundleNeo-brutalist

Themes inject CSS variables between markers in globals.css. Full light + dark mode support.

goon setup google

Standalone Google OAuth setup with step-by-step guidance:

goon setup google

goon init

Run all setup commands in one shot. Designed for non-interactive environments (CI/CD, AI agents):

goon init \
  --app-name "My SaaS" \
  --app-url "https://mysaas.com" \
  --db-url "postgresql://..." \
  --payment-provider stripe \
  --stripe-key "sk_test_..." \
  --email-provider resend \
  --resend-key "re_..."

Runs in sequence: app → auth → db → payments → email.


goon add

Add optional features to an existing project:

goon add blog

Available Features

FeatureTierWhat It Adds
blogFreeMDX blog engine with syntax highlighting
waitlistFreeEmail waitlist with landing page
analyticsFreePostHog analytics integration
i18nFreenext-intl internationalization
adminProAdmin dashboard with user management
aiProAI routes with OpenAI integration

How It Works

When you run goon add blog, the CLI:

  1. Checks your license tier (pro features require pro/bundle)
  2. Creates directories and files with content
  3. Installs npm dependencies
  4. Adds environment variables to .env
  5. Updates .goon/manifest.json

List Available Features

goon add list

Shows all features with their tier requirements and install status.


goon deploy

Deploy your project to a hosting provider:

goon deploy

Supported Providers

ProviderDeploy CommandPre-requisite
Vercelnpx vercelVercel account
Netlifynpx netlify deploy --prodNetlify CLI
Railwayrailway upRailway CLI
Fly.iofly deployFly CLI
Renderrender deployRender CLI

What It Does

  1. Prompts for provider selection
  2. Checks if you're authenticated
  3. Warns about uncommitted changes
  4. Optionally runs npm run build first
  5. Executes the provider's deploy command

Non-Interactive Mode

All commands support non-interactive execution:

# Auto-detected in piped environments
echo "" | goon setup auth

# Explicit flag
goon setup auth --yes

# With values
goon setup db --db-url "postgresql://..." --yes

This makes the CLI work in automated pipelines and with AI coding agents.

The Manifest (.goon/manifest.json)

The CLI reads and writes this file to track your project state:

{
  "framework": "next",
  "tier": "pro",
  "database": "neon",
  "features": ["blog", "admin", "analytics"],
  "providers": {
    "payments": "stripe",
    "email": "resend"
  }
}

Next Steps