gt-smart
v0.1.4
Published
Fast CLI for AI-assisted Git commits and smart push
Maintainers
Readme
gt — Lightning-fast Git companion
Features
- AI-generated commits — One-line messages with a fallback if the provider fails.
- Smart push —
gt pcommits (if needed) and pushes in one step. - Minimal terminal UX — No clutter, no noise.
- Manual control — Run commands when you want, nothing runs in the background.
Supports OpenAI and Gemini for generating commit messages.
Install
npm install -g gt-smartRequires Node.js 18+ and git on your PATH.
Setup
Create an API key:
- OpenAI — Get API key
- Gemini — Get API key
Set one environment variable:
macOS / Linux / Git Bash
export OPENAI_API_KEY="your_api_key_here"
# or
export GEMINI_API_KEY="your_api_key_here"Windows PowerShell
$env:OPENAI_API_KEY="your_api_key_here"
# or
$env:GEMINI_API_KEY="your_api_key_here"Alternatively, you can create a .env file in your project root:
OPENAI_API_KEY=your_api_key_here
# or
GEMINI_API_KEY=your_api_key_hereUsage
gt
gt s
gt c
gt pCommands
| Command | Description |
| --- | --- |
| gt c / gt commit | Stage files, generate an AI commit message, and commit immediately. |
| gt p / gt push | Smart push: auto-commit pending changes and push the current branch (or just push if nothing needs committing). |
| gt s / gt status | Show a concise git status summary. |
| gt h / gt help | Show inline help. |
Environment Variables
OPENAI_API_KEY=your_openai_key
GEMINI_API_KEY=your_gemini_keyExample
gt c # generate AI-assisted commit message and commit
gt p # auto-commit (if needed) and push
gt s # short git statusContributing
We welcome contributions. Feel free to open issues or submit pull requests. See CONTRIBUTING.md for more details.
