Skip to main content

clipbox

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

Features

  • Named buffers -- create multiple independent text buffers
  • File sharing -- upload and download files alongside the 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
  • One-line client setup -- the server hands out its own cb and fb shell helpers
  • 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

Filenames are kept as sent -- spaces, accents, emoji and macOS screenshot names all round-trip. Uploads are stored under an opaque name on disk, so nothing in a filename can reach the filesystem.

Install

Requires Python 3.14+. Use uv.

Usage

uvx clipbox

OR

uvx clipbox --host 0.0.0.0 --port 8080

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

Shell helpers

cb and fb wrap the API as shell commands, with tab completion and an interactive picker. The running server hands them out, so on any machine that can reach it:

curl -fsSL http://host:port/cli | sh

The server fills in its own address, so CB_HOST is already set correctly -- there is nothing to configure. The installer detects your shell, writes the helpers to ~/.local/share/clipbox/, adds a marked block to your .bashrc or .zshrc, and picks a clipboard command for your platform. It touches nothing outside your home directory and needs no sudo. Re-running it replaces the block rather than duplicating it, and leaves your settings alone.

curl -fsSL http://host:port/cli | sh -s -- --print-only   # don't edit any rc file
curl -fsSL http://host:port/cli | sh -s -- --uninstall    # remove it again
curl -fsSL http://host:port/cli | sh -s -- --help         # all options

If you would rather nothing the server sends gets executed, fetch the helpers directly and source them yourself -- the address is baked into this file too:

mkdir -p ~/.local/share/clipbox
curl -fsSL http://host:port/cli/shell.sh -o ~/.local/share/clipbox/clipbox.sh
echo '. ~/.local/share/clipbox/clipbox.sh' >> ~/.bashrc

On zsh, bash-style completion needs to be enabled first; the installer writes this for you, but add it yourself if you are sourcing manually:

autoload -Uz compinit bashcompinit
(( $+functions[compdef] )) || compinit
bashcompinit

Commands

cb copy [name]           Copy a buffer to the clipboard (omit name to pick one)
cb paste [content]       Write a new buffer, or read stdin
cb rename <name> <new>   Rename a buffer
cb delete [name]         Delete a buffer

fb send [--overwrite] <file>...
                         Upload files. A name that is already taken
                         prompts to overwrite or keep both;
                         --overwrite answers that up front
fb get [name...]         Download files (omit names to pick; TAB selects several)
fb delete [name...]      Delete files (omit names to pick; TAB selects several)

Settings

Your settings live in ~/.config/clipbox/config.sh, which the installer creates once and never overwrites:

export CB_HOST=http://host:port
export CB_COPY_CMD='pbcopy'   # wl-copy on Wayland, xclip -selection clipboard on X11

jq is required. fzf is optional -- without it the pickers fall back to a numbered list.

curl

Clipboard operations

curl http://host:port/my-buffer                         # read a buffer
curl -X PUT -d 'text' http://host:port/my-buffer        # write to a buffer
curl -X PATCH -d 'new-name' http://host:port/my-buffer  # rename a buffer
curl -X DELETE http://host:port/my-buffer               # delete a buffer
curl http://host:port/api/buffers                       # list all buffers (JSON)

File Operations

curl -F 'file=@photo.jpg' http://host:port/files/   # upload a file
curl -F 'file=@photo.jpg' 'http://host:port/files/?overwrite=1'  # replace one
curl http://host:port/files/filename                # download a file
curl -X DELETE http://host:port/files/filename      # delete a file
curl http://host:port/api/files                     # list all files (JSON)

Environment variables

Variable Default Description
CLIPBOX_DATA (see below) Directory holding the database and uploads
CLIPBOX_DB (see below) Path to the SQLite database file
CLIPBOX_MAX_UPLOAD_MB 0 Reject uploads above this size (0 = no limit)

Data storage

The database is stored in the platform-appropriate data directory by default, with uploaded files in a files/ subdirectory next to it:

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.

Development

make test              # Python test suite (browser tests skip without playwright)
./tests/test_shell.sh  # cb/fb integration tests (starts its own server)
./tests/test_install.sh # installer tests (installs into a sandboxed HOME)
make check             # lint and type-check
make format            # apply formatting

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clipbox-0.6.0.tar.gz (61.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clipbox-0.6.0-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file clipbox-0.6.0.tar.gz.

File metadata

  • Download URL: clipbox-0.6.0.tar.gz
  • Upload date:
  • Size: 61.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for clipbox-0.6.0.tar.gz
Algorithm Hash digest
SHA256 71be1310a7dd57a14fb2ef1bc3e6193bc0338f3d8799ef42f95390fece4bec39
MD5 747f128d400c2c7e94e2d1b2c30de47d
BLAKE2b-256 e14f4999dbb637575a43b47cd193c0fc58aa9d562742a9f6b944b5aba6647c5a

See more details on using hashes here.

File details

Details for the file clipbox-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: clipbox-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for clipbox-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35c33d8b6298eb93291448ce6a7888a2342640f751a2f5b4ad30b70a2c1fa686
MD5 87e5cfae4ab7bf06ffdf11424ed811a6
BLAKE2b-256 be27c18615594b7b490e7aafd8cf3673ff27d905e531612b1a32513c6a1aee2a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.1

2 files

This release

0.6.0 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page