Skip to content

Commit 20ec89d

Browse files
committed
fix(cli): expose zoo command
1 parent ac04a3d commit 20ec89d

10 files changed

Lines changed: 77 additions & 52 deletions

File tree

.github/workflows/cli-release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ jobs:
148148
'' \
149149
'// Import and run the actual CLI' \
150150
"await import(join(__dirname, '..', 'lib', 'index.js'));" \
151-
> "$RELEASE_DIR/bin/roo"
151+
> "$RELEASE_DIR/bin/zoo"
152152
153-
chmod +x "$RELEASE_DIR/bin/roo"
153+
chmod +x "$RELEASE_DIR/bin/zoo"
154154
155155
# Create empty .env file.
156156
touch "$RELEASE_DIR/.env"
@@ -189,7 +189,8 @@ jobs:
189189
ls -la "$VERIFY_DIR/roo-cli-${PLATFORM}/"
190190
191191
# Check required files exist.
192-
test -f "$VERIFY_DIR/roo-cli-${PLATFORM}/bin/roo" || { echo "Missing bin/roo"; exit 1; }
192+
test -f "$VERIFY_DIR/roo-cli-${PLATFORM}/bin/zoo" || { echo "Missing bin/zoo"; exit 1; }
193+
test ! -e "$VERIFY_DIR/roo-cli-${PLATFORM}/bin/roo" || { echo "Unexpected legacy bin/roo"; exit 1; }
193194
test -f "$VERIFY_DIR/roo-cli-${PLATFORM}/lib/index.js" || { echo "Missing lib/index.js"; exit 1; }
194195
test -f "$VERIFY_DIR/roo-cli-${PLATFORM}/package.json" || { echo "Missing package.json"; exit 1; }
195196
test -d "$VERIFY_DIR/roo-cli-${PLATFORM}/extension" || { echo "Missing extension directory"; exit 1; }
@@ -342,10 +343,10 @@ jobs:
342343
echo "" >> "$NOTES_FILE"
343344
echo '```bash' >> "$NOTES_FILE"
344345
echo "# Run a task" >> "$NOTES_FILE"
345-
echo 'roo "What is this project?"' >> "$NOTES_FILE"
346+
echo 'zoo "What is this project?"' >> "$NOTES_FILE"
346347
echo "" >> "$NOTES_FILE"
347348
echo "# See all options" >> "$NOTES_FILE"
348-
echo "roo --help" >> "$NOTES_FILE"
349+
echo "zoo --help" >> "$NOTES_FILE"
349350
echo '```' >> "$NOTES_FILE"
350351
echo "" >> "$NOTES_FILE"
351352
echo "## Platform Support" >> "$NOTES_FILE"

apps/cli/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ curl -fsSL https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/apps/cli/i
4444
Or run:
4545

4646
```bash
47-
roo upgrade
47+
zoo upgrade
4848
```
4949

5050
### Uninstalling
5151

5252
```bash
53-
rm -rf ~/.roo/cli ~/.local/bin/roo
53+
rm -rf ~/.roo/cli ~/.local/bin/zoo
5454
```
5555

5656
### Development Installation
@@ -77,13 +77,13 @@ By default, the CLI auto-approves actions and runs in interactive TUI mode:
7777
```bash
7878
export OPENROUTER_API_KEY=sk-or-v1-...
7979

80-
roo "What is this project?" -w ~/Documents/my-project
80+
zoo "What is this project?" -w ~/Documents/my-project
8181
```
8282

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

8585
```bash
86-
roo -w ~/Documents/my-project
86+
zoo -w ~/Documents/my-project
8787
```
8888

8989
In interactive mode:
@@ -98,7 +98,7 @@ In interactive mode:
9898
If you want manual approval prompts, enable approval-required mode:
9999

100100
```bash
101-
roo "Refactor the utils.ts file" --require-approval -w ~/Documents/my-project
101+
zoo "Refactor the utils.ts file" --require-approval -w ~/Documents/my-project
102102
```
103103

