diff options
| author | Brandon Keiji <[email protected]> | 2025-05-13 17:49:45 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-13 10:49:45 -0700 |
| commit | 8da7a71d9a94935910908ac5cd9ab656d538e28b (patch) | |
| tree | 8dd7ef2b8fecb6cc24de123c7b4e1741c0b30886 /packages | |
| parent | 61ccd4f33a17e05726537d74b6d5ba578d33cd78 (diff) | |
refactor: shorten 'gemini' binary name (#329)
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/cli/package.json | 3 | ||||
| -rw-r--r-- | packages/cli/src/utils/sandbox.ts | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/packages/cli/package.json b/packages/cli/package.json index 70dff15b..fe3f0bdb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -5,7 +5,8 @@ "type": "module", "main": "dist/index.js", "bin": { - "gemini-code": "dist/index.js" + "gemini-code": "dist/index.js", + "gemini": "dist/index.js" }, "image": "us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-cli", "scripts": { diff --git a/packages/cli/src/utils/sandbox.ts b/packages/cli/src/utils/sandbox.ts index cbd0a6c6..b1605184 100644 --- a/packages/cli/src/utils/sandbox.ts +++ b/packages/cli/src/utils/sandbox.ts @@ -127,7 +127,7 @@ function entrypoint(workdir: string): string[] { ), ); - // append remaining args (bash -c "gemini-code cli_args...") + // append remaining args (bash -c "gemini cli_args...") // cli_args need to be quoted before being inserted into bash_cmd const cliArgs = process.argv.slice(2).map((arg) => quote([arg])); const cliCmd = @@ -136,8 +136,8 @@ function entrypoint(workdir: string): string[] { ? 'npm run debug --' : 'npm run start --' : process.env.DEBUG // for production binary debugging - ? `node --inspect-brk=0.0.0.0:${process.env.DEBUG_PORT || '9229'} $(which gemini-code)` - : 'gemini-code'; + ? `node --inspect-brk=0.0.0.0:${process.env.DEBUG_PORT || '9229'} $(which gemini)` + : 'gemini'; const args = [...bashCmds, cliCmd, ...cliArgs]; @@ -197,7 +197,7 @@ export async function start_sandbox(sandbox: string) { console.log(`hopping into sandbox (command: ${sandbox}) ...`); // determine full path for gemini-code to distinguish linked vs installed setting - const gcPath = execSync(`realpath $(which gemini-code)`).toString().trim(); + const gcPath = execSync(`realpath $(which gemini)`).toString().trim(); const image = process.env.GEMINI_CODE_SANDBOX_IMAGE ?? 'gemini-code-sandbox'; const workdir = process.cwd(); @@ -207,7 +207,7 @@ export async function start_sandbox(sandbox: string) { if (process.env.BUILD_SANDBOX) { if (!gcPath.includes('gemini-code/packages/')) { console.error( - 'ERROR: cannot BUILD_SANDBOX using installed gemini-code binary; ' + + 'ERROR: cannot BUILD_SANDBOX using installed gemini binary; ' + 'run `npm link ./packages/cli` under gemini-code repo to switch to linked binary.', ); process.exit(1); |
