Skip to content

Installation🔗

There are several ways to install Brag AI. Choose the one that best suits your needs.

The easiest way to install Brag AI is using uv:

uv tool install brag-ai

After installation, you can verify it worked by running:

brag --version

Using pipx🔗

If you prefer using pipx, you can install Brag AI with:

pipx install brag-ai

Using pip🔗

If you prefer using pip, you can install Brag AI with:

pip install brag-ai

However, please note that this will install brag-ai into your global Python environment, which might not be what you want. Make sure to use a virtual environment to install Brag AI if you don't want to have it installed globally.

Requirements🔗

  • Python 3.12 or higher
  • A GitHub account (for accessing repositories)
  • An LLM provider API key (for AI processing)

Environment Setup🔗

After installation, you'll need to set up your environment:

  1. (Optional) Get your GitHub Personal Access Token:

  2. Go to GitHub Settings > Developer Settings > Personal Access Tokens

  3. Create a new token with repo scope
  4. Save the token securely (e.g. add GITHUB_API_TOKEN=<your-token> to a .env file)
  5. This step is optional - if you don't provide a GitHub token, the brag document will only include public information

  6. Get your LLM provider API key:

  7. Sign up for an LLM provider account if you haven't already

  8. Create a new API key
  9. Save the key securely

  10. Set up your environment variables:

export GITHUB_API_TOKEN="your-github-token"
# Then, depending on the LLM provider you're using, set the following environment variables:
export OPENAI_API_KEY="your-openai-api-key"
export GEMINI_API_KEY="your-gemini-api-key"
export ANTHROPIC_API_KEY="your-anthropic-api-key"

You can also add these to your .bashrc, .zshrc, or equivalent shell configuration file for persistence.

Verifying Installation🔗

To verify everything is set up correctly:

# Check the installed version
brag --version

# Run a test command
brag --help

If you see the help message and version information, you're ready to start using Brag AI!

Next Steps🔗