← Back to Use Cases
LOCAL DEV & TESTING

Clipboard Sync

Share text snippets between machines. Curl to save, curl to paste.

The Problem

You're working across multiple machines and want to quickly share text snippets, commands, or code between them.

The WrenDB Solution

Use WrenDB as a universal clipboard. Save with curl, retrieve with curl.

Complete Example

Example
# Add to your ~/.bashrc or ~/.zshrc
WREN_STASH_ID="your-stash-id"
WREN_TOKEN="your-token"

# Copy to cloud clipboard
alias wcopy='curl -X PUT https://wrendb.com/api/item/$WREN_STASH_ID/clip \
  -H "Authorization: Bearer $WREN_TOKEN" \
  -d @-'

# Paste from cloud clipboard
alias wpaste='curl -s https://wrendb.com/api/item/$WREN_STASH_ID/clip'

# Usage examples:
# Copy command output
ls -la | wcopy

# Copy file contents
cat script.sh | wcopy

# Paste on any machine
wpaste
wpaste > downloaded.txt

# Named clips
echo "Important command" | curl -X PUT https://wrendb.com/api/item/$WREN_STASH_ID/clip-backup \
  -H "Authorization: Bearer $WREN_TOKEN" \
  -d @-

# Retrieve named clip
curl https://wrendb.com/api/item/$WREN_STASH_ID/clip-backup

Related Use Cases

Session Stash API Mocking