Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
a81438d
Add a cli installer
cte Jan 6, 2026
53ad2e1
Add a TUI
cte Jan 6, 2026
c137cf4
Fix the build
cte Jan 6, 2026
ad6ce88
Add file picker
cte Jan 6, 2026
930755e
Change the text input to multiline
cte Jan 6, 2026
b4fe095
Merge main
cte Jan 6, 2026
0a8f1a1
A few more fixes
cte Jan 6, 2026
262aaa5
More progress
cte Jan 6, 2026
a590932
More progress
cte Jan 7, 2026
c9d5234
More progress
cte Jan 7, 2026
246062c
Fix tsc errors
cte Jan 7, 2026
c95706e
Fix tsc errors
cte Jan 7, 2026
b6f571c
More progress
cte Jan 7, 2026
e85362f
New task slash command
cte Jan 7, 2026
8072a90
More progress
cte Jan 7, 2026
58793f4
A few more tweaks
cte Jan 7, 2026
5ec80f9
Fix tsc errors
cte Jan 7, 2026
3d7117b
More progress
cte Jan 7, 2026
303598f
More progress
cte Jan 7, 2026
616472f
Remove debug logging
cte Jan 7, 2026
530b67d
Fix tests
cte Jan 7, 2026
7826828
More progress
cte Jan 7, 2026
5b5d796
Add release helpers
cte Jan 7, 2026
4a41560
Fix history picker bug, fix mode switcher bug
cte Jan 7, 2026
607390b
Task history picker fixes.
cte Jan 8, 2026
511586d
More progress
cte Jan 8, 2026
245008a
Some cleanup
cte Jan 8, 2026
c83e67e
Some cleanup
cte Jan 8, 2026
7fbd2be
Add a release confirmation prompt
cte Jan 8, 2026
40ce8b7
chore(cli): prepare release v0.0.44
cte Jan 8, 2026
c01f10f
Remove .gitignore file
cte Jan 8, 2026
bc1246e
Get rid of this
cte Jan 8, 2026
c3c21c6
Update README
cte Jan 8, 2026
c194257
feat(cli): add # shortcut for task history in help trigger
cte Jan 8, 2026
9fd7112
Add instructions to push
cte Jan 8, 2026
75cade7
refactor(cli): simplify logging and streamline tool display
cte Jan 8, 2026
8d3a6ac
refactor(cli): extract hooks, stores, and utils from TUI App component
cte Jan 8, 2026
86ca7e4
test(cli): update tests to match refactored output format
cte Jan 8, 2026
adc1da1
Fix crash
cte Jan 8, 2026
9ffe49a
refactor(cli): remove renderLogger and add performance optimizations
cte Jan 8, 2026
13e3d69
style(cli): simplify ModeTool layout to horizontal with mode suffix
cte Jan 8, 2026
68a5352
chore(cli): prepare release v0.0.45
cte Jan 8, 2026
08869cd
Fix release script
cte Jan 8, 2026
9a177ca
Merge main
cte Jan 8, 2026
cf14c73
CLI auth (#10565)
cte Jan 9, 2026
1c61e7f
Organize files
cte Jan 9, 2026
8dbb985
Fix integration tests
cte Jan 9, 2026
06000ac
Some fixes
cte Jan 9, 2026
66a5e56
Update changelog for version 3.39.0 release
mrubens Jan 8, 2026
d146e2b
fix: change minItems from 2 to 1 for Anthropic API compatibility (#10…
daniel-lxs Jan 8, 2026
21f6cb8
fix: disable Gemini thought signature persistence to prevent corrupte…
daniel-lxs Jan 8, 2026
625eca0
fix: stabilize file paths during native tool call streaming (#10555)
daniel-lxs Jan 8, 2026
88b365e
Release v3.39.1 (#10557)
mrubens Jan 8, 2026
cc630b6
Changeset version bump (#10558)
github-actions[bot] Jan 8, 2026
411a27d
fix: ensure assistant message content is never undefined for Gemini c…
daniel-lxs Jan 9, 2026
2f4a16e
Update Terms of Service (effective January 9, 2026) (#10568)
mrubens Jan 9, 2026
01f8e1c
fix(vscode-lm): order text parts before tool calls in assistant messa…
daniel-lxs Jan 9, 2026
c00a0c7
fix: merge approval feedback into tool result instead of pushing dupl…
daniel-lxs Jan 9, 2026
0c4ff3d
feat: improve error messaging for stream termination errors from prov…
daniel-lxs Jan 9, 2026
a18e992
fix(openai): remove convertToSimpleMessages to fix tool calling for O…
daniel-lxs Jan 9, 2026
3865db9
Merge main
cte Jan 9, 2026
12f34cf
Merge main
cte Jan 9, 2026
586df1c
Appease knip
cte Jan 9, 2026
23eb534
Merge main
cte Jan 9, 2026
4d697c2
Fix tsc errors
cte Jan 9, 2026
8a98077
Fix tsc errors
cte Jan 9, 2026
442cfd9
Merge branch 'main' into cte/cli-tui
cte Jan 9, 2026
719faf7
PR feedback
cte Jan 9, 2026
0393a23
Revert changes to Task, move docs
cte Jan 9, 2026
9d8744c
fix: pass action property through toSlashCommandResult function
roomote Jan 9, 2026
11222e9
Merge branch 'main' into cte/cli-tui
cte Jan 9, 2026
4d92653
Fix test on windows
cte Jan 9, 2026
eaff277
Fix test
cte Jan 9, 2026
30d568c
More fixes
cte Jan 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions apps/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Changelog

All notable changes to the `@roo-code/cli` package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.45] - 2026-01-08

### Changed

- **Major Refactor**: Extracted ~1400 lines from [`App.tsx`](src/ui/App.tsx) into reusable hooks and utilities for better maintainability:

- [`useExtensionHost`](src/ui/hooks/useExtensionHost.ts) - Extension host connection and lifecycle management
- [`useMessageHandlers`](src/ui/hooks/useMessageHandlers.ts) - Message processing and state updates
- [`useTaskSubmit`](src/ui/hooks/useTaskSubmit.ts) - Task submission logic
- [`useGlobalInput`](src/ui/hooks/useGlobalInput.ts) - Global keyboard shortcut handling
- [`useFollowupCountdown`](src/ui/hooks/useFollowupCountdown.ts) - Auto-approval countdown logic
- [`useFocusManagement`](src/ui/hooks/useFocusManagement.ts) - Input focus state management
- [`usePickerHandlers`](src/ui/hooks/usePickerHandlers.ts) - Picker component event handling
- [`uiStateStore`](src/ui/stores/uiStateStore.ts) - UI-specific state (showExitHint, countdown, etc.)
- Tool data utilities ([`extractToolData`](src/ui/utils/toolDataUtils.ts), `formatToolOutput`, etc.)
- [`HorizontalLine`](src/ui/components/HorizontalLine.tsx) component

- **Performance Optimizations**:

- Added RAF-style scroll throttling to reduce state updates
- Stabilized `useExtensionHost` hook return values with `useCallback`/`useMemo`
- Added streaming message debouncing to batch rapid partial updates
- Added shallow array equality checks to prevent unnecessary re-renders

- Simplified [`ModeTool`](src/ui/components/tools/ModeTool.tsx) layout to horizontal with mode suffix
- Simplified logging by removing verbose debug output and adding first/last partial message logging pattern
- Updated Nerd Font icon codepoints in [`Icon`](src/ui/components/Icon.tsx) component

### Added

- `#` shortcut in help trigger for quick access to task history autocomplete

### Fixed

- Fixed a crash in message handling
- Added protected file warning in tool approval prompts
- Enabled `alwaysAllowWriteProtected` for non-interactive mode

### Removed

- Removed unused `renderLogger.ts` utility file

### Tests

- Updated extension-host tests to expect `[Tool Request]` format
- Updated Icon tests to expect single-char Nerd Font icons

## [0.0.44] - 2026-01-08

### Added

- **Tool Renderer Components**: Specialized renderers for displaying tool outputs with optimized formatting for each tool type. Each renderer provides a focused view of its data structure.

- [`FileReadTool`](src/ui/components/tools/FileReadTool.tsx) - Display file read operations with syntax highlighting
- [`FileWriteTool`](src/ui/components/tools/FileWriteTool.tsx) - Show file write/edit operations with diff views
- [`SearchTool`](src/ui/components/tools/SearchTool.tsx) - Render search results with context
- [`CommandTool`](src/ui/components/tools/CommandTool.tsx) - Display command execution with output
- [`BrowserTool`](src/ui/components/tools/BrowserTool.tsx) - Show browser automation actions
- [`ModeTool`](src/ui/components/tools/ModeTool.tsx) - Display mode switching operations
- [`CompletionTool`](src/ui/components/tools/CompletionTool.tsx) - Show task completion status
- [`GenericTool`](src/ui/components/tools/GenericTool.tsx) - Fallback renderer for other tools

- **History Trigger**: New `#` trigger for task history autocomplete with fuzzy search support. Type `#` at the start of a line to browse and resume previous tasks.

- [`HistoryTrigger.tsx`](src/ui/components/autocomplete/triggers/HistoryTrigger.tsx) - Trigger implementation with fuzzy filtering
- Shows task status, mode, and relative timestamps
- Supports keyboard navigation for quick task selection

- **Release Confirmation Prompt**: The release script now prompts for confirmation before creating a release.

### Fixed

- Task history picker selection and navigation issues
- Mode switcher keyboard handling bug

### Changed

- Reorganized test files into `__tests__` directories for better project structure
- Refactored utility modules into dedicated `utils/` directory

## [0.0.43] - 2026-01-07

### Added

- **Toast Notification System**: New toast notifications for user feedback with support for info, success, warning, and error types. Toasts auto-dismiss after a configurable duration and are managed via Zustand store.

- New [`ToastDisplay`](src/ui/components/ToastDisplay.tsx) component for rendering toast messages
- New [`useToast`](src/ui/hooks/useToast.ts) hook for managing toast state and displaying notifications

- **Global Input Sequences Registry**: Centralized system for handling keyboard shortcuts at the application level, preventing conflicts with input components.

- New [`globalInputSequences.ts`](src/ui/utils/globalInputSequences.ts) utility module
- Support for Kitty keyboard protocol (CSI u encoding) for better terminal compatibility
- Built-in sequences for `Ctrl+C` (exit) and `Ctrl+M` (mode cycling)

- **Local Tarball Installation**: The install script now supports installing from a local tarball via the `ROO_LOCAL_TARBALL` environment variable, useful for offline installation or testing pre-release builds.

### Changed

- **MultilineTextInput**: Updated to respect global input sequences, preventing the component from consuming shortcuts meant for application-level handling.

### Tests

- Added comprehensive tests for the toast notification system
- Added tests for global input sequence matching

## [0.0.42] - 2025-01-07

The cli is alive!
153 changes: 92 additions & 61 deletions apps/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ By default, the CLI prompts for approval before executing actions:
```bash
export OPENROUTER_API_KEY=sk-or-v1-...

roo "What is this project?" --workspace ~/Documents/my-project
roo ~/Documents/my-project -P "What is this project?"
```

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

```bash
roo ~/Documents/my-project
```

In interactive mode:
Expand All @@ -86,32 +92,84 @@ In interactive mode:
For automation and scripts, use `-y` to auto-approve all actions:

```bash
roo -y "Refactor the utils.ts file" --workspace ~/Documents/my-project
roo ~/Documents/my-project -y -P "Refactor the utils.ts file"
```

In non-interactive mode:

- Tool, command, browser, and MCP actions are auto-approved
- Followup questions show a 10-second timeout, then auto-select the first suggestion
- Followup questions show a 60-second timeout, then auto-select the first suggestion
- Typing any key cancels the timeout and allows manual input

### Roo Code Cloud Authentication

To use Roo Code Cloud features (like the provider proxy), you need to authenticate:

```bash
# Log in to Roo Code Cloud (opens browser)
roo auth login

# Check authentication status
roo auth status

# Log out
roo auth logout
```

The `auth login` command:

1. Opens your browser to authenticate with Roo Code Cloud
2. Receives a secure token via localhost callback
3. Stores the token in `~/.config/roo/credentials.json`

Tokens are valid for 90 days. The CLI will prompt you to re-authenticate when your token expires.

**Authentication Flow:**

```
┌──────┐ ┌─────────┐ ┌───────────────┐
│ CLI │ │ Browser │ │ Roo Code Cloud│
└──┬───┘ └────┬────┘ └───────┬───────┘
│ │ │
│ Open auth URL │ │
│─────────────────>│ │
│ │ │
│ │ Authenticate │
│ │─────────────────────>│
│ │ │
│ │<─────────────────────│
│ │ Token via callback │
│<─────────────────│ │
│ │ │
│ Store token │ │
│ │ │
```

## Options

| Option | Description | Default |
| --------------------------------- | ------------------------------------------------------------------------------ | ----------------- |
| `-w, --workspace <path>` | Workspace path to operate in | Current directory |
| `-e, --extension <path>` | Path to the extension bundle directory | Auto-detected |
| `-v, --verbose` | Enable verbose output (show VSCode and extension logs) | `false` |
| `-d, --debug` | Enable debug output (includes detailed debug information, prompts, paths, etc) | `false` |
| `-x, --exit-on-complete` | Exit the process when task completes (useful for testing) | `false` |
| `-y, --yes` | Non-interactive mode: auto-approve all actions | `false` |
| `-k, --api-key <key>` | API key for the LLM provider | From env var |
| `-p, --provider <provider>` | API provider (anthropic, openai, openrouter, etc.) | `openrouter` |
| `-m, --model <model>` | Model to use | Provider default |
| `-M, --mode <mode>` | Mode to start in (code, architect, ask, debug, etc.) | `code` |
| `-r, --reasoning-effort <effort>` | Reasoning effort level (none, minimal, low, medium, high, xhigh) | `medium` |

By default, the CLI runs in quiet mode (suppressing VSCode/extension logs) and only shows assistant output. Use `-v` to see all logs, or `-d` for detailed debug information.
| Option | Description | Default |
| --------------------------------- | --------------------------------------------------------------------------------------- | ----------------------------- |
| `[workspace]` | Workspace path to operate in (positional argument) | Current directory |
| `-P, --prompt <prompt>` | The prompt/task to execute (optional in TUI mode) | None |
| `-e, --extension <path>` | Path to the extension bundle directory | Auto-detected |
| `-d, --debug` | Enable debug output (includes detailed debug information, prompts, paths, etc) | `false` |
| `-x, --exit-on-complete` | Exit the process when task completes (useful for testing) | `false` |
| `-y, --yes` | Non-interactive mode: auto-approve all actions | `false` |
| `-k, --api-key <key>` | API key for the LLM provider | From env var |
| `-p, --provider <provider>` | API provider (anthropic, openai, openrouter, etc.) | `openrouter` |
| `-m, --model <model>` | Model to use | `anthropic/claude-sonnet-4.5` |
| `-M, --mode <mode>` | Mode to start in (code, architect, ask, debug, etc.) | `code` |
| `-r, --reasoning-effort <effort>` | Reasoning effort level (unspecified, disabled, none, minimal, low, medium, high, xhigh) | `medium` |
| `--ephemeral` | Run without persisting state (uses temporary storage) | `false` |
| `--no-tui` | Disable TUI, use plain text output | `false` |

## Auth Commands

| Command | Description |
| ----------------- | ---------------------------------- |
| `roo auth login` | Authenticate with Roo Code Cloud |
| `roo auth logout` | Clear stored authentication token |
| `roo auth status` | Show current authentication status |

## Environment Variables

Expand All @@ -123,9 +181,13 @@ The CLI will look for API keys in environment variables if not provided via `--a
| openai | `OPENAI_API_KEY` |
| openrouter | `OPENROUTER_API_KEY` |
| google/gemini | `GOOGLE_API_KEY` |
| mistral | `MISTRAL_API_KEY` |
| deepseek | `DEEPSEEK_API_KEY` |
| bedrock | `AWS_ACCESS_KEY_ID` |
| ... | ... |

**Authentication Environment Variables:**

| Variable | Description |
| ----------------- | -------------------------------------------------------------------- |
| `ROO_WEB_APP_URL` | Override the Roo Code Cloud URL (default: `https://app.roocode.com`) |

## Architecture

Expand Down Expand Up @@ -166,12 +228,6 @@ The CLI will look for API keys in environment variables if not provided via `--a
- CLI → Extension: `emit("webviewMessage", {...})`
- Extension → CLI: `emit("extensionWebviewMessage", {...})`

## Current Limitations

- **No TUI**: Output is plain text (no React/Ink UI yet)
- **No configuration file**: Settings are passed via command line flags
- **No persistence**: Each run is a fresh session

## Development

```bash
Expand All @@ -190,42 +246,17 @@ pnpm lint

## Releasing

To create a new release, run the release script from the monorepo root:
To create a new release, execute the /cli-release slash command:

```bash
# Release using version from package.json
./apps/cli/scripts/release.sh

# Release with a specific version
./apps/cli/scripts/release.sh 0.1.0
roo ~/Documents/Roo-Code -P "/cli-release" -y
```

The script will:

1. Build the extension and CLI
2. Create a platform-specific tarball (for your current OS/architecture)
3. Create a GitHub release with the tarball attached

**Prerequisites:**

- GitHub CLI (`gh`) installed and authenticated (`gh auth login`)
- pnpm installed

## Troubleshooting

### Extension bundle not found

Make sure you've built the main extension first:

```bash
cd src
pnpm bundle
```

### Module resolution errors

The CLI expects the extension to be a CommonJS bundle. Make sure the extension's esbuild config outputs CommonJS.

### "vscode" module not found
The workflow will:

The CLI intercepts `require('vscode')` calls. If you see this error, the module resolution interception may have failed.
1. Bump the version
2. Update the CHANGELOG
3. Build the extension and CLI
4. Create a platform-specific tarball (for your current OS/architecture)
5. Test the install script
6. Create a GitHub release with the tarball attached
Loading
Loading