GEMINI.md
GEMINI.mdGEMINI.mdroot
Quality
91/100
Scores the file, not the repository.Length
616 words
7 headings · 0 code blocksRepository
106k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# Gemini CLI Project Context23Gemini CLI is an open-source AI agent that brings the power of Gemini directly4into the terminal. It is designed to be a terminal-first, extensible, and5powerful tool for developers.67## Project Overview89- **Purpose:** Provide a seamless terminal interface for Gemini models,10 supporting code understanding, generation, automation, and integration via MCP11 (Model Context Protocol).12- **Main Technologies:**13 - **Runtime:** Node.js (>=20.0.0, recommended ~20.19.0 for development)14 - **Language:** TypeScript15 - **UI Framework:** React (using [Ink](https://github.com/vadimdemedes/ink)16 for CLI rendering)17 - **Testing:** Vitest18 - **Bundling:** esbuild19 - **Linting/Formatting:** ESLint, Prettier20- **Architecture:** Monorepo structure using npm workspaces.21 - `packages/cli`: User-facing terminal UI, input processing, and display22 rendering.23 - `packages/core`: Backend logic, Gemini API orchestration, prompt24 construction, and tool execution.25 - `packages/a2a-server`: Experimental Agent-to-Agent server.26 - `packages/sdk`: Programmatic SDK for embedding Gemini CLI capabilities.27 - `packages/devtools`: Integrated developer tools (Network/Console inspector).28 - `packages/test-utils`: Shared test utilities and test rig.29 - `packages/vscode-ide-companion`: VS Code extension pairing with the CLI.3031## Building and Running3233- **Install Dependencies:** `npm install`34- **Build All:** `npm run build:all` (Builds packages, sandbox, and VS Code35 companion)36- **Build Packages:** `npm run build`37- **Run in Development:** `npm run start`38- **Run in Debug Mode:** `npm run debug` (Enables Node.js inspector)39- **Bundle Project:** `npm run bundle`40- **Clean Artifacts:** `npm run clean`4142## Testing and Quality4344- **Test Commands:**45 - **Unit (All):** `npm run test`46 - **Integration (E2E):** `npm run test:e2e`47 - > **NOTE**: Please run the memory and perf tests locally **only if** you are48 > implementing changes related to those test areas. Otherwise skip these49 > tests locally and rely on CI to run them on nightly builds.50 - **Memory (Nightly):** `npm run test:memory` (Runs memory regression tests51 against baselines. Excluded from `preflight`, run nightly.)52 - **Performance (Nightly):** `npm run test:perf` (Runs CPU performance53 regression tests against baselines. Excluded from `preflight`, run nightly.)54 - **Workspace-Specific:** `npm test -w <pkg> -- <path>` (Note: `<path>` must55 be relative to the workspace root, e.g.,56 `-w @google/gemini-cli-core -- src/routing/modelRouterService.test.ts`)57- **Full Validation:** `npm run preflight` (Heaviest check; runs clean, install,58 build, lint, type check, and tests. Recommended before submitting PRs. Due to59 its long runtime, only run this at the very end of a code implementation task.60 If it fails, use faster, targeted commands (e.g., `npm run test`,61 `npm run lint`, or workspace-specific tests) to iterate on fixes before62 re-running `preflight`. For simple, non-code changes like documentation or63 prompting updates, skip `preflight` at the end of the task and wait for PR64 validation.)65- **Individual Checks:** `npm run lint` / `npm run format` / `npm run typecheck`6667## Development Conventions6869- **Contributions:** Follow the process outlined in `CONTRIBUTING.md`. Requires70 signing the Google CLA.71- **Pull Requests:** Keep PRs small, focused, and linked to an existing issue.72 Always activate the `pr-creator` skill for PR generation, even when using the73 `gh` CLI.74- **Commit Messages:** Follow the75 [Conventional Commits](https://www.conventionalcommits.org/) standard.76- **Imports:** Use specific imports and avoid restricted relative imports77 between packages (enforced by ESLint).78- **License Headers:** For all new source code files (`.ts`, `.tsx`, `.js`),79 include the Apache-2.0 license header with the current year. (e.g.,80 `Copyright 2026 Google LLC`). This is enforced by ESLint.8182## Testing Conventions8384- **Environment Variables:** When testing code that depends on environment85 variables, use `vi.stubEnv('NAME', 'value')` in `beforeEach` and86 `vi.unstubAllEnvs()` in `afterEach`. Avoid modifying `process.env` directly as87 it can lead to test leakage and is less reliable. To "unset" a variable, use88 an empty string `vi.stubEnv('NAME', '')`.8990## Documentation9192- Always use the `docs-writer` skill when you are asked to write, edit, or93 review any documentation.94- Documentation is located in the `docs/` directory.95- Suggest documentation updates when code changes render existing documentation96 obsolete or incomplete.97
Also in google-gemini/gemini-cli
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| google-gemini/gemini-clipackages/a2a-server/GEMINI.md · 106k | GEMINI.md | test | 37/100 | 3 days ago | |
| google-gemini/gemini-clipackages/cli/GEMINI.md · 106k | GEMINI.md | teststyleui | 47/100 | 3 days ago | |
| google-gemini/gemini-clipackages/core/GEMINI.md · 106k | GEMINI.md | teststyle | 63/100 | 3 days ago | |
| google-gemini/gemini-clipackages/devtools/GEMINI.md · 106k | GEMINI.md | setupbuildarchapi+1 | 74/100 | 3 days ago | |
| google-gemini/gemini-clipackages/sdk/GEMINI.md · 106k | GEMINI.md | teststyle | 41/100 | 3 days ago | |
| google-gemini/gemini-clipackages/test-utils/GEMINI.md · 106k | GEMINI.md | testarchtesting-strategy | 58/100 | 3 days ago | |
| google-gemini/gemini-clipackages/vscode-ide-companion/GEMINI.md · 106k | GEMINI.md | buildtest | 41/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| diegosouzapw/OmniRouteGEMINI.md · 38k | GEMINI.md | testlint-formatarchsecurity+2 | 87/100 | 3 days ago | |
| compozy/gographGEMINI.md · 9 | GEMINI.md | setuptestlint-formatarch+4 | 86/100 | 3 days ago | |
| nordeim/misc1/GEMINI.md · 0 | GEMINI.md | setupbuildtestlint-format+3 | 81/100 | 3 days ago | |
| firebase/flutterfireGEMINI.md · 9.2k | GEMINI.md | lint-formatstylearchdo-not+1 | 80/100 | 3 days ago | |
| nodejs/nodedeps/v8/GEMINI.md · 119k | GEMINI.md | buildteststylearch+4 | 77/100 | 3 days ago | |
| abpframework/abpnpm/ng-packs/packages/schematics/src/commands/ai-config/files/gemini/.gemini/GEMINI.md · 14k | GEMINI.md | testlint-formatstylearch+8 | 76/100 | 2 days ago | |
| zyx77550/spardaGEMINI.md · 4 | GEMINI.md | testlint-formatgitapi+2 | 75/100 | 3 days ago | |
| google-gemini/gemini-clipackages/devtools/GEMINI.md · 106k | GEMINI.md | setupbuildarchapi+1 | 74/100 | 3 days ago |
