Metadata-Version: 2.4
Name: powder-cli
Version: 0.1.1
Summary: Upload financial statements and extract structured data from the command line
Author-email: Powder <engineering@powderfi.com>
License: Proprietary
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0
Requires-Dist: requests>=2.28
Requires-Dist: rich>=13.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: responses>=0.23; extra == "dev"
Requires-Dist: ruff>=0.4.0; extra == "dev"

# powder-cli

Python CLI for the Powder API — upload financial statements and extract structured data.

## Installation

```bash
pip install powder-cli
```

Requires Python 3.10+.

## Quick Start

### 1. Set Your API Token

```bash
export POWDER_API_TOKEN="your-token-here"
```

Add to `~/.zshrc` or `~/.bashrc` to persist. To get a token, contact support@powderfi.com.

Alternatively, use `powder configure` for interactive setup (saves to `~/.config/powder/config.json`).

### 2. Upload a Statement

```bash
powder upload statement.pdf
```

This returns an upload ID that you'll use to check status and retrieve data.

### 3. Check Status

```bash
powder status 12345
```

Or watch until processing completes:

```bash
powder status 12345 --watch
```

### 4. Retrieve Data

```bash
powder data 12345
```

View data as a table:

```bash
powder data 12345 --format table
```

## Supported File Types

| Format | Extensions |
|--------|-----------|
| PDF | `.pdf` |
| Images | `.png`, `.jpg`, `.jpeg` |
| Spreadsheets | `.xlsx` |

Maximum file size: **50 MB**

## JSON Output

All CLI commands support `--json` for machine-readable output. The flag goes **before** the command:

```bash
powder --json upload statement.pdf
powder --json status 12345
powder --json data 12345
```

## Authentication

The CLI checks for credentials in this order:

1. `POWDER_API_TOKEN` environment variable
2. `~/.config/powder/config.json` (created by `powder configure`)

To get an API token, contact support@powderfi.com.

## Claude Code Plugin

A Claude Code plugin is available at [Powder-Finance/claude-code-powder-plugin](https://github.com/Powder-Finance/claude-code-powder-plugin) for conversational document uploads:

```
/Powder:setup     # Install CLI + verify token
/Powder:upload    # Upload → process → extract → summarize
/Powder:data      # Fetch data for an existing upload
/Powder:status    # Check processing status
```
