| 257 | } |
| 258 | |
| 259 | function printHelp() { |
| 260 | console.log(`Lightweight coding agent CLI |
| 261 | |
| 262 | Usage: |
| 263 | code-agent [options] "your task" |
| 264 | code-agent [options] |
| 265 | |
| 266 | Options: |
| 267 | -C, --cwd <path> Workspace directory for the local agent. Defaults to cwd. |
| 268 | -m, --model <id> Model id. Defaults to CURSOR_MODEL or composer-2. |
| 269 | --force Expire a stuck active local run before starting. |
| 270 | -h, --help Show this help. |
| 271 | |
| 272 | Interactive commands: |
| 273 | /local Run future prompts in the local workspace. |
| 274 | /cloud Run future prompts in Cursor cloud. |
| 275 | /model Open the model picker. |
| 276 | /reset Start a fresh agent in the current execution mode. |
| 277 | |
| 278 | Examples: |
| 279 | code-agent "Explain the auth flow" |
| 280 | code-agent --cwd ../my-app "Add a regression test for the parser" |
| 281 | code-agent |
| 282 | printf "Review the recent changes" | code-agent |
| 283 | `) |
| 284 | } |
| 285 | |
| 286 | main().catch((error) => { |
| 287 | const message = error instanceof Error ? error.message : String(error) |