# 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.parse` with 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 `uv` for fast dependency management
## Installation
### Option 1: Install from PyPI
```bash
# 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
```bash
# 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:
```bash
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:
```bash
augr
```
AUGR will:
1. Check for a Braintrust API key
2. If none found, guide you to get one from https://www.braintrust.dev/app/settings/api-keys
3. Save the key securely in `~/.augr/config.json`
4. Start the interactive tool
### Configuration
AUGR checks for your API key in this order:
1. `BRAINTRUST_API_KEY` environment variable
2. `~/.augr/config.json` file
3. Interactive setup (first time)
### Running
The tool provides an interactive CLI with two main modes:
1. **Guided Dataset Augmentation**: Interactive workflow with iterative refinement
2. **Direct JSON Upload**: Upload pre-generated samples directly
```bash
augr
```
### Uninstalling
To completely remove AUGR and all its configuration:
```bash
augr uninstall
# or
augr-uninstall
```
This will:
- Remove `~/.augr/` directory and all configuration
- Uninstall the AUGR package
### Development
Install with development dependencies:
```bash
uv pip install -e ".[dev]"
```
Run linting and formatting:
```bash
uv run black .
uv run ruff check .
```
## Architecture
- **`ai_client.py`**: Core AI interface with structured outputs
- **`augmentation_service.py`**: Main service for dataset augmentation
- **`cli.py`**: Interactive command-line interface
- **`models.py`**: Pydantic models for data structures
- **`braintrust_client.py`**: Braintrust API integration
## API Example
```python
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:
1. Update version in `pyproject.toml`
2. Create and push a git tag: `git tag -a v0.2.0 -m "Release v0.2.0" && git push origin v0.2.0`
3. GitHub Actions will automatically:
- Run tests
- Build the package
- Upload to PyPI
- Create GitHub release
See [RELEASE.md](RELEASE.md) for detailed instructions.
### Development
```bash
# 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
Raw data
{
"_id": null,
"home_page": null,
"name": "augr",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ai, augmentation, braintrust, dataset, machine-learning",
"author": null,
"author_email": "Luke Bechtel <your-email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/c2/f9/862159094f5d71daea0d06cb0f1e1006715e5d223558cfd8d5d7d680e65f/augr-0.2.0.tar.gz",
"platform": null,
"description": "# AUGR - AI Dataset Augmentation Tool\n\nAI-powered dataset augmentation tool using Braintrust proxy with structured outputs.\n\n## Features\n\n- \ud83e\udd16 **Structured AI Outputs**: Uses OpenAI's `beta.chat.completions.parse` with Pydantic schemas\n- \ud83e\udde0 **Braintrust Integration**: Works with Braintrust proxy for multiple AI providers\n- \ud83d\udd04 **Interactive Workflows**: Guided dataset augmentation with iterative refinement\n- \ud83d\udcca **Schema-aware Generation**: Automatically infers and respects dataset schemas\n- \u26a1 **Modern Tooling**: Built with `uv` for fast dependency management\n\n## Installation\n\n### Option 1: Install from PyPI\n\n```bash\n# Install globally\npip install augr\n\n# Or with pipx (recommended for CLI tools)\npipx install augr\n\n# Or with uv\nuv tool install augr\n\n# Then use anywhere\naugr\n```\n\n### Option 2: Install from GitHub\n\n```bash\n# Install latest version\npip install git+https://github.com/Marviel/augr.git\n\n# Or with uv\nuv tool install git+https://github.com/Marviel/augr.git\n\n# Then use anywhere\naugr\n```\n\n### Option 3: Development Setup\n\nFor development or local installation:\n\n```bash\ngit clone https://github.com/Marviel/augr.git\ncd augr\nuv sync --all-extras --dev\n\n# Test the installation\nuv run python test_installation.py\n\n# Use anywhere\nuv run augr\n```\n\n## Usage\n\n### First Run Setup\n\nThe first time you run AUGR, it will guide you through setup:\n\n```bash\naugr\n```\n\nAUGR will:\n1. Check for a Braintrust API key\n2. If none found, guide you to get one from https://www.braintrust.dev/app/settings/api-keys\n3. Save the key securely in `~/.augr/config.json`\n4. Start the interactive tool\n\n### Configuration\n\nAUGR checks for your API key in this order:\n1. `BRAINTRUST_API_KEY` environment variable\n2. `~/.augr/config.json` file\n3. Interactive setup (first time)\n\n### Running\n\nThe tool provides an interactive CLI with two main modes:\n\n1. **Guided Dataset Augmentation**: Interactive workflow with iterative refinement\n2. **Direct JSON Upload**: Upload pre-generated samples directly\n\n```bash\naugr\n```\n\n### Uninstalling\n\nTo completely remove AUGR and all its configuration:\n\n```bash\naugr uninstall\n# or\naugr-uninstall\n```\n\nThis will:\n- Remove `~/.augr/` directory and all configuration\n- Uninstall the AUGR package\n\n### Development\n\nInstall with development dependencies:\n\n```bash\nuv pip install -e \".[dev]\"\n```\n\nRun linting and formatting:\n\n```bash\nuv run black .\nuv run ruff check .\n```\n\n## Architecture\n\n- **`ai_client.py`**: Core AI interface with structured outputs\n- **`augmentation_service.py`**: Main service for dataset augmentation\n- **`cli.py`**: Interactive command-line interface\n- **`models.py`**: Pydantic models for data structures\n- **`braintrust_client.py`**: Braintrust API integration\n\n## API Example\n\n```python\nfrom augr.ai_client import create_ai\nfrom pydantic import BaseModel\n\nclass Response(BaseModel):\n message: str\n confidence: float\n\n# Create AI client (reads BRAINTRUST_API_KEY from env)\nai = create_ai(model=\"gpt-4o\", temperature=0.0)\n\n# Generate structured output\nresult = await ai.gen_obj(\n schema=Response,\n messages=[{\"role\": \"user\", \"content\": \"Hello!\"}],\n thinking_enabled=True # For reasoning models\n)\n\nprint(result.message) # Structured output\n```\n\n## Contributing\n\n### Making a Release\n\nThis project uses automated releases via GitHub Actions:\n\n1. Update version in `pyproject.toml`\n2. Create and push a git tag: `git tag -a v0.2.0 -m \"Release v0.2.0\" && git push origin v0.2.0`\n3. GitHub Actions will automatically:\n - Run tests\n - Build the package\n - Upload to PyPI\n - Create GitHub release\n\nSee [RELEASE.md](RELEASE.md) for detailed instructions.\n\n### Development\n\n```bash\n# Clone and setup\ngit clone https://github.com/Marviel/augr.git\ncd augr\nuv sync --all-extras --dev\n\n# Run tests\nuv run python test_installation.py\n\n# Format code\nuv run black .\nuv run ruff check --fix .\n\n# Build package\nuv run python -m build\n```\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "AI-powered dataset augmentation tool using Braintrust proxy",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/Marviel/augr",
"Issues": "https://github.com/Marviel/augr/issues",
"Repository": "https://github.com/Marviel/augr"
},
"split_keywords": [
"ai",
" augmentation",
" braintrust",
" dataset",
" machine-learning"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9ab93a0cb2639e8bcf176f6f6ba1913e2e28f1cc32b8c863f0dcea11fce1bdec",
"md5": "eaedf06856caa38c3375c4aa26d8e078",
"sha256": "02017b7290dab27d5b1019fefb8230e2e17bd4d5c6ea2a1f5851379e20a7c5a8"
},
"downloads": -1,
"filename": "augr-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eaedf06856caa38c3375c4aa26d8e078",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 25619,
"upload_time": "2025-07-11T20:48:52",
"upload_time_iso_8601": "2025-07-11T20:48:52.364227Z",
"url": "https://files.pythonhosted.org/packages/9a/b9/3a0cb2639e8bcf176f6f6ba1913e2e28f1cc32b8c863f0dcea11fce1bdec/augr-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c2f9862159094f5d71daea0d06cb0f1e1006715e5d223558cfd8d5d7d680e65f",
"md5": "a0fb0f67ef4e5048aeb2daf43fe0959c",
"sha256": "72e3d3ae9fd93259345c2486efd3f417e07a09d1af51c8592c71e7214282b607"
},
"downloads": -1,
"filename": "augr-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "a0fb0f67ef4e5048aeb2daf43fe0959c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 106870,
"upload_time": "2025-07-11T20:48:53",
"upload_time_iso_8601": "2025-07-11T20:48:53.199491Z",
"url": "https://files.pythonhosted.org/packages/c2/f9/862159094f5d71daea0d06cb0f1e1006715e5d223558cfd8d5d7d680e65f/augr-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 20:48:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Marviel",
"github_project": "augr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "augr"
}