104104
In approval-required mode:
@@ -112,10 +112,10 @@ Use `--print` for non-interactive execution and machine-readable output:
112112

113113
```bash
114114
# Prompt is required
115-
roo --print "Summarize this repository"
115+
zoo --print "Summarize this repository"
116116

117117
# Create a new task with a specific session ID (UUID)
118-
roo --print --create-with-session-id 018f7fc8-7c96-7f7c-98aa-2ec4ff7f6d87 "Summarize this repository"
118+
zoo --print --create-with-session-id 018f7fc8-7c96-7f7c-98aa-2ec4ff7f6d87 "Summarize this repository"
119119
```
120120

121121
### Autonomous Orchestrator Draft (`--autonomous`)
@@ -127,7 +127,7 @@ Every new autonomous root starts in the effective `orchestrator` mode. A project
127127
```bash
128128
export OPENROUTER_API_KEY=sk-or-v1-...
129129

130-
roo --autonomous --print \
130+
zoo --autonomous --print \
131131
--workspace /absolute/path/to/project \
132132
--timeout 3600 \
133133
--output-format stream-json \
@@ -186,10 +186,10 @@ For programmatic control (one process, multiple prompts), use `--stdin-prompt-st
186186
Send NDJSON commands via stdin:
187187

188188
```bash
189-
printf '{"command":"start","requestId":"1","prompt":"1+1=?"}\n' | roo --print --stdin-prompt-stream --output-format stream-json
189+
printf '{"command":"start","requestId":"1","prompt":"1+1=?"}\n' | zoo --print --stdin-prompt-stream --output-format stream-json
190190

191191
# Optional: provide taskId per start command
192-
printf '{"command":"start","requestId":"1","taskId":"018f7fc8-7c96-7f7c-98aa-2ec4ff7f6d87","prompt":"1+1=?"}\n' | roo --print --stdin-prompt-stream --output-format stream-json
192+
printf '{"command":"start","requestId":"1","taskId":"018f7fc8-7c96-7f7c-98aa-2ec4ff7f6d87","prompt":"1+1=?"}\n' | zoo --print --stdin-prompt-stream --output-format stream-json
193193
```
194194

195195
### Legacy Roo Auth Token Cleanup
@@ -200,10 +200,10 @@ Roo Code Router has been removed from the CLI. The remaining `auth` commands onl
200200

201201
```bash
202202
# Check whether a legacy Roo auth token is still stored
203-
roo auth status
203+
zoo auth status
204204

205205
# Remove an old stored Roo auth token
206-
roo auth logout
206+
zoo auth logout
207207
```
208208

209209
If you never used Roo Code Router, you can ignore this section entirely.
@@ -239,8 +239,8 @@ If you never used Roo Code Router, you can ignore this section entirely.
239239

240240
| Command | Description |
241241
| ----------------- | ------------------------------------ |
242-
| `roo auth logout` | Clear a stored legacy Roo auth token |
243-
| `roo auth status` | Show legacy Roo token status |
242+
| `zoo auth logout` | Clear a stored legacy Roo auth token |
243+
| `zoo auth status` | Show legacy Roo token status |
244244

245245
## Environment Variables
246246

apps/cli/docs/AGENT_LOOP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ if (isInteractiveAsk(ask)) {
321321
Enable with `-d` flag. Logs go to `~/.roo/cli-debug.log`:
322322

323323
```bash
324-
roo -d -P "Build something" --no-tui
324+
zoo -d -P "Build something" --no-tui
325325
```
326326

327327
View logs:

apps/cli/install.sh

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Install Node.js:
5454
5555
Please upgrade Node.js to version $MIN_NODE_VERSION or higher."
5656
fi
57-
57+
5858
info "Found Node.js $(node -v)"
5959
}
6060

@@ -242,7 +242,7 @@ Available at: https://github.com/$REPO/releases"
242242
fi
243243

244244
# Make executable
245-
chmod +x "$INSTALL_DIR/bin/roo"
245+
chmod +x "$INSTALL_DIR/bin/zoo"
246246

247247
# Also make ripgrep executable if it exists
248248
if [ -f "$INSTALL_DIR/bin/rg" ]; then
@@ -253,14 +253,19 @@ Available at: https://github.com/$REPO/releases"
253253
# Create symlink in bin directory
254254
setup_bin() {
255255
mkdir -p "$BIN_DIR"
256-
257-
# Remove old symlink if exists
256+
257+
# Remove the executable name used by earlier CLI releases.
258258
if [ -L "$BIN_DIR/roo" ] || [ -f "$BIN_DIR/roo" ]; then
259259
rm -f "$BIN_DIR/roo"
260260
fi
261-
262-
ln -sf "$INSTALL_DIR/bin/roo" "$BIN_DIR/roo"
263-
info "Created symlink: $BIN_DIR/roo"
261+
262+
# Remove old symlink if exists
263+
if [ -L "$BIN_DIR/zoo" ] || [ -f "$BIN_DIR/zoo" ]; then
264+
rm -f "$BIN_DIR/zoo"
265+
fi
266+
267+
ln -sf "$INSTALL_DIR/bin/zoo" "$BIN_DIR/zoo"
268+
info "Created symlink: $BIN_DIR/zoo"
264269
}
265270

