Skip to content

ConnorsApps/clipboard

Repository files navigation

Clipboard

Shared clipboard service with WebSocket sync for real-time clipboard sharing across devices.

Features

  • 📋 Real-time clipboard synchronization via WebSocket
  • 📁 File upload and sharing with resumable uploads (tusd)
  • 🔐 Password-based authentication
  • 💾 Persistent auth token storage with MongoDB (optional) or in-memory
  • 🚀 Easy deployment with Helm
  • 💩 Vibe coded AI slop

Screenshots

Clipboard View Files View

CLI

A cb command-line client is included for interacting with a clipboard server from the terminal.

Install

go install github.com/ConnorsApps/clipboard/cmd/cb@latest

This drops a cb binary in $(go env GOPATH)/bin — make sure that's on your PATH.

Log in

cb login --server https://clipboard.example.com
# (you'll be prompted for the password)

Credentials are saved to ~/.config/clipboard-cli/config.yaml (honors XDG_CONFIG_HOME).

Commands

Command What it does
cb get Print clipboard contents to stdout. Pipe-friendly.
cb set [text] Set clipboard from args or stdin. e.g. echo hi | cb set
cb clear Empty the clipboard.
cb live Interactive TUI viewer + editor with live WebSocket sync. e to edit, ctrl+s to send, q to quit.
cb files list List uploaded files.
cb files upload <path> Upload a file (resumable via tusd).
cb files download [id] Download by id, or pick interactively. Streams to stdout when piped.
cb files delete <id> Delete a file.
cb logout Forget saved credentials.

Zsh completion

# Enable now and persist for future shells
source <(cb completion zsh) && echo 'source <(cb completion zsh)' >> ~/.zshrc

Bash is supported too: cb completion bash.

Deployment

Add the Helm Repository

helm repo add clipboard https://raw.githubusercontent.com/ConnorsApps/clipboard/main/helm/
helm repo update

Install the Chart

# Create a values file with your configuration
cat > my-values.yaml <<EOF
# yaml-language-server: $schema=https://raw.githubusercontent.com/vidispine/hull/refs/heads/main/hull/values.schema.json

hull:
  objects:
    persistentvolumeclaim:
      files:
        storageClassName: "your-storage-class"
        resources:
          requests:
            storage: 10Gi
    secret:
      clipboard:
        data:
          CLIPBOARD_PASSWORDS:
            inline: "your-secure-password,my-other-users-password"
          MONGODB_URI:
            inline: "mongodb://your-mongo-uri"  # Optional, leave empty for in-memory
EOF

# Install the chart
helm install my-clipboard clipboard/clipboard -f my-values.yaml

Configuration

The chart uses HULL for simplified Kubernetes object configuration. All configuration is done via the values.yaml file.

Key configuration options:

  • CLIPBOARD_PASSWORDS: Password(s) for authentication (required), The default is 1234. Seperate multiple user's passwords with commas. Each user is distinguished by their password.
  • MONGODB_URI: MongoDB connection string (optional). If not set, the app uses an in-memory token store.
  • FILES_DIR: Directory for file storage (default: /data, mounted from PVC)
  • TOKEN_EXPIRY: How long MongoDB auth tokens last before auto-expiring. Accepts a number of days (10d, 30d, etc.) or never. Defaults to 30d.

Authentication and token storage

  • In-memory store (when MONGODB_URI is not set): Auth tokens are kept only in process memory. All users must log in again after each server restart (e.g. deploy or pod restart). Use this for single-instance or dev only.
  • MongoDB store: Set MONGODB_URI for persistent tokens so users stay logged in across restarts. Token expiry is controlled by TOKEN_EXPIRY (default 30d). Set to never to disable expiry.
  • Transient token-store errors (e.g. MongoDB timeouts) are returned as 503; the frontend retries and does not clear the token, so users are not logged out by brief backend issues.

About

A UI & CLI to allow copy and pasting and easy file transfer between devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors