Metadata-Version: 2.4
Name: flowpad
Version: 0.1.7
Summary: Flow CLI $ SDK for flowpad
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: platformdirs
Requires-Dist: requests
Requires-Dist: fastapi
Requires-Dist: uvicorn[standard]
Requires-Dist: typer>=0.9.0
Requires-Dist: python-dotenv
Requires-Dist: keyring
Requires-Dist: fastmcp
Requires-Dist: httpx<1.0,>=0.24.0
Requires-Dist: websockets
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: aiosqlite
Requires-Dist: aiohttp
Requires-Dist: greenlet
Requires-Dist: pydantic>=2.0.0
Requires-Dist: psutil
Requires-Dist: ptyprocess
Requires-Dist: nest-asyncio>=1.6.0
Requires-Dist: pybars3~=0.9.7
Requires-Dist: aiofiles
Requires-Dist: beautifulsoup4
Requires-Dist: dpath
Requires-Dist: tiktoken
Requires-Dist: usearch
Requires-Dist: numpy
Requires-Dist: h2
Requires-Dist: groq
Requires-Dist: openai
Requires-Dist: anthropic
Requires-Dist: pydantic-ai-slim
Requires-Dist: distro
Requires-Dist: appdirs

# Flow CLI

A local desktop CLI and UI for FlowPad — manage hooks, traces, and agentic workflows from your terminal.

## Quick Start

```bash
pip install flowpad
flow          # prints version
flow start    # launches the UI server and opens browser
```

## Requirements

- Python >= 3.10
- Node.js (for frontend development)
- [uv](https://docs.astral.sh/uv/) (for backend dependency management)

## Installation

Install from PyPI:

```bash
pip install flowpad
```

Install a specific version:

```bash
pip install flowpad==0.1.5
```

Install from GitHub (latest):

```bash
pip install git+https://github.com/langware-labs/flow-cli.git
```

Verify the installation:

```bash
flow
# => flow 0.1.5
```

## Uninstallation

```bash
pip uninstall flowpad
```

## CLI Commands

| Command | Description |
|---------|-------------|
| `flow` | Print version |
| `flow start` | Start the UI server and open browser |
| `flow trace` | Start server and trace hook events in real-time |
| `flow setup <agent>` | Setup FlowPad for a coding agent (e.g. `claude-code`) |
| `flow hooks set` | Install Flow hooks into Claude Code settings |
| `flow hooks list` | List configured hooks |
| `flow hooks clear` | Remove Flow hooks from Claude Code settings |
| `flow config list` | List configuration values |
| `flow config set key=value` | Set a configuration value |
| `flow auth login` | Login to FlowPad (opens browser or accepts API key) |
| `flow auth logout` | Logout and remove stored credentials |
| `flow ping <string>` | Send a test ping to the local server |

## Development

### Backend

```bash
uv sync                    # install Python dependencies
python minihub/run.py      # start backend server on port 9007
```

The backend serves the API at `http://localhost:9007`. Bootstrap endpoint: `http://localhost:9007/api/v1/graph/bootstrap`

### Frontend

```bash
cd minihub/ui
npm install                # install Node dependencies
npm run dev                # start Vite dev server on port 4097
```

The frontend runs at `http://localhost:4097` and proxies API calls to the backend.

### Running Tests

```bash
# Backend API tests
python -m pytest tests/api/ -v

# Backend SDK unit tests
cd flow-sdk/python && python -m pytest tests/ -v

# Frontend build + lint
cd minihub/ui && npm run build && npm run lint
```

## Deployment

Use the deploy script to bump version, tag, push, and validate:

```bash
./scripts/deploy_to_github.sh              # runs tests first
./scripts/deploy_to_github.sh --skip-tests # skip tests
```

This will:
1. Increment the patch version in `_version.py`
2. Run tests (unless `--skip-tests`)
3. Commit and tag the release
4. Push to GitHub
5. Install from GitHub and validate the version