266271
# Check if bin dir is in PATH and provide instructions
@@ -305,10 +310,10 @@ check_path() {
305310

306311
# Verify installation
307312
verify_install() {
308-
if [ -x "$BIN_DIR/roo" ]; then
313+
if [ -x "$BIN_DIR/zoo" ]; then
309314
info "Verifying installation..."
310315
# Just check if it runs without error
311-
"$BIN_DIR/roo" --version >/dev/null 2>&1 || true
316+
"$BIN_DIR/zoo" --version >/dev/null 2>&1 || true
312317
fi
313318
}
314319

@@ -318,15 +323,15 @@ print_success() {
318323
printf "${GREEN}${BOLD}✓ Roo Code CLI installed successfully!${NC}\n"
319324
echo ""
320325
echo " Installation: $INSTALL_DIR"
321-
echo " Binary: $BIN_DIR/roo"
326+
echo " Binary: $BIN_DIR/zoo"
322327
echo " Version: $VERSION"
323328
echo ""
324329
echo " ${BOLD}Get started:${NC}"
325-
echo " roo --help"
330+
echo " zoo --help"
326331
echo ""
327332
echo " ${BOLD}Example:${NC}"
328333
echo " export OPENROUTER_API_KEY=sk-or-v1-..."
329-
echo " cd ~/my-project && roo \"What is this project?\""
334+
echo " cd ~/my-project && zoo \"What is this project?\""
330335
echo ""
331336
}
332337

apps/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "module",
77
"main": "dist/index.js",
88
"bin": {
9-
"roo": "dist/index.js"
9+
"zoo": "dist/index.js"
1010
},
1111
"scripts": {
1212
"format": "prettier --write 'src/**/*.ts'",

apps/cli/scripts/build.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ create_tarball() {
188188

189189
# Create the wrapper script
190190
info "Creating wrapper script..."
191-
cat > "$RELEASE_DIR/bin/roo" << 'WRAPPER_EOF'
191+
cat > "$RELEASE_DIR/bin/zoo" << 'WRAPPER_EOF'
192192
#!/usr/bin/env node
193193
194194
import { fileURLToPath } from 'url';
@@ -210,7 +210,7 @@ if (existsSync(ripgrepPath)) {
210210
await import(join(__dirname, '..', 'lib', 'index.js'));
211211
WRAPPER_EOF
212212

213-
chmod +x "$RELEASE_DIR/bin/roo"
213+
chmod +x "$RELEASE_DIR/bin/zoo"
214214

215215
# Create empty .env file
216216
touch "$RELEASE_DIR/.env"
@@ -267,15 +267,21 @@ verify_local_install() {
267267
error "Installation verification failed!"
268268
}
269269

270+
# Ensure only the public executable is installed.
271+
if [ -e "$VERIFY_BIN_DIR/roo" ]; then
272+
rm -rf "$VERIFY_DIR"
273+
error "Legacy roo executable was installed!"
274+
fi
275+
270276
# Test --help
271-
if ! "$VERIFY_BIN_DIR/roo" --help > /dev/null 2>&1; then
277+
if ! "$VERIFY_BIN_DIR/zoo" --help > /dev/null 2>&1; then
272278
rm -rf "$VERIFY_DIR"
273279
error "CLI --help check failed!"
274280
fi
275281
info "CLI --help check passed"
276282

277283
# Test --version
278-
if ! "$VERIFY_BIN_DIR/roo" --version > /dev/null 2>&1; then
284+
if ! "$VERIFY_BIN_DIR/zoo" --version > /dev/null 2>&1; then
279285
rm -rf "$VERIFY_DIR"
280286
error "CLI --version check failed!"
281287
fi
@@ -317,11 +323,11 @@ print_summary() {
317323

318324
if [ "$LOCAL_INSTALL" = true ]; then
319325
echo " Installed to: ~/.roo/cli"
320-
echo " Binary: ~/.local/bin/roo"
326+
echo " Binary: ~/.local/bin/zoo"
321327
echo ""
322328
echo " Test it out:"
323-
echo " roo --version"
324-
echo " roo --help"
329+
echo " zoo --version"
330+
echo " zoo --help"
325331
else
326332
echo " To install manually:"
327333
echo " ROO_LOCAL_TARBALL=$REPO_ROOT/$TARBALL ./apps/cli/install.sh"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import fs from "node:fs"
2+
import path from "node:path"
3+
import { fileURLToPath } from "node:url"
4+
5+
describe("CLI package", () => {
6+
it("publishes only the zoo executable", () => {
7+
const packagePath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../package.json")
8+
const packageJson = JSON.parse(fs.readFileSync(packagePath, "utf8")) as { bin?: Record<string, string> }
9+
10+
expect(packageJson.bin).toEqual({ zoo: "dist/index.js" })
11+
expect(packageJson.bin).not.toHaveProperty("roo")
12+
})
13+
})

apps/cli/src/commands/auth/status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function status(options: StatusOptions = {}): Promise<StatusResult>
4949
}
5050

5151
if (expiringSoon) {
52-
console.log("⚠ Legacy Roo auth token expires soon; use `roo auth logout` if you want to clean it up.")
52+
console.log("⚠ Legacy Roo auth token expires soon; use `zoo auth logout` if you want to clean it up.")
5353
} else {
5454
console.log("✓ Legacy Roo auth token still stored")
5555
}

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export async function run(promptArg: string | undefined, flagOptions: FlagOption
133133

134134
if (isResumeRequested && prompt) {
135135
console.error("[CLI] Error: cannot use prompt or --prompt-file with --session-id/--continue")
136-
console.error("[CLI] Usage: roo [--session-id <session-id> | --continue] [options]")
136+
console.error("[CLI] Usage: zoo [--session-id <session-id> | --continue] [options]")
137137
exitValidation("cannot use prompt or --prompt-file with --session-id/--continue")
138138
}
139139

@@ -287,39 +287,39 @@ export async function run(promptArg: string | undefined, flagOptions: FlagOption
287287
// Output format only works with --print mode
288288
if (outputFormat !== "text" && !flagOptions.print && isTuiSupported) {
289289
console.error("[CLI] Error: --output-format requires --print mode")
290-
console.error("[CLI] Usage: roo --print --output-format json")
290+
console.error("[CLI] Usage: zoo --print --output-format json")
291291
exitValidation("--output-format requires --print mode")
292292
}
293293

294294
if (flagOptions.stdinPromptStream && !flagOptions.print) {
295295
console.error("[CLI] Error: --stdin-prompt-stream requires --print mode")
296-
console.error("[CLI] Usage: roo --print --output-format stream-json --stdin-prompt-stream [options]")
296+
console.error("[CLI] Usage: zoo --print --output-format stream-json --stdin-prompt-stream [options]")
297297
exitValidation("--stdin-prompt-stream requires --print mode")
298298
}
299299

300300
if (flagOptions.signalOnlyExit && !flagOptions.stdinPromptStream) {
301301
console.error("[CLI] Error: --signal-only-exit requires --stdin-prompt-stream")
302-
console.error("[CLI] Usage: roo --print --output-format stream-json --stdin-prompt-stream --signal-only-exit")
302+
console.error("[CLI] Usage: zoo --print --output-format stream-json --stdin-prompt-stream --signal-only-exit")
303303
exitValidation("--signal-only-exit requires --stdin-prompt-stream")
304304
}
305305

306306
if (flagOptions.stdinPromptStream && outputFormat !== "stream-json") {
307307
console.error("[CLI] Error: --stdin-prompt-stream requires --output-format=stream-json")
308-
console.error("[CLI] Usage: roo --print --output-format stream-json --stdin-prompt-stream [options]")
308+
console.error("[CLI] Usage: zoo --print --output-format stream-json --stdin-prompt-stream [options]")
309309
exitValidation("--stdin-prompt-stream requires --output-format=stream-json")
310310
}
311311

312312
if (flagOptions.stdinPromptStream && process.stdin.isTTY) {
313313
console.error("[CLI] Error: --stdin-prompt-stream requires piped stdin")
314314
console.error(
315-
'[CLI] Example: printf \'{"command":"start","requestId":"1","prompt":"1+1=?"}\\n\' | roo --print --output-format stream-json --stdin-prompt-stream [options]',
315+
'[CLI] Example: printf \'{"command":"start","requestId":"1","prompt":"1+1=?"}\\n\' | zoo --print --output-format stream-json --stdin-prompt-stream [options]',
316316
)
317317
exitValidation("--stdin-prompt-stream requires piped stdin")
318318
}
319319

320320
if (flagOptions.stdinPromptStream && prompt) {
321321
console.error("[CLI] Error: cannot use positional prompt or --prompt-file with --stdin-prompt-stream")
322-
console.error("[CLI] Usage: roo --print --output-format stream-json --stdin-prompt-stream [options]")
322+
console.error("[CLI] Usage: zoo --print --output-format stream-json --stdin-prompt-stream [options]")
323323
exitValidation("cannot use a prompt with --stdin-prompt-stream")
324324
}
325325

@@ -347,13 +347,13 @@ export async function run(promptArg: string | undefined, flagOptions: FlagOption
347347
if (!prompt && !useStdinPromptStream && !isResumeRequested) {
348348
if (flagOptions.print) {
349349
console.error("[CLI] Error: no prompt provided")
350-
console.error("[CLI] Usage: roo --print [options] <prompt>")
350+
console.error("[CLI] Usage: zoo --print [options] <prompt>")
351351
console.error(
352-
"[CLI] For stdin control mode: roo --print --output-format stream-json --stdin-prompt-stream [options]",
352+
"[CLI] For stdin control mode: zoo --print --output-format stream-json --stdin-prompt-stream [options]",
353353
)
354354
} else {
355355
console.error("[CLI] Error: prompt is required in non-interactive mode")
356-
console.error("[CLI] Usage: roo <prompt> [options]")
356+
console.error("[CLI] Usage: zoo <prompt> [options]")
357357
console.error("[CLI] Run without -p for interactive mode")
358358
}
359359

apps/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { run, logout, status, listCommands, listModes, listModels, listSessions,
66
const program = new Command()
77

88
program
9-
.name("roo")
9+
.name("zoo")
1010
.description("Roo Code CLI - starts an interactive session by default, use -p/--print for non-interactive output")
1111
.version(VERSION)
1212
.enablePositionalOptions()

0 commit comments

Comments
 (0)