This project uses uv for fast, reliable Python package management.
- ⚡ 10-100x faster than pip
- 🔒 Deterministic dependency resolution
- 🎯 Automatic virtual environment management
- 📦 Modern tooling built for Python 3.10+
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or with Homebrew
brew install uv
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"# Clone repository
git clone <repo-url>
cd ab
# One command setup (creates venv + installs dependencies)
uv sync
# Or use the setup script
./scripts/setup_uv.sh # macOS/Linux
# or
.\scripts\setup_uv.ps1 # Windows# uv run works without activation, but for interactive use:
source .venv/bin/activate # macOS/Linux
.venv\Scripts\activate # Windows# Install dependencies
uv sync
# Run tests
uv run pytest tests/
# Run scripts
uv run python scripts/quick_start.py
# Or activate venv for interactive use
source .venv/bin/activate
pytest tests/# Add to pyproject.toml, then:
uv sync
# Or install directly
uv pip install package-name# Update lock file
uv lock
# Sync with updated dependencies
uv syncuv automatically creates .venv/ in the project root:
- ✅ Created automatically with
uv sync - ✅ No manual setup needed
- ✅ Can be activated manually
- ✅ Gitignored (already in
.gitignore)
| Task | Command |
|---|---|
| Setup project | uv sync |
| Run command | uv run <command> |
| Install package | uv pip install <package> |
| Update lock | uv lock |
| List Python versions | uv python list |
| Install Python | uv python install 3.10 |
If you're used to pip, here's the mapping:
| pip | uv |
|---|---|
pip install -e ".[dev]" |
uv sync |
pip install package |
uv pip install package |
python script.py |
uv run python script.py |
pytest tests/ |
uv run pytest tests/ |
- ✅ Use
uv syncfor initial setup and dependency updates - ✅ Use
uv runfor one-off commands (no activation needed) - ✅ Activate venv for interactive development sessions
- ✅ Commit
uv.lockfor reproducible builds (when generated) - ✅ Use
.python-versionto specify Python version
# Add to PATH
export PATH="$HOME/.cargo/bin:$PATH"
# Or restart terminal after installation# Delete and recreate
rm -rf .venv
uv sync# Generate lock file
uv lock
# Note: uv.lock is optional but recommended for reproducibility- uv Documentation
- uv GitHub
- See
.cursor/context/uv_setup.mdfor detailed guide