AUGR - AI Dataset Augmentation Tool
AI-powered dataset augmentation tool using Braintrust proxy with structured outputs.
Features
- 🤖 Structured AI Outputs: Uses OpenAI's
beta.chat.completions.parsewith Pydantic schemas - 🧠 Braintrust Integration: Works with Braintrust proxy for multiple AI providers
- 🔄 Interactive Workflows: Guided dataset augmentation with iterative refinement
- 📊 Schema-aware Generation: Automatically infers and respects dataset schemas
- ⚡ Modern Tooling: Built with
uvfor fast dependency management
Installation
Option 1: Install from PyPI
# Install globally
pip install augr
# Or with pipx (recommended for CLI tools)
pipx install augr
# Or with uv
uv tool install augr
# Then use anywhere
augr
Option 2: Install from GitHub
# Install latest version
pip install git+https://github.com/Marviel/augr.git
# Or with uv
uv tool install git+https://github.com/Marviel/augr.git
# Then use anywhere
augr
Option 3: Development Setup
For development or local installation:
git clone https://github.com/Marviel/augr.git
cd augr
uv sync --all-extras --dev
# Test the installation
uv run python test_installation.py
# Use anywhere
uv run augr
Usage
First Run Setup
The first time you run AUGR, it will guide you through setup:
augr
AUGR will:
- Check for a Braintrust API key
- If none found, guide you to get one from https://www.braintrust.dev/app/settings/api-keys
- Save the key securely in
~/.augr/config.json - Start the interactive tool
Configuration
AUGR checks for your API key in this order:
BRAINTRUST_API_KEYenvironment variable~/.augr/config.jsonfile- Interactive setup (first time)
Running
The tool provides an interactive CLI with two main modes:
- Guided Dataset Augmentation: Interactive workflow with iterative refinement
- Direct JSON Upload: Upload pre-generated samples directly
augr
Uninstalling
To completely remove AUGR and all its configuration:
augr uninstall
# or
augr-uninstall
This will:
- Remove
~/.augr/directory and all configuration - Uninstall the AUGR package
Development
Install with development dependencies:
uv pip install -e ".[dev]"
Run linting and formatting:
uv run black .
uv run ruff check .
Architecture
ai_client.py: Core AI interface with structured outputsaugmentation_service.py: Main service for dataset augmentationcli.py: Interactive command-line interfacemodels.py: Pydantic models for data structuresbraintrust_client.py: Braintrust API integration
API Example
from augr.ai_client import create_ai
from pydantic import BaseModel
class Response(BaseModel):
message: str
confidence: float
# Create AI client (reads BRAINTRUST_API_KEY from env)
ai = create_ai(model="gpt-4o", temperature=0.0)
# Generate structured output
result = await ai.gen_obj(
schema=Response,
messages=[{"role": "user", "content": "Hello!"}],
thinking_enabled=True # For reasoning models
)
print(result.message) # Structured output
Contributing
Making a Release
This project uses automated releases via GitHub Actions:
- Update version in
pyproject.toml - Create and push a git tag:
git tag -a v0.2.0 -m "Release v0.2.0" && git push origin v0.2.0 - GitHub Actions will automatically:
- Run tests
- Build the package
- Upload to PyPI
- Create GitHub release
See RELEASE.md for detailed instructions.
Development
# Clone and setup
git clone https://github.com/Marviel/augr.git
cd augr
uv sync --all-extras --dev
# Run tests
uv run python test_installation.py
# Format code
uv run black .
uv run ruff check --fix .
# Build package
uv run python -m build
License
MIT
Metadata
Release files for augr 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| augr-0.2.0.tar.gz | 106.9 kB | Without provenance | Details for augr-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| augr-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for augr-0.2.0-py3-none-any.whl |
Total release size: 132.5 kB
Release files / augr-0.2.0.tar.gz
| Download URL | augr-0.2.0.tar.gz |
|---|---|
| Size | 106.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72e3d3ae9fd93259345c2486efd3f417e07a09d1af51c8592c71e7214282b607
|
|
BLAKE2b-256 checksum How to use checksums |
c2f9862159094f5d71daea0d06cb0f1e1006715e5d223558cfd8d5d7d680e65f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / augr-0.2.0-py3-none-any.whl
| Download URL | augr-0.2.0-py3-none-any.whl |
|---|---|
| Size | 25.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02017b7290dab27d5b1019fefb8230e2e17bd4d5c6ea2a1f5851379e20a7c5a8
|
|
BLAKE2b-256 checksum How to use checksums |
9ab93a0cb2639e8bcf176f6f6ba1913e2e28f1cc32b8c863f0dcea11fce1bdec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for augr 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.