Getting Started
Learn how to install and configure GitGuru to start using AI-powered Git commands.
Prerequisites
Before installing GitGuru, make sure you have:
- Node.js 16+: GitGuru requires Node.js version 16 or higher
- Git: Git must be installed and configured on your system
- Gemini API Key: A free API key from Google AI Studio
Get Your Gemini API Key
Visit Google AI Studio to get your free Gemini API key. You'll need this to use GitGuru's AI features.
Installation
Install GitGuru globally using npm:
bash
npm install -g gitguruOr using yarn:
bash
yarn global add gitguruInstallation Complete
After installation, the
gg command will be available globally in your terminal.Configuration
Configure GitGuru with your Gemini API key:
bash
gg addkey YOUR_GEMINI_API_KEYReplace YOUR_GEMINI_API_KEY with your actual API key from Google AI Studio.
Verify Installation
Check that GitGuru is installed correctly:
bash
gg aboutThis will display information about your GitGuru installation, including version and configuration status.
Your First Command
Try asking GitGuru a question:
bash
gg ask "how do I create a new branch?"GitGuru will analyze your question and suggest the appropriate Git command with an explanation.
Natural Language
You can ask GitGuru questions in natural language, just like you would ask a colleague. The AI will understand your intent and suggest the right command.
Basic Usage Examples
Ask Questions
bash
gg ask "undo last commit but keep changes"Generate Commit Messages
bash
gg commit --aiLearn Git Concepts
bash
gg explain "What is a rebase?"Enhanced Status
bash
gg statusNext Steps
Now that you have GitGuru installed, explore these resources: