Skip to content

Commit 6214f4c

Browse files
cteroomote
andauthored
Roo Code CLI v0.0.50 (#11204)
* Roo Code CLI v0.0.50 * docs(cli): add --exit-on-error to changelog --------- Co-authored-by: Roo Code <roomote@roocode.com>
1 parent dcba685 commit 6214f4c

File tree

9 files changed

+69
-47
lines changed

9 files changed

+69
-47
lines changed

.roo/commands/cli-release.md

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Create a new release of the Roo Code CLI"
2+
description: "Prepare a new release of the Roo Code CLI"
33
argument-hint: "[version-description]"
44
mode: code
55
---
@@ -84,41 +84,3 @@ mode: code
8484
- [ ] All CI checks pass" \
8585
--base main
8686
```
87-
88-
7. Wait for PR approval and merge:
89-
90-
- Request review if required by your workflow
91-
- Ensure CI checks pass
92-
- Merge the PR using: `gh pr merge --squash --delete-branch`
93-
- Or merge via the GitHub UI
94-
95-
8. Run the release script from the monorepo root:
96-
97-
```bash
98-
# Ensure you're on the updated main branch after the PR merge
99-
git checkout main
100-
git pull origin main
101-
102-
# Run the release script
103-
./apps/cli/scripts/release.sh
104-
```
105-
106-
The release script will automatically:
107-
108-
- Build the extension and CLI
109-
- Create a platform-specific tarball
110-
- Verify the installation works correctly (runs --help, --version, and e2e test)
111-
- Extract changelog content and include it in the GitHub release notes
112-
- Create the GitHub release with the tarball attached
113-
114-
9. After a successful release, verify:
115-
- Check the release page: https://github.com/RooCodeInc/Roo-Code/releases
116-
- Verify the "What's New" section contains the changelog content
117-
- Test installation: `curl -fsSL https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/apps/cli/install.sh | sh`
118-
119-
**Notes:**
120-
121-
- The release script requires GitHub CLI (`gh`) to be installed and authenticated
122-
- If a release already exists for the tag, the script will prompt to delete and recreate it
123-
- The script creates a tarball for the current platform only (darwin-arm64, darwin-x64, linux-arm64, or linux-x64)
124-
- Multi-platform releases require running the script on each platform and manually uploading additional tarballs

apps/cli/CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ All notable changes to the `@roo-code/cli` package will be documented in this fi
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.0.50] - 2026-02-05
9+
10+
### Added
11+
12+
- **Linux Support**: The CLI now supports Linux platforms in addition to macOS
13+
- **Roo Provider API Key Support**: Allow `--api-key` flag and `ROO_API_KEY` environment variable for the roo provider instead of requiring cloud auth token
14+
- **Exit on Error**: New `--exit-on-error` flag to exit immediately on API request errors instead of retrying, useful for CI/CD pipelines
15+
16+
### Changed
17+
18+
- **Improved Dev Experience**: Dev scripts now use `tsx` for running directly from source without building first
19+
- **Path Resolution Fixes**: Fixed path resolution in [`version.ts`](src/lib/utils/version.ts), [`extension.ts`](src/lib/utils/extension.ts), and [`extension-host.ts`](src/agent/extension-host.ts) to work from both source and bundled locations
20+
- **Debug Logging**: Debug log file (`~/.roo/cli-debug.log`) is now disabled by default unless `--debug` flag is passed
21+
- Updated README with complete environment variable table and dev workflow documentation
22+
23+
### Fixed
24+
25+
- Corrected example in install script
26+
27+
### Removed
28+
29+
- Dropped macOS 13 support
30+
831
## [0.0.49] - 2026-01-18
932

1033
### Added

apps/cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ By default, the CLI prompts for approval before executing actions:
7171
```bash
7272
export OPENROUTER_API_KEY=sk-or-v1-...
7373

74-
roo "What is this project?" -w ~/Documents/my-project
74+
roo "What is this project?" -w ~/Documents/my-project
7575
```
7676

7777
You can also run without a prompt and enter it interactively in TUI mode:

apps/cli/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@roo-code/cli",
3-
"version": "0.0.49",
3+
"version": "0.0.50",
44
"description": "Roo Code CLI - Run the Roo Code agent from the command line",
55
"private": true,
66
"type": "module",
@@ -15,11 +15,8 @@
1515
"test": "vitest run",
1616
"build": "tsup",
1717
"build:extension": "pnpm --filter roo-cline bundle",
18-
"build:all": "pnpm --filter roo-cline bundle && tsup",
19-
"dev": "tsx src/index.ts",
20-
"start": "ROO_AUTH_BASE_URL=http://localhost:3000 ROO_SDK_BASE_URL=http://localhost:3001 ROO_CODE_PROVIDER_URL=http://localhost:8080/proxy tsx src/index.ts",
21-
"start:production": "node dist/index.js",
22-
"build:local": "scripts/build.sh",
18+
"dev": "ROO_AUTH_BASE_URL=https://app.roocode.com ROO_SDK_BASE_URL=https://cloud-api.roocode.com ROO_CODE_PROVIDER_URL=https://api.roocode.com/proxy tsx src/index.ts -y",
19+
"dev:local": "ROO_AUTH_BASE_URL=http://localhost:3000 ROO_SDK_BASE_URL=http://localhost:3001 ROO_CODE_PROVIDER_URL=http://localhost:8080/proxy tsx src/index.ts",
2320
"clean": "rimraf dist .turbo"
2421
},
2522
"dependencies": {

apps/cli/src/agent/ask-dispatcher.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ export interface AskDispatcherOptions {
5959
*/
6060
nonInteractive?: boolean
6161

62+
/**
63+
* Whether to exit on API request errors instead of retrying.
64+
*/
65+
exitOnError?: boolean
66+
6267
/**
6368
* Whether to disable ask handling (for TUI mode).
6469
* In TUI mode, the TUI handles asks directly.
@@ -87,6 +92,7 @@ export class AskDispatcher {
8792
private promptManager: PromptManager
8893
private sendMessage: (message: WebviewMessage) => void
8994
private nonInteractive: boolean
95+
private exitOnError: boolean
9096
private disabled: boolean
9197

9298
/**
@@ -100,6 +106,7 @@ export class AskDispatcher {
100106
this.promptManager = options.promptManager
101107
this.sendMessage = options.sendMessage
102108
this.nonInteractive = options.nonInteractive ?? false
109+
this.exitOnError = options.exitOnError ?? false
103110
this.disabled = options.disabled ?? false
104111
}
105112

@@ -518,6 +525,11 @@ export class AskDispatcher {
518525
this.outputManager.output(` Error: ${text || "Unknown error"}`)
519526
this.outputManager.markDisplayed(ts, text || "", false)
520527

528+
if (this.exitOnError) {
529+
console.error(`[CLI] API request failed: ${text || "Unknown error"}`)
530+
process.exit(1)
531+
}
532+
521533
if (this.nonInteractive) {
522534
this.outputManager.output("\n[retrying api request]")
523535
// Auto-retry in non-interactive mode

apps/cli/src/agent/extension-host.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ export interface ExtensionHostOptions {
7979
ephemeral: boolean
8080
debug: boolean
8181
exitOnComplete: boolean
82+
/**
83+
* When true, exit the process on API request errors instead of retrying.
84+
*/
85+
exitOnError?: boolean
8286
/**
8387
* When true, completely disables all direct stdout/stderr output.
8488
* Use this when running in TUI mode where Ink controls the terminal.
@@ -199,6 +203,7 @@ export class ExtensionHost extends EventEmitter implements ExtensionHostInterfac
199203
promptManager: this.promptManager,
200204
sendMessage: (msg) => this.sendToExtension(msg),
201205
nonInteractive: options.nonInteractive,
206+
exitOnError: options.exitOnError,
202207
disabled: options.disableOutput, // TUI mode handles asks directly.
203208
})
204209

@@ -468,6 +473,25 @@ export class ExtensionHost extends EventEmitter implements ExtensionHostInterfac
468473
const cleanup = () => {
469474
this.client.off("taskCompleted", completeHandler)
470475
this.client.off("error", errorHandler)
476+
477+
if (messageHandler) {
478+
this.client.off("message", messageHandler)
479+
}
480+
}
481+
482+
// When exitOnError is enabled, listen for api_req_retry_delayed messages
483+
// (sent by Task.ts during auto-approval retry backoff) and exit immediately.
484+
let messageHandler: ((msg: ClineMessage) => void) | null = null
485+
486+
if (this.options.exitOnError) {
487+
messageHandler = (msg: ClineMessage) => {
488+
if (msg.type === "say" && msg.say === "api_req_retry_delayed") {
489+
cleanup()
490+
reject(new Error(msg.text?.split("\n")[0] || "API request failed"))
491+
}
492+
}
493+
494+
this.client.on("message", messageHandler)
471495
}
472496

473497
this.client.once("taskCompleted", completeHandler)

apps/cli/src/commands/cli/run.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export async function run(promptArg: string | undefined, flagOptions: FlagOption
7878
workspacePath: effectiveWorkspacePath,
7979
extensionPath: path.resolve(flagOptions.extension || getDefaultExtensionPath(__dirname)),
8080
nonInteractive: effectiveDangerouslySkipPermissions,
81+
exitOnError: flagOptions.exitOnError,
8182
ephemeral: flagOptions.ephemeral,
8283
debug: flagOptions.debug,
8384
exitOnComplete: effectiveExitOnComplete,

apps/cli/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ program
1818
.option("-p, --print", "Print response and exit (non-interactive mode)", false)
1919
.option("-e, --extension <path>", "Path to the extension bundle directory")
2020
.option("-d, --debug", "Enable debug output (includes detailed debug information)", false)
21-
.option("-y, --yes, --dangerously-skip-permissions", "Auto-approve all prompts (use with caution)", false)
21+
.option("-y, --yes", "Auto-approve all prompts (use with caution)", false)
22+
.option("--dangerously-skip-permissions", "Alias for --yes", false)
2223
.option("-k, --api-key <key>", "API key for the LLM provider")
2324
.option("--provider <provider>", "API provider (roo, anthropic, openai, openrouter, etc.)")
2425
.option("-m, --model <model>", "Model to use", DEFAULT_FLAGS.model)
@@ -28,6 +29,7 @@ program
2829
"Reasoning effort level (unspecified, disabled, none, minimal, low, medium, high, xhigh)",
2930
DEFAULT_FLAGS.reasoningEffort,
3031
)
32+
.option("--exit-on-error", "Exit on API request errors instead of retrying", false)
3133
.option("--ephemeral", "Run without persisting state (uses temporary storage)", false)
3234
.option("--oneshot", "Exit upon task completion", false)
3335
.option(

apps/cli/src/types/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export type FlagOptions = {
2626
debug: boolean
2727
yes: boolean
2828
dangerouslySkipPermissions: boolean
29+
exitOnError: boolean
2930
apiKey?: string
3031
provider?: SupportedProvider
3132
model?: string

0 commit comments

Comments
 (0)