mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
This change detects the most recent git commit short hash and writes it to the `GIT_COMMIT_INFO` constant in `packages/cli/src/generated/git-commit.sh`, optionally appending the string "(local modifications)" if additional local changes after that commit are detected.
If set, this string is displayed in the `/about` dialog as well as passed into the `/bug` template.
Example:
```
> /about
╭───────────────────────────────────────────────────────────────────────────╮
│ │
│ About Gemini CLI │
│ │
│ CLI Version development │
│ Git Commit 43370ab (local modifications) │
│ Model gemini-2.5-pro-preview-05-06 │
│ Sandbox sandbox-exec (minimal) │
│ OS darwin v23.11.0 │
│ │
╰───────────────────────────────────────────────────────────────────────────╯
```
Additionally, this change updates `.gitignore` to ignore the generated files, `scripts/clean.sh` to remove them, and adds a `npm run generate` stage for this and any other generators we need to write.
57 lines
2.2 KiB
JSON
57 lines
2.2 KiB
JSON
{
|
|
"name": "gemini-code",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"workspaces": [
|
|
"packages/*"
|
|
],
|
|
"scripts": {
|
|
"generate": "scripts/generate-git-commit-info.sh",
|
|
"build": "scripts/build.sh",
|
|
"build:sandbox": "scripts/build_sandbox.sh",
|
|
"build:all": "npm run build && npm run build:sandbox",
|
|
"clean": "scripts/clean.sh",
|
|
"prepare": "npm run bundle",
|
|
"test": "npm run test --workspaces",
|
|
"test:ci": "npm run test:ci --workspaces --if-present",
|
|
"start": "NODE_ENV=development scripts/start.sh",
|
|
"debug": "NODE_ENV=development DEBUG=1 scripts/start.sh",
|
|
"lint:fix": "eslint . --fix",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"typecheck": "npm run typecheck --workspaces --if-present",
|
|
"format": "prettier --write .",
|
|
"preflight": "npm run format --workspaces --if-present && npm run lint && npm run test --workspaces --if-present",
|
|
"auth:npm": "npx google-artifactregistry-auth",
|
|
"auth:docker": "gcloud auth configure-docker us-west1-docker.pkg.dev",
|
|
"auth": "npm run auth:npm && npm run auth:docker",
|
|
"prerelease:dev": "npm run prerelease:version --workspaces && npm run prerelease:deps --workspaces",
|
|
"bundle": "npm run generate && node_modules/.bin/esbuild packages/cli/index.ts --bundle --outfile=bundle/gemini.js --platform=node --format=esm --banner:js=\"import { createRequire } from 'module'; const require = createRequire(import.meta.url); globalThis.__filename = require('url').fileURLToPath(import.meta.url); globalThis.__dirname = require('path').dirname(globalThis.__filename);\" && bash scripts/copy_bundle_assets.sh"
|
|
},
|
|
"bin": {
|
|
"gemini": "bundle/gemini.js"
|
|
},
|
|
"files": [
|
|
"bundle/",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"dependencies": {},
|
|
"devDependencies": {
|
|
"@types/mime-types": "^2.1.4",
|
|
"@vitest/coverage-v8": "^3.1.1",
|
|
"esbuild": "^0.25.4",
|
|
"eslint": "^9.24.0",
|
|
"eslint-config-prettier": "^10.1.2",
|
|
"eslint-plugin-import": "^2.31.0",
|
|
"eslint-plugin-license-header": "^0.8.0",
|
|
"eslint-plugin-react": "^7.37.5",
|
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
"globals": "^16.0.0",
|
|
"lodash": "^4.17.21",
|
|
"prettier": "^3.5.3",
|
|
"react-devtools-core": "^4.28.5",
|
|
"typescript-eslint": "^8.30.1",
|
|
"yargs": "^17.7.2"
|
|
}
|
|
}
|