01 · Install
Install and sign in.
You need Node.js 18 or newer. Install the CLI, then sign in with the email you use for Sweet: sweet login opens a page with a one-time code to paste back.
$ npm install -g @sweet-cli/sweet $ sweet login
02 · Run
Start an agent in a folder.
Go to your project and give it a task. It reads the code, plans, makes the change and runs your tests. Press Ctrl-C any time to redirect it.
The CLI changes files and runs commands in the folder you start it in. Work on a git branch, and review its changes before you merge.
$ cd my-project $ sweet start "fix the failing tests in the auth module"
03 · Commands
Every command.
04 · While it runs
Slash commands.
/workfor 45mKeep going on its own for 45 minutes./workfor 2h/workoffStop working on its own./workoff/workstatusHow long it has left./workstatus/todosIts task list./todos/jobs · /kill <id>Background jobs, and stopping one./kill 3/clearStart the conversation over./clear05 · Configuration
Settings and environment.
Sign-in is stored in ~/.sweet/config.json. For scripts and CI, set this instead:
SWEET_BILLING_TOKENUse this token instead of signing in.export SWEET_BILLING_TOKEN=…06 · Troubleshooting
If something's off.
- Signed out or "invalid token": run
sweet loginagain. sweetnot found: checknode -vis 18 or newer and npm's global bin folder is on your PATH.- Out of credit: top up, then
sweet resume. - Lost a session:
sweet sessions, thensweet start --session <id>.