Sweet! CLI

Getting Started with Sweet! CLI

Install and configure Sweet! CLI on macOS, Linux, or Windows in minutes. Start using AI-powered coding assistance directly in your terminal.

Prerequisites

Before installing Sweet! CLI, ensure you have:

  • A terminal (macOS Terminal, Linux Bash, Windows Terminal)
  • Node.js 18+ and npm
  • An active internet connection

Installation

Install Sweet! CLI from npm:

Install

npm install -g @sweet-cli/sweet

Authenticate

Sweet! CLI uses the billing relay by default (recommended). Sign in with:

sweet login

This stores an auth token in ~/.sweet/config.json.

Verifying Installation

After installation, verify Sweet! CLI is working:

sweet --help
sweet

You should see the interactive welcome prompt.

Initial Configuration

After signing in, you can start an interactive session with:

sweet

Or run a single task non-interactively:

sweet start "Fix the failing test"
Security Note: Billing authentication is stored locally in ~/.sweet/config.json.

Manual Configuration

Optional: create a project config file (example):

mkdir -p .sweet
cat > .sweet/config.yaml << EOF
compaction_mode: "resume_prompt"
compaction_target_tokens: 12000
default_timebox_seconds: 3600
EOF

Your First Command

Test Sweet! CLI with a simple task:

sweet start "List files in the current directory and summarize the project"

Sweet! CLI will:

  1. Analyze the current directory structure
  2. Read relevant files to understand the project
  3. Generate a summary and list files
  4. Execute commands if needed

Next Steps

Now that Sweet! CLI is installed and configured:

Updating Sweet! CLI

To update to the latest version:

npm install -g @sweet-cli/sweet@latest