A few more fixes

This commit is contained in:
cte 2026-01-06 03:42:31 -08:00
parent b4fe095bf1
commit 0a8f1a13c4
4 changed files with 21 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@roo-code/cli",
"version": "0.1.0",
"version": "0.2.2",
"description": "Roo Code CLI - Run the Roo Code agent from the command line",
"private": true,
"type": "module",

View file

@ -130,7 +130,7 @@ create_tarball() {
info "Copying CLI files..."
cp -r "$CLI_DIR/dist/"* "$RELEASE_DIR/lib/"
# Create package.json for npm install (only runtime dependencies)
# Create package.json for npm install (runtime dependencies that can't be bundled)
info "Creating package.json..."
node -e "
const pkg = require('$CLI_DIR/package.json');
@ -139,7 +139,11 @@ create_tarball() {
version: pkg.version,
type: 'module',
dependencies: {
commander: pkg.dependencies.commander
'@inkjs/ui': pkg.dependencies['@inkjs/ui'],
'commander': pkg.dependencies.commander,
'ink': pkg.dependencies.ink,
'react': pkg.dependencies.react,
'zustand': pkg.dependencies.zustand
}
};
console.log(JSON.stringify(newPkg, null, 2));
@ -197,6 +201,9 @@ WRAPPER_EOF
# Create version file
echo "$VERSION" > "$RELEASE_DIR/VERSION"
# Create empty .env file to suppress dotenvx warnings
touch "$RELEASE_DIR/.env"
# Create tarball
info "Creating tarball..."
cd "$REPO_ROOT"

View file

@ -4,6 +4,7 @@
import { Command } from "commander"
import fs from "fs"
import { createRequire } from "module"
import path from "path"
import { fileURLToPath } from "url"
import { createElement } from "react"
@ -29,9 +30,16 @@ const REASONING_EFFORTS = [...reasoningEffortsExtended, "unspecified", "disabled
const __dirname = path.dirname(fileURLToPath(import.meta.url))
// Read version from package.json
const require = createRequire(import.meta.url)
const packageJson = require("../package.json")
const program = new Command()
program.name("roo").description("Roo Code CLI - Run the Roo Code agent from the command line").version("0.1.0")
program
.name("roo")
.description("Roo Code CLI - Run the Roo Code agent from the command line")
.version(packageJson.version)
program
.argument("[prompt]", "The prompt/task to execute (optional in TUI mode)")

View file

@ -20,6 +20,8 @@ export default defineConfig({
"@anthropic-ai/vertex-sdk",
// Keep @vscode/ripgrep external - we bundle the binary separately
"@vscode/ripgrep",
// Optional dev dependency of ink - not needed at runtime
"react-devtools-core",
],
esbuildOptions(options) {
// Enable JSX for React/Ink components