A powerful CLI companion that helps you remember terminal commands, powered by Google's Gemini 2.0 Flash model.
- π§ Smart command suggestions based on natural language queries
- π― Platform-specific command recommendations
- π Automatic retry with exponential backoff
- π¨ Rich terminal output with colored feedback
- π Detailed command explanations
- π Clipboard integration
- β‘ Powered by Gemini 2.0 Flash for superior speed and accuracy
- π‘οΈ Graceful error handling and signal management
- π Easy to extend with modular architecture
- Python 3.8 or higher
GEMINI_API_KEY
environment variable (get it from Google AI Studio)
Using pip (global)
pwsh -Command "git clone https://github.com/ubranch/tai.git"
pwsh -Command "cd tai && pip install ."
For development:
# Clone the repository
pwsh -Command "git clone https://github.com/ubranch/tai.git"
pwsh -Command "cd tai"
# Install dependencies
pwsh -Command "uv venv --python 3.10"
pwsh -Command "uv activate"
pwsh -Command "uv pip install -r requirements.txt"
# Set your Gemini API key
pwsh -Command "$env:GEMINI_API_KEY='your_api_key_here'"
For permanent setup, add the above line to your PowerShell profile:
pwsh -Command "if (!(Test-Path -Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force }; Add-Content -Path $PROFILE -Value '$env:GEMINI_API_KEY=''your_api_key_here''''"
> tai "download youtube video as mp3"
yt-dlp -x --audio-format mp3 <youtube_video_url>
Downloads a YouTube video and converts it to an MP3 file using yt-dlp. Replace <youtube_video_url> with the actual URL.
Copy to clipboard? [y/n] (n): y
copied to clipboard!
- fix: model name to use correct version identifier (gemini-2.0-flash)
- docs: update documentation to reflect correct model information
- feat: upgrade to Gemini 2.0 Flash model for superior speed and accuracy
- perf: optimize model parameters for better command suggestions
- feat: increase token limit for more detailed responses
- tune: fine-tune temperature and top_p settings for improved stability
- feat: update to use Gemini 1.5 Pro model for improved reliability
- feat: add retry mechanism with exponential backoff
- enhance: error handling and feedback
- feat: add command explanations
- improve: platform-specific command detection
tai/
βββ core/ # Core functionality
βββ utils/ # Utility functions
βββ cli.py # Command-line interface
βββ config.py # Configuration management
βββ prompt.md # Prompt templates
βββ __init__.py # Package initialization
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes using conventional commits
- Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
We follow Conventional Commits. Examples:
- feat: add new feature
- fix: resolve bug
- docs: update documentation
- style: format code
- refactor: restructure code
- test: add tests
- chore: update dependencies
This project is licensed under the MIT License - see the LICENSE file for details.
- Google's Gemini team for providing the powerful AI model
- The Python community for excellent libraries
- All contributors who help make this project better