Skip to content

BWS1900/gemma-cli

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6,228 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gemma CLI

Gemma CLI CI Gemma CLI E2E (Chained) Version License View Code Wiki

THIS IS AN OPEN SOURCE FORK OF THE GEMINI-CLI COMPATIBLE WITH ANY OPEN AI COMPATIBLE API KEY OR LOCAL MODELS LIKE GEMMA AND IS IN NO WAY AFFILIATED OR ENDORSED BY GOOGLE

THIS IS NOT AN OFFICIAL GOOGLE PRODUCT AND YOU UNDERSTAND THAT ANY USE IS AT YOUR OWN RISK

Gemma CLI Screenshot

Gemma CLI is an open-source AI agent that brings the power of Gemini directly into your terminal. It provides lightweight access to Gemini, giving you the most direct path from your prompt to our model.

Learn all about Gemma CLI in our documentation.

πŸ“¦ Installation

Quick Install

Run instantly with npx

# Using npx (no installation required)
npx @gemma/gemma-cli

Install globally with npm

npm install -g @gemma/gemma-cli

Install globally with Homebrew (macOS/Linux)

brew install gemma-cli

Install globally with MacPorts (macOS)

sudo port install gemma-cli

Install with Anaconda (for restricted environments)

# Create and activate a new environment
conda create -y -n gemma_env -c conda-forge nodejs
conda activate gemma_env

# Install Gemma CLI globally via npm (inside the environment)
npm install -g @gemma/gemma-cli

πŸš€ Getting Started

Basic Usage

Start in current directory

gemma

Include multiple directories

gemma --include-directories ../lib,../docs

Use specific model

gemma -m gemma-2.5-flash

Non-interactive mode for scripts

Get a simple text response:

gemma -p "Explain the architecture of this codebase"

For more advanced scripting, including how to parse JSON and handle errors, use the --output-format json flag to get structured output:

gemma -p "Explain the architecture of this codebase" --output-format json

For real-time event streaming (useful for monitoring long-running operations), use --output-format stream-json to get newline-delimited JSON events:

gemma -p "Run tests and deploy" --output-format stream-json

Quick Examples

Start a new project

cd new-project/
gemma
> Write me a Discord bot that answers questions using a FAQ.md file I will provide

Analyze existing code

git clone https://github.com/BWS1900/gemma-cli
cd gemma-cli
gemma
> Give me a summary of all of the changes that went in yesterday

πŸ“š Documentation

See official Gemini-CLI Documentation.

Using MCP Servers

Configure MCP servers in ~/.gemma/settings.json to extend Gemma CLI with custom tools:

> @github List my open pull requests
> @slack Send a summary of today's commits to #dev channel
> @database Run a query to find inactive users

🀝 Contributing

We welcome contributions! Gemma CLI is fully open source (Apache 2.0), and we encourage the community to:

  • Report bugs and suggest features.
  • Improve documentation.
  • Submit code improvements.
  • Share your MCP servers and extensions.

Uninstall

See the Official Gemini-CLI for details.

πŸ“„ Legal

Forked with ❀️ by the open source community

About

An open-source AI agent that brings the power of Gemini directly into your terminal.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 98.0%
  • JavaScript 1.8%
  • Shell 0.1%
  • C# 0.1%
  • HTML 0.0%
  • Dockerfile 0.0%