Commit Graph

58 Commits

Author SHA1 Message Date
matt korwel 3b943c1582
Windows: Refactor Shell Scripts to Node.js for Cross-Platform Compatibility (#784) 2025-06-09 12:19:42 -07:00
matt korwel 37edbd8c18
Rollforward AST changes to unblock Sandboxing (#863) 2025-06-08 19:07:25 -07:00
Olcan 7e73f57556
use -s flag (to skip npm install + build) for build_sandbox.sh when running via npm run build:all (#858) 2025-06-08 16:36:52 -07:00
matt korwel 584286cfd9
fix(deps): externalize tree-sitter (#840)
Submitting without approval to fix broken deployment on main. But also, we should lock this down.
2025-06-08 02:05:55 -07:00
matt korwel f1a4e5d4d3
Creating Node AST Tool. (#756) 2025-06-07 12:07:58 -07:00
Eddie Santos 422c763a55
Add support for `.geminiignore` file (#757) 2025-06-05 10:15:27 -07:00
anj-s 78b2a28fb6
Checks for diff changes before displaying the code snippet (#751) 2025-06-05 06:48:03 -07:00
Allen Hutchison 53bf778497
feat: allow custom filename for context files (#654)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-05-31 12:49:28 -07:00
Scott Densmore 98699a0ab5
Refactor: Align build scripts with core package rename (#641) 2025-05-30 20:16:35 -07:00
Tommaso Sciortino 21fba832d1
Rename server->core (#638) 2025-05-30 18:25:47 -07:00
Brandon Keiji cf82b6e127
fix(sandbox): prepare package.json before building sandbox image (#626) 2025-05-30 19:57:46 +00:00
Brandon Keiji 31a7affb74
feat(sandbox): use package config to dictate sandbox image name (#624) 2025-05-30 19:28:46 +00:00
Olcan 094b9dc474
use npx json instead of jq (#617) 2025-05-30 01:12:36 -07:00
Brandon Keiji 2582c20e2a
fix: publish @gemini-code/server (#605) 2025-05-29 23:55:34 +00:00
Seth Troisi 2db5d83023 fix name in package.json 2025-05-29 15:56:05 -07:00
Brandon Keiji dc94a03f39
feat: publish root Dockerfile to our image registry (#599) 2025-05-29 14:01:44 -07:00
Brandon Keiji fd6f6b02ea
feat: add git branch name to footer (#589) 2025-05-28 16:30:05 -07:00
DeWitt Clinton 27a773d5b2
Display git commit info in the /about section. (#567)
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.
2025-05-28 00:04:26 -07:00
Allen Hutchison 4e3c539f5e
feat: Publish test coverage summaries to PRs (#513) 2025-05-27 12:45:28 -07:00
Taylor Mullen b3f52e215a feat: Replace SQLite with JSON logging for macOS sandbox compatibility
- Removes the sqlite3 dependency and refactors the logging mechanism to use a JSON file (logs.json) instead of a database.
- This change is a temporary workaround to address issues with macOS sandboxing that were caused by the SQLite native module.
- Storing all logs in a single JSON file may introduce scalability concerns in the future.

Fixes https://github.com/google-gemini/gemini-cli/issues/522
2025-05-26 16:13:37 -07:00
Taylor Mullen 4a6833ef49 feat: Enable npx execution on tagged versions
- Modify root package.json to allow publishing
- Update "files" to include only essential bundled assets

This change makes it possible to use npx with tagged versions of the
gemini-cli package (e.g., npx https://github.com/google-gemini/gemini-cli@early-access).
It removes "private: true" and refines the "files" array to ensure
that only the necessary bundled assets are included when the package is
fetched by npx, optimizing download size and ensuring correct execution.
2025-05-23 15:55:29 -07:00
Taylor Mullen 8590efd229 feat: Enable npx execution directly from GitHub URL
This commit modifies the packaging setup to allow the CLI to be
executed directly from its GitHub URL using `npx`, for example:
`npx https://github.com/google-gemini/gemini-cli` (once merged to main).
This is achieved without requiring the bundle to be checked into
the repository.

Key changes and motivations:

- Modify `scripts.prepare` to run `npm run bundle`:
  Ensures the CLI bundle is generated automatically when `npx`
  installs the package from a git URL. This replaces previous
  approaches (e.g., using `prepack`) which were not consistently
  triggered in the `npx` environment.

- Update `scripts.bundle` to use a direct path for `esbuild`
  and externalize `sqlite3`:
  Using `node_modules/.bin/esbuild` provides a more reliable way
  to invoke the bundler. Externalizing `sqlite3` is crucial for
  correctly handling its native addon, preventing runtime errors.

- Add `bin`, `files`, and root `sqlite3` dependency:
  - The `bin` field defines the `gemini` command.
  - The `files` array ensures the generated `bundle/` directory is
    recognized by npm.
  - `sqlite3` is added as a root dependency to ensure it's
    installed by `npx` when `gemini-code` is fetched, allowing the
    externalized module to be resolved.

These changes collectively ensure that the necessary build artifacts
are created on-the-fly during `npx` installation, providing a
seamless execution experience directly from the GitHub repository URL.
2025-05-23 13:55:06 -07:00
Brandon Keiji 01971741e0
feat: add emphasis to tool confirmations (#502) 2025-05-23 05:28:31 +00:00
Allen Hutchison efee7c6cce
Feat: Add test coverage scripts and ignore reports (#477) 2025-05-21 17:03:22 -07:00
Jacob Richman 716f7875a2
Support Images and PDFs (#447) 2025-05-20 13:02:41 -07:00
Taylor Mullen 968e09f0b5 fix: Ensure filename is available for diff rendering in write-file
This commit resolves a bug where the `write-file` operation could fail to render content due to a missing filename.

The fix involves:
- Ensuring `fileName` is consistently passed to `DiffRenderer.tsx` through `ToolConfirmationMessage.tsx`, `ToolMessage.tsx`, and `useGeminiStream.ts`.
- Modifying `edit.ts` and `write-file.ts` to include `fileName` in the `FileDiff` object.
- Expanding the `FileDiff` interface in `tools.ts` to include `fileName`.

Additionally, this commit enhances the diff rendering by:
- Adding syntax highlighting based on file extension in `DiffRenderer.tsx`.
- Adding more language mappings to `getLanguageFromExtension` in `DiffRenderer.tsx`.
- Added lots of tests for all the above.

Fixes https://b.corp.google.com/issues/418125982
2025-05-16 10:13:13 -07:00
N. Taylor Mullen 7d818b46bc
feat: Enable CI test reporting and artifact management (#367) 2025-05-15 22:59:53 -07:00
Taylor Mullen 41b82ce796 Add bundling support.
- This can now be invoked with `npm run bundle`, it creates a `bundle/` folder that has:
  - gemini.js
  - sandbox-macos-minimal.sb
  - sandbox-macos-strict.sb
  - shell.json
  - shell.md

- This doesn't include any sort of automation for auto bundling pieces. It's just the root capability which we can weave into other locations.

Fixes https://b.corp.google.com/issues/411432723
2025-05-08 23:36:42 -07:00
Brandon Keiji 358281f0fd
fix: use react-jsx for typecheck (#280) 2025-05-07 12:36:04 -07:00
Brandon Keiji 49b5db29b3
feat: add build:sandbox and build:all npm scripts (#274) 2025-05-07 07:46:47 -07:00
Brandon Keiji 739654bb25
fix(sandbox): consolidate dev and prod sandbox (#273) 2025-05-07 07:23:13 -07:00
Brandon Keiji d051c0fd0f
feat: prototype publish sandbox script with npm package (#182) 2025-04-25 17:30:50 -07:00
Brandon Keiji d394a9f39f
feat: add flag to customize package version during pre-release staging (#155) 2025-04-24 13:02:49 -07:00
Brandon Keiji c24dc0ec77
feat: add react dev tools (#143) 2025-04-23 18:16:15 -07:00
Brandon Keiji 4c951ea435
feat: set dogfood artifact registry as the default publishing endpoint (#135) 2025-04-23 15:11:10 -07:00
Brandon Keiji 79710375e3
fix: point npmrc to dogfood artifact registry (#108) 2025-04-21 23:11:51 -07:00
Olcan 2571e07175
enable debugging through sandbox (#88) 2025-04-21 12:39:58 -07:00
Brandon Keiji e351baf10f
feat: add custom eslint rule for cross-package imports (#77) 2025-04-21 08:02:11 -07:00
Olcan 39bdedab9c
seamless sandboxing (just set GEMINI_CODE_SANDBOX=true in .env) (#76) 2025-04-21 07:50:18 -07:00
Taylor Mullen bfb064024e Revert debug undo. 2025-04-20 22:28:39 -04:00
Taylor Mullen ce0f2dd868 Update README to reflect current state of the world.
- We now have CI/CD
- We have linting support (so added a section)
- Fixed `npm run debug` to allow debugging again.
2025-04-20 22:25:20 -04:00
Tyler d55168f51f
add linter for checking license headers (and eslint --fix target to match, and fix missing license headers while we're here) (#62) 2025-04-20 17:16:25 -07:00
Olcan ef909f6335
start and debug scripts (will enable seamless container use later), strict error handling in bash scripts (#63)
#61
2025-04-20 14:50:12 -07:00
Brandon Keiji f480ef4bbc
refactor: clean up build output (#53)
* refactor: clean up build output

* refactor: add index.ts to package roots
2025-04-20 12:33:39 -07:00
Taylor Mullen 044ccc6dd7 Enable `npm run debug` from root. 2025-04-19 17:59:17 -04:00
Evan Senter 0c9e1ef61b
Adding some simple tests. (#54) 2025-04-19 18:07:24 +01:00
Allen Hutchison 3adc0dfbaf
Command line flags got broke. Now to run with flags run: (#46)
npm run start -- -m model-id -d data/dir
2025-04-18 16:41:51 -07:00
Brandon Keiji 52683dafc3
infra: add multipackage support (#34) 2025-04-18 14:37:02 -07:00
Evan Senter 482aeaff10
Warn if `npm run start` is out of date. (#20)
* Adding some wiring to allow the Ink app to warn if there are local development changes that haven't been captured in the recent build of the Gemini CLI.

* Adding a new useAppEffects.ts file that wores some useEffect handlers in.

* Updating package-lock.json to resolve `npm ci` issues.

* Updating package-lock.json and package.json to resolve `npm ci` issues.
2025-04-18 21:55:02 +01:00
Brandon Keiji 56d4a35d05
feat: initial configs for npm publishing (#30)
* feat: initial configs for npm publishing

* fix: workspace reference

* fix: include LICENSE in npm run build
2025-04-18 12:46:42 -07:00