Installation¶
This guide covers different ways to install gi on your system.
Prerequisites¶
- Python 3.10 or higher
- pip (Python package installer)
Installation Methods¶
🎯 Recommended: pipx (Isolated Environment)¶
pipx is the recommended way to install gi as it creates an isolated environment, preventing dependency conflicts.
# Install pipx if you don't have it
python -m pip install --user pipx
python -m pipx ensurepath
# Install gi
pipx install gi
Benefits: - ✅ Isolated from other Python packages - ✅ No dependency conflicts - ✅ Easy to update and uninstall - ✅ Works on all platforms
📦 Standard: pip¶
Install directly with pip:
🐍 Virtual Environment¶
For development or if you prefer isolated environments:
# Create virtual environment
python -m venv gi-env
# Activate (Linux/macOS)
source gi-env/bin/activate
# Activate (Windows)
gi-env\Scripts\activate
# Install gi
pip install gi
🏗️ From Source¶
For development or latest features:
# Clone repository
git clone https://github.com/sempervent/gi.git
cd gi
# Install in development mode
pip install -e .
# Or install with development dependencies
pip install -e ".[dev]"
📱 Platform-Specific¶
macOS¶
# Using Homebrew (if available)
brew install python
pipx install gi
# Or using MacPorts
sudo port install python39
pipx install gi
Linux (Ubuntu/Debian)¶
# Update package list
sudo apt update
# Install Python and pip
sudo apt install python3 python3-pip
# Install gi
pipx install gi
Windows¶
# Using Chocolatey
choco install python
pipx install gi
# Or download Python from python.org
# Then run: pipx install gi
🚀 Download Executables¶
For users who prefer not to install Python, we provide pre-built executables:
Download from GitHub Releases¶
Visit our Releases page and download the appropriate executable for your platform:
- Linux x86_64:
gi-{version}-linux-x86_64.tar.gz - Windows x86_64:
gi-{version}-windows-x86_64.zip - macOS x86_64:
gi-{version}-macos-x86_64.tar.gz - macOS ARM64:
gi-{version}-macos-arm64.tar.gz
Installation from Executables¶
Linux/macOS¶
# Download and extract
wget https://github.com/sempervent/gi/releases/download/v0.1.0/gi-0.1.0-linux-x86_64.tar.gz
tar -xzf gi-0.1.0-linux-x86_64.tar.gz
# Make executable and move to PATH
chmod +x gi
sudo mv gi /usr/local/bin/
# Verify installation
gi --help
Windows¶
# Download and extract
Invoke-WebRequest -Uri "https://github.com/sempervent/gi/releases/download/v0.1.0/gi-0.1.0-windows-x86_64.zip" -OutFile "gi.zip"
Expand-Archive -Path "gi.zip" -DestinationPath "gi"
# Add to PATH (optional)
# Move gi.exe to a directory in your PATH
✅ Verify Installation¶
After installation, verify that gi is working:
Expected output:
gi version 0.1.0
Usage: gi [OPTIONS] COMMAND [ARGS]...
A CLI tool to combine .gitignore templates from github/gitignore
Commands:
main Combine .gitignore templates into a single file.
list List all available .gitignore templates.
search Search for .gitignore templates by name.
show Show the raw content of a .gitignore template.
doctor Show diagnostic information about gi's cache and configuration.
🔄 Updating¶
Using pipx¶
Using pip¶
Using Executables¶
Download the latest release from GitHub Releases.
🗑️ Uninstalling¶
pipx¶
pip¶
Manual Cleanup¶
If you installed manually, you may need to:
- Remove the executable from your PATH
- Delete cache directory:
- Linux/macOS:
~/.cache/gi - Windows:
%LOCALAPPDATA%\gi\cache
🐛 Troubleshooting¶
Command Not Found¶
If gi command is not found after installation:
- Check PATH: Ensure the installation directory is in your PATH
- Restart terminal: Close and reopen your terminal
- Check installation: Verify with
pip list | grep giorpipx list
Permission Errors¶
If you get permission errors:
Python Version Issues¶
Ensure you have Python 3.10 or higher:
Network Issues¶
If you have network restrictions:
- Use cached templates (works offline)
- Configure proxy settings if needed
- Check firewall settings
📞 Getting Help¶
If you encounter issues:
- Check our Troubleshooting Guide
- Search GitHub Issues
- Create a new issue with details about your problem
Next: Quick Start Guide to get up and running with gi!