Skip to content

Latest commit

 

History

History
114 lines (82 loc) · 1.99 KB

File metadata and controls

114 lines (82 loc) · 1.99 KB

Quick Start Guide

Get up and running with ab in 60 seconds!

1. Check Python Version

python3 --version  # Should be 3.10+
python scripts/check_python_version.py

2. Install uv (if not already installed)

# 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"

3. Install Dependencies

# Create virtual environment and install (uv handles this automatically)
uv sync

# Or install in development mode
uv pip install -e .

# Or from PyPI (when published)
uv pip install ab

4. Activate Virtual Environment

# uv creates .venv automatically
source .venv/bin/activate  # macOS/Linux
# or
.venv\Scripts\activate  # Windows

5. Verify Installation

python scripts/quick_start.py

6. Run an Example

# List examples
python scripts/list_examples.py

# Run one
python scripts/run_example.py project_planner

7. Use in Your Code

import asyncio
from ab import ABClient
from uuid import uuid4

async def main():
    async with ABClient(project_id=uuid4()) as client:
        # Store awareness
        card_id = await client.store_awareness(
            prompt="User wants authentication",
            files=["src/auth.py"],
        )
        
        # Recall context
        context = await client.recall_shape("architecture_context")
        print(context)

asyncio.run(main())

That's it! ab is ready to use.

Next Steps

Troubleshooting

Python version?

python scripts/check_python_version.py

Database issues?

python scripts/setup_db.py --test

Import errors?

uv sync
# or
uv pip install -e .

See SETUP.md for detailed setup instructions.