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:
- Analyze the current directory structure
- Read relevant files to understand the project
- Generate a summary and list files
- Execute commands if needed
Next Steps
Now that Sweet! CLI is installed and configured:
- Learn about available commands
- Explore API reference for programmatic access
- Read about common workflows
- Check troubleshooting guide if you encounter issues
- Join our Discord community for help
Updating Sweet! CLI
To update to the latest version:
npm install -g @sweet-cli/sweet@latest