Metadata-Version: 2.4
Name: clipbox
Version: 0.1.0
Summary: Shared clipboard across devices
Requires-Python: >=3.14
Requires-Dist: aiosqlite>=0.20
Requires-Dist: fastapi>=0.110
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: uvicorn>=0.29
Description-Content-Type: text/markdown

# clipbox

A self-hosted shared clipboard for copying text between devices on your local network.

## Features

- **Named buffers** -- create multiple independent text buffers
- **Auto-save** -- changes save automatically as you type, with a status indicator
- **Copy button** -- one-tap copy on both desktop and mobile
- **curl-friendly** -- read, write, and delete buffers from the terminal
- **Mobile-friendly** -- responsive UI that works on phones and tablets, installable as a PWA
- **SQLite storage** -- persistent, zero-config database stored in the platform-appropriate data directory

## Install

Requires Python 3.14+ and [uv](https://docs.astral.sh/uv/).

```sh
git clone <repo-url> && cd clipbox
uv sync
```

## Usage

```sh
clipbox
```

This starts the server on `http://0.0.0.0:8080`. Open it in a browser from any device on your network.

### Options

```
clipbox --host 0.0.0.0 --port 8080
```

| Flag | Default | Description |
|------|---------|-------------|
| `--host` | `0.0.0.0` | Bind address |
| `-p`, `--port` | `8080` | Port number |

### curl

Read a buffer:

```sh
curl http://host:8080/my-buffer
```

Write to a buffer:

```sh
curl -X PUT -d 'some text' http://host:8080/my-buffer
```

Delete a buffer:

```sh
curl -X DELETE http://host:8080/my-buffer
```

### Environment variables

| Variable | Default | Description |
|----------|---------|-------------|
| `CLIPBOX_DB` | *(see below)* | Path to the SQLite database file |

### Data storage

The database is stored in the platform-appropriate data directory by default:

| Platform | Path |
|----------|------|
| Linux | `~/.local/share/clipbox/clipbox.db` |
| macOS | `~/Library/Application Support/clipbox/clipbox.db` |
| Windows | `%LOCALAPPDATA%\clipbox\clipbox.db` |

Override with the `CLIPBOX_DB` environment variable.
