Metadata-Version: 2.4
Name: alphai
Version: 0.3.1
Summary: A CLI tool and Python package for the runalph.ai platform
Author-email: Andrew Chang <andrew@runalph.ai>
Project-URL: Homepage, https://runalph.ai
Project-URL: Documentation, https://docs.runalph.ai
Project-URL: Repository, https://github.com/alph-ai/alphai
Project-URL: Issues, https://github.com/alph-ai/alphai/issues
Keywords: cli,api,data-science,alph
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: click>=8.1.0
Requires-Dist: rich>=13.0.0
Requires-Dist: alph-sdk>=0.7.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: questionary>=2.1.0
Requires-Dist: jupyterlab>=4.5.1
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"

# alphai

A CLI tool and Python package for the [runalph.ai](https://runalph.ai) platform.

## Installation

```bash
pip install alphai
```

## Quick Start

1. **Authenticate** with your runalph.ai account:
   ```bash
   alphai login
   ```

2. **Start JupyterLab** connected to Alph:
   ```bash
   alphai jupyter lab
   ```
   
   This will prompt you to select an organization and project, then start JupyterLab locally with cloud sync.

3. **Manage notebooks**:
   ```bash
   alphai nb
   ```
   
   Opens an interactive browser to view, upload, download, and manage your notebooks.

## Commands

### Authentication

```bash
alphai login              # Browser-based login (recommended)
alphai login --token TOK  # Login with a token from runalph.ai/account/tokens
alphai login --force      # Force re-authentication
alphai logout             # Clear credentials
alphai status             # Show auth status and config
```

### Jupyter

Start JupyterLab or Jupyter Notebook locally, connected to your Alph workspace:

```bash
alphai jupyter lab                          # Interactive org/project selection
alphai jupyter lab --org my-org --project my-project
alphai jupyter lab --port 9999              # Custom port
alphai jupyter lab --local-only             # Skip cloud connection
alphai jupyter lab --quiet                  # Suppress Jupyter logs
```

```bash
alphai jupyter notebook                     # Classic notebook interface
```

### Notebooks

Manage notebooks from the command line:

```bash
alphai nb                                   # Interactive browser
alphai nb list                              # List notebooks
alphai nb list --org my-org                 # List in specific org
alphai nb view <notebook-id>                # View in terminal
alphai nb info <notebook-id>                # Show notebook info
alphai nb upload analysis.ipynb --org my-org
alphai nb download <notebook-id>
alphai nb publish <notebook-id>             # Make public
alphai nb unpublish <notebook-id>           # Make private
alphai nb delete <notebook-id>
alphai nb search "machine learning"
alphai nb fork <notebook-id> --org my-org
alphai nb tags <notebook-id> --add "python,ml"
```

### Organizations & Projects

```bash
alphai orgs list                # List your organizations
alphai orgs select <org-id>     # Set current org context

alphai projects list            # List projects
alphai projects select <id>     # Set current project context
```

### Configuration

```bash
alphai config show              # View current config
alphai config set key value     # Set a config value
alphai config reset             # Reset to defaults
```

## Environment Variables

- `ALPHAI_BEARER_TOKEN`: Bearer token for authentication
- `ALPHAI_API_URL`: Custom API base URL
- `ALPHAI_DEBUG`: Enable debug mode

## Global Options

```bash
alphai --debug <command>        # Enable debug logging
alphai --version                # Show version
alphai --help                   # Show help
```

## Learn More

- Documentation: [docs.runalph.ai](https://docs.runalph.ai)
- Website: [runalph.ai](https://runalph.ai)
