GemChat is a AI powered CLI assistant with file system capabilities. Built with TypeScript, it provides an interactive interface for communicating with the Gemini AI model and includes tools to perform file system operations.
Disclaimer: This project is not affiliated with, endorsed by, or associated with Google or the Gemini AI team. It is an independent project created for development and testing purposes only.
- Interactive CLI-based chat interface
- File system operations through natural language
- Smart context handling
- Error recovery and graceful degradation
- Node.js v18 or higher
- npm v8 or higher
- A Gemini API key (Get one for free at https://makersuite.google.com/app/apikey)
- Install GemChat globally:
npm install -g gemchat
- Set up your Gemini API key using one of these methods:
Option 1: Shell configuration
# Add to .bashrc or .zshrc
echo 'export GEMINI_API_KEY=your-api-key' >> ~/.bashrc
source ~/.bashrc
Option 2: Direct export
export GEMINI_API_KEY=your-api-key
-
Run GemChat with available options:
gemchat [options]
Alternatively, you can run without installing globally using npx:
npx gemchat [options]
Available Options:
Options: -V, --version output version number -k, --key <key> Gemini API key (can also use GEMINI_API_KEY env var) -m, --model <name> Gemini model to use (default: "gemini-2.0-flash") -l, --langsmith-key <key> LangSmith API key for tracing (can also use LANGSMITH_API_KEY env var) -t, --tracing Enable tracing with LangSmith (default: false) -h, --no-history Disable chat history saving --help display help for command
Examples:
# Using global installation gemchat --key your-api-key gemchat --model gemini-2.5-pro-exp-03-25 # Using npx npx gemchat --key your-api-key npx gemchat --tracing --langsmith-key your-langsmith-key
GemChat supports various file system operations through natural language commands:
-
File Operations
# Read files > Show me the contents of config.json # Create files > Create a new file called hello.js with a simple Hello World program # Update files > Add error handling to the main function in index.js # Get file/directory info > What's the size of the images directory?
-
Folder Operations
# Create new folders > Create a folder called src/components # Move folders > Move the utils folder into src # Rename folders > Rename the helpers folder to utils # Delete folders > Delete the temp directory
-
Search Operations
# Find files by pattern > Find all JavaScript files in the src directory # Search with recursive option > Search for files containing "test" in all directories
-
File Management
# Copy files > Copy config.dev.json to config.prod.json # Move files > Move old-readme.md to docs/archive.md # List directory contents > Show me what's in the src folder
-
Common Use Cases
# Setting up a new project structure > Create a new React project structure with components, styles, and utils folders # Bulk file operations > Move all test files into the __tests__ directory # Project cleanup > Delete all temporary files ending with .tmp
To set up the project for local development:
-
Clone the repository:
git clone https://github.com/jefreesujit/gemchat.git cd gemchat
-
Install dependencies:
npm install
-
Create a
.env
file:GEMINI_API_KEY=your-api-key
-
Start in development mode:
npm run start
-
For debugging, use the DEBUG environment variable:
DEBUG=true npm run start
We welcome contributions! Here's how you can help:
- Use the GitHub issue tracker
- Include steps to reproduce
- Attach relevant logs or screenshots
- Specify your environment details
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Follow the existing TypeScript conventions
- Use meaningful variable names
- Add comments for complex logic
- Keep functions focused and small
This project is licensed under the MIT License - see the LICENSE file for details.
Before contributing, please make sure to read and follow our Code of Conduct.
Thank you for your interest in contributing to GemChat!