Go to file
Olcan 99f5ed9ecb
Minimal container setup. Install docker (or podman), build container with scripts/build_container.sh, then start with scripts/start_container.sh. Exit with ^C for now. (#61)
2025-04-20 08:22:17 -07:00
.github/workflows Fix remaining tslint errors (YAY). 2025-04-18 19:14:36 -04:00
.vscode Configure linter + prettier. 2025-04-17 15:29:34 -07:00
packages Minimal container setup. Install docker (or podman), build container with scripts/build_container.sh, then start with scripts/start_container.sh. Exit with ^C for now. (#61) 2025-04-20 08:22:17 -07:00
scripts Minimal container setup. Install docker (or podman), build container with scripts/build_container.sh, then start with scripts/start_container.sh. Exit with ^C for now. (#61) 2025-04-20 08:22:17 -07:00
.gitignore Quick fix gitignore (#49) 2025-04-19 07:01:54 -07:00
.npmrc fix: temporarily comment out .npmrc (#43) 2025-04-18 16:18:44 -07:00
.prettierrc.json Run `npm run format` 2025-04-17 15:29:34 -07:00
Dockerfile Minimal container setup. Install docker (or podman), build container with scripts/build_container.sh, then start with scripts/start_container.sh. Exit with ^C for now. (#61) 2025-04-20 08:22:17 -07:00
LICENSE add LICENSE (#25) 2025-04-18 10:30:07 -07:00
README.md Run `npm run format` 2025-04-17 15:29:34 -07:00
eslint.config.js Starting to modularize into separate cli / server packages. (#55) 2025-04-19 19:45:42 +01:00
package-lock.json Give Gemini Code a face lift. 2025-04-19 17:10:06 -04:00
package.json Enable `npm run debug` from root. 2025-04-19 17:59:17 -04:00
tsconfig.json Run `npm run format` 2025-04-18 18:10:57 -04:00

README.md

Gemini Code

Disclaimer: This README.md was created by gemini-code and this project was developed rapidly and currently lacks comprehensive testing, CI/CD pipelines, and other quality-of-life features common in mature projects.

This repository contains the Gemini Code CLI tool.

Setup

  1. Get a Gemini API Key: Obtain your API key from Google AI Studio: https://aistudio.google.com/app/apikey
  2. Set Environment Variable: Set the GEMINI_API_KEY environment variable to your obtained key. You can do this temporarily in your current shell session:
    export GEMINI_API_KEY="YOUR_API_KEY"
    
    Or add it to your shell's configuration file (like ~/.bashrc, ~/.zshrc, or ~/.profile) for persistence:
    echo 'export GEMINI_API_KEY="YOUR_API_KEY"' >> ~/.bashrc # Or your preferred shell config file
    source ~/.bashrc # Reload the config
    
    Replace "YOUR_API_KEY" with your actual key.

Building

To build the entire project, including the CLI package, run the following command from the root directory:

npm install
npm run build

This command installs dependencies and then runs the build script defined in the root package.json, which in turn executes the build scripts in all workspaces (including packages/cli).

Running

To start the Gemini Code CLI, run the following command from the root directory:

npm start

This command executes the start script defined in the root package.json, which specifically targets and runs the start script within the gemini-code-cli workspace.

Debugging

To debug the CLI application using VS Code:

  1. Start the CLI in debug mode from the root directory:
    npm run debug --workspace=gemini-code-cli
    
    This command runs node --inspect-brk dist/gemini.js within the packages/cli directory, pausing execution until a debugger attaches.
  2. In VS Code, use the "Attach" launch configuration (found in .vscode/launch.json). This configuration is set up to attach to the Node.js process listening on port 9229, which is the default port used by --inspect-brk.

Alternatively, you can use the "Launch Program" configuration in VS Code if you prefer to launch the currently open file directly, but the "Attach" method is generally recommended for debugging the main CLI entry point.

Formatting

To format the code in this project, run the following command from the root directory:

npm run format

This command uses Prettier to format the code according to the project's style guidelines.