Metadata-Version: 2.4
Name: pi-ragbox
Version: 0.0.11
Summary: Pi-RagBox CLI tool
Author-email: Zach Clifford <zach@withpi.ai>
License-Expression: LicenseRef-PiLabs-Proprietary
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: asttokens>=3.0.0
Requires-Dist: boto3>=1.34.0
Requires-Dist: click>=8.0.0
Requires-Dist: datasets>=3.6.0
Requires-Dist: executing>=2.2.1
Requires-Dist: fastapi[standard]>=0.115.0
Requires-Dist: hf-transfer>=0.1.9
Requires-Dist: httpx>=0.27.0
Requires-Dist: modal>=1.2.0
Requires-Dist: openai
Requires-Dist: opensearch-py>=2.4.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: pydantic>=2.12.3
Requires-Dist: pyinstrument>=5.1.1
Requires-Dist: pytest>=8.4.2
Requires-Dist: python-dotenv>=1.1.1
Requires-Dist: requests-aws4auth>=1.2.3
Requires-Dist: rich>=13.0.0
Requires-Dist: typer>=0.20.0
Requires-Dist: websockets>=12.0
Description-Content-Type: text/markdown

# pi-ragbox

Pi-RagBox CLI tool for managing and interacting with your RAG system on Pi Labs.

## Installation

```bash
pip install pi-ragbox
```

## Usage

### Authentication

Before using the CLI, you need to authenticate with your Pi Labs account:

```bash
# Log in with your Google account
pi-ragbox login

# Check who you're logged in as
pi-ragbox whoami

# Log out
pi-ragbox logout
```

The `login` command will open a browser window for Google OAuth authentication. After successful login, your session cookies are stored locally in `~/.pi-ragbox/config.json` and used for all subsequent API calls.

### Managing Projects

```bash
# List all your projects
pi-ragbox projects
```

### Other Commands

```bash
# Display help
pi-ragbox --help

# Check version
pi-ragbox version
```

## Configuration

The CLI can be configured using an environment variable:

- **`PI_RAGBOX_URL`**: Base URL for the application (default: `https://withpi.ai`)
  - Used for both API calls and browser-based authentication
  - Example: `export PI_RAGBOX_URL=https://withpi.ai`

### Example Configuration

For development (connecting to local instance):
```bash
export PI_RAGBOX_URL=http://localhost:3000
pi-ragbox login
```

For production:
```bash
export PI_RAGBOX_URL=https://withpi.ai
pi-ragbox login
```

Or simply use the default (no configuration needed for production):
```bash
pi-ragbox login  # Uses https://withpi.ai by default
```

## Development

This package is still under development and will change substantially.

### Building

```bash
cd backend/pi-ragbox
python -m build
```

### Publishing

The package is published to PyPI using GitHub Actions. See `.github/workflows/publish-pypi.yml` for details.
