EdsgerEdsger Docs

Commands

Complete reference for all Edsger CLI commands — authentication, configuration, code review, refactoring, workflow, growth analysis, app store publishing, and more.

CLI Commands

Authentication

The CLI supports browser-based authentication that links your local CLI to your Edsger platform account.

edsger login

Opens your default browser to the Edsger authentication page where you generate a CLI token, then paste it into the terminal.

edsger login

What happens:

  1. The CLI opens edsger.ai/cli/auth in your browser (macOS, Windows, and Linux with xdg-open supported)
  2. You sign in to Edsger (if not already signed in)
  3. Click "Generate CLI Token" on the page
  4. Copy the token and paste it into the CLI prompt
  5. The CLI validates the token by calling the MCP server
  6. On success, credentials are saved to ~/.edsger/auth.json with 0600 permissions

If you are already logged in, the CLI will ask if you want to re-authenticate.

After successful login, the CLI displays a list of all products you have access to, along with their IDs — useful for commands like edsger growth <product-id>.

edsger logout

Removes stored authentication credentials.

edsger logout

Deletes the ~/.edsger/auth.json file. After logout, platform-connected features (agent workflow, growth, app store, etc.) will not work until you log in again.

edsger status

Shows current login and session status.

edsger status

Displays:

  • MCP server URL
  • Login timestamp
  • Token preview (first 8 and last 4 characters)

Configuration Management

Manage persistent environment variables stored in ~/.edsger/env.json. These are loaded automatically on every CLI run, making them ideal for API keys and other settings you don't want to set on every terminal session.

edsger config set <key=value>

Store an environment variable:

edsger config set ELEVENLABS_API_KEY=sk-xxxxx
edsger config set DEEPGRAM_API_KEY=xxxxx
edsger config set EDSGER_PRODUCT_ID=your-product-uuid

edsger config get <key>

View the value of a stored variable:

edsger config get ELEVENLABS_API_KEY

edsger config list

List all stored environment variables (sensitive values are masked):

edsger config list

edsger config unset <key>

Remove a stored variable:

edsger config unset ELEVENLABS_API_KEY

Environment Variable Priority

When the same variable is set in multiple places, the highest-priority source wins:

PrioritySourceScopeExample
1 (highest)Shell environmentSessionexport EDSGER_MCP_TOKEN=xxx
2.env file in current directoryProjectEDSGER_MCP_TOKEN=xxx in .env
3 (lowest)~/.edsger/env.jsonGlobaledsger config set EDSGER_MCP_TOKEN=xxx

This means you can set global defaults via edsger config set, override them per-project with a .env file, and further override per-session with shell exports.

Project Initialization

edsger --init

Analyzes your codebase using the Claude Agent SDK and generates structured project documentation in a .edsger/ directory.

edsger --init
edsger --init --verbose

Generated files:

FileContents
project-overview.mdProject description, purpose, and goals
tech-stack.mdTechnologies, frameworks, and dependencies
architecture.mdSystem architecture, module structure, and data flow
coding-guidelines.mdCode standards, naming conventions, and patterns
development-setup.mdSetup instructions, prerequisites, and build steps

Why this matters: When the CLI later runs AI phases (analysis, design, implementation), it uses these files as context to understand your project. Better project documentation leads to more accurate AI output. You can edit the generated files to correct or add details the AI missed.

The initialization process:

  1. Scans directory structure and file types
  2. Reads package manifests (package.json, requirements.txt, etc.)
  3. Analyzes source code patterns and architecture
  4. Identifies frameworks, libraries, and conventions
  5. Generates documentation using Claude's understanding of the codebase

Code Review

edsger --review

AI-powered code review that analyzes your uncommitted changes and reports issues with three severity levels.

# Review all uncommitted changes
edsger --review

# Review only staged changes (ideal for pre-commit hooks)
edsger --review --staged

# Review specific file patterns
edsger --review --files "**/*.ts"
edsger --review --files "src/**/*.js" "lib/**/*.ts"

# Combine with verbose output
edsger --review --staged --verbose

How it works:

  1. Collects changed files (all uncommitted, staged only, or matching patterns)
  2. Filters files against your configured patterns and exclude settings
  3. Sends each file's diff to the Claude Agent SDK for analysis
  4. Returns a verdict per file:
StatusMeaningExit Code Impact
BLOCKCritical issue that must be fixedExit code 1 (if severity is error)
WARNShould be addressed but not blockingExit code 0 (unless severity is warning)
OKCode passes quality standardsExit code 0

Exit code behavior:

  • When severity is "error" (default): Only BLOCK issues cause exit code 1
  • When severity is "warning": Both BLOCK and WARN issues cause exit code 1

Git Pre-Commit Hook Integration

Add Edsger code review to your git pre-commit hook to catch issues before they're committed:

#!/bin/sh
# .git/hooks/pre-commit
npx edsger --review --staged

Or with Husky:

{
  "husky": {
    "hooks": {
      "pre-commit": "npx edsger --review --staged"
    }
  }
}

Code Refactoring

edsger --refactor

Analyzes code in the current directory, identifies improvements, and applies them automatically.

edsger --refactor
edsger --refactor --verbose

What it does:

  1. Scans the current directory using your configured file patterns
  2. Uses the Claude Agent SDK to analyze code quality
  3. Identifies: code smells, duplication, complex functions, poor naming, missing error handling, and other technical debt
  4. Streams refactoring changes as they're applied
  5. You can review the changes with git diff after completion

This is a destructive operation in the sense that it modifies files in place. Make sure your changes are committed or stashed before running.

Agent Workflow (Default Command)

edsger

The primary command. When run with no flags, it starts the cross-product agent workflow that continuously discovers, claims, and processes features.

# Start the agent (uses stored credentials from `edsger login`)
edsger

# With custom concurrency
edsger --concurrency 5

# With verbose logging
edsger --verbose

What it does:

  1. Initializes — Registers a CLI session with the server, starts the auto-update checker, creates the workspace directory (~/edsger/ or ./edsger/)
  2. Discovers features — Polls the MCP server every 30 seconds for ready_for_ai features across all products you have access to
  3. Claims features — Picks up features to process (up to your concurrency limit, default 3, max 10)
  4. Processes each feature in an isolated child process:
    • Fetches GitHub configuration for the feature's product
    • Clones the repository to ~/edsger/{featureId}/ (or reuses if already cloned)
    • Executes the feature's configured execution mode (full pipeline, single phase, or from a specific phase)
    • Updates feature status on the platform at each phase transition
    • Creates pull requests on GitHub when implementation is complete
  5. Handles failures — Failed features are retried up to maxRetries times with a cooldown period. If a feature was updated on the platform (e.g., someone provided feedback), the cooldown is bypassed.
  6. Chat worker — A parallel subprocess monitors chat messages from the platform and receives phase events from feature workers
  7. Graceful shutdown — Press Ctrl+C to stop. Active workers are terminated gracefully, statistics are displayed, and the session is deregistered.

See the Workflow page for detailed documentation of how the agent workflow processes features.

edsger --product-level

Legacy mode that processes features for a single product. Requires the EDSGER_PRODUCT_ID environment variable.

export EDSGER_PRODUCT_ID=your-product-uuid
edsger --product-level

Auto-detection: If EDSGER_PRODUCT_ID is set in the environment and you run edsger without flags, it automatically uses legacy mode for backward compatibility.

Growth Analysis

edsger growth <product-id>

Runs AI-powered growth analysis that reviews your product, analyzes existing campaigns, and generates marketing channel recommendations with content suggestions.

edsger growth abc123-product-uuid
edsger growth abc123-product-uuid --verbose

Prerequisites:

  • Authenticated with edsger login
  • A Text-to-Speech API key for video narration (set one of):
    • ELEVENLABS_API_KEY — ElevenLabs TTS (primary)
    • DEEPGRAM_API_KEY — Deepgram TTS (alternative)
  • Playwright installed (for screenshot generation)
  • FFmpeg installed (for video compilation)

What it does:

  1. Fetches your product data from the Edsger platform
  2. Reviews existing growth campaigns and their performance
  3. Analyzes the product's market positioning
  4. Recommends marketing channels (12+ channels including social media, content marketing, paid ads, etc.)
  5. Generates tailored content for each recommended channel
  6. Optionally generates demo videos with:
    • Automated product screenshots (via Playwright)
    • AI-generated narration (via TTS API)
    • Compiled video (via FFmpeg)
  7. Saves results to the platform for team review

App Store Publishing

edsger app-store <product-id>

Generates professional App Store and Play Store assets including screenshots with device frames and listing content.

# Generate both screenshots and listings for all stores
edsger app-store abc123-product-uuid

# Screenshots only
edsger app-store abc123-product-uuid --screenshots-only

# Listings only (descriptions, keywords, release notes)
edsger app-store abc123-product-uuid --listings-only

# Target a specific store
edsger app-store abc123-product-uuid --store apple
edsger app-store abc123-product-uuid --store google

# Specify locale for multi-language support
edsger app-store abc123-product-uuid --locale ja-JP
edsger app-store abc123-product-uuid --locale de-DE

Options:

FlagDefaultDescription
--screenshots-onlyfalseOnly generate screenshots, skip listings
--listings-onlyfalseOnly generate listing content, skip screenshots
--store <type>allTarget store: apple, google, or all
--locale <locale>en-USTarget locale (e.g., ja-JP, de-DE, fr-FR)
--verbosefalseEnable detailed logging

What it generates:

  • Screenshots — Professional product screenshots with device framing (iPhone, iPad, Android phone/tablet), optimized for each store's size requirements
  • Listings — App name, subtitle, description, keywords, promotional text, release notes, and category suggestions tailored to each store's guidelines

Results are uploaded to the Edsger platform where you can review and publish them.

Log Analysis

edsger analyze-logs <product-id>

Analyzes user activity logs and creates structured feedback for product improvements.

edsger analyze-logs abc123-product-uuid
edsger analyze-logs abc123-product-uuid --verbose

How it works:

  1. Fetches pending user activity logs from the platform (sessions inactive for >1 hour)
  2. Groups logs by user session
  3. Uses AI to analyze patterns, identify pain points, and detect issues
  4. Creates structured feedback records on the platform
  5. Feedback can then be linked to features for AI to act on

Task Watching

edsger --watch-tasks <product-id>

Monitors and executes pending tasks assigned to AI for a specific product.

edsger --watch-tasks abc123-product-uuid

How it works:

  1. Polls for pending AI tasks every 15 seconds
  2. When a task is found, spawns a child process to execute it
  3. Tasks can be created manually in the platform or auto-created from approval rejections
  4. Supports graceful shutdown with Ctrl+C

Global Options

These options can be used with any command:

edsger --verbose       # Enable detailed logging output
edsger --help          # Show help and available commands
edsger --version       # Show the installed CLI version
edsger -c ./config.json  # Use a specific config file path