This guide will walk you through installing Fraim and setting up your environment for AI-powered security analysis.

Prerequisites

Before installing Fraim, ensure you have the following:
  • Python 3.12 or higher
  • uv package manager (recommended for dependency management)
  • Git (for cloning repositories)
  • API key for your chosen AI provider (Gemini, OpenAI, Anthropic, etc.)
# Examples of exporting your API key to the env where you will run fraim
export GEMINI_API_KEY=your_api_key_here
export OPENAI_API_KEY=your_api_key_here
export ANTHROPIC_API_KEY=your_api_key_here

Installation Methods

pipx is the easiest way to install and run Python applications and is the recommended way to install Fraim.

1. Install pipx

NOTE: see pipx docs for additional installation methods macOS:
brew install pipx
pipx ensurepath
Linux: Ubuntu 23.04 or above
sudo apt update
sudo apt install pipx
pipx ensurepath
Fedora:
sudo dnf install pipx
pipx ensurepath
Windows (PowerShell):
scoop install pipx
pipx ensurepath

2. Install Fraim

# Install Fraim
pipx install fraim

# Verify installation
fraim --help

Method 2: Using pip

If you prefer to use pip or can’t install pipx, you can install Fraim using standard Python packaging tools.
# Install Fraim
pip install fraim

# Verify installation
fraim --help

Method 3: Development Installation

For contributors or users who want to modify Fraim:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone the repository
git clone https://github.com/fraim-dev/fraim.git
cd fraim

# Install with development dependencies
uv sync --dev

# Install pre-commit hooks (optional)
uv run pre-commit install

# Run tests to verify installation
uv run pytest

Getting Help

If you encounter issues:
  1. Check Debug Output:
    fraim --debug code --location .
    
  2. Verify Dependencies:
    uv pip list
    
  3. Check System Requirements:
    python --version
    pipx --version
    uv --version
    git --version
    
  4. Report Issues:
    • Check GitHub Issues
    • Create a new issue with debug output and system information

Next Steps

After successful installation:
  1. Read the CLI Usage Guide to learn how to use Fraim
  2. Explore Workflows to understand available analysis types
  3. Try analyzing your first project:
    fraim code --location /path/to/your/project
    

Congratulations! You’re now ready to start using Fraim for AI-powered security analysis. Check out the CLI Usage Guide to begin your first scan.