Skip to content
akash3911Public

About

πŸ“‹ Cross-device clipboard sharing CLI to send and retrieve text with short codes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

koppie

koppie is a cross-device clipboard sharing CLI. Send text from one device, retrieve it on another with a short code, and optionally copy the result straight to the system clipboard.

Installation

npm install -g koppie

Usage

Send text and get a code back:

koppie send "hello world"

Send multiline text interactively:

koppie send

Paste text, then finish input with Ctrl+D.

Retrieve a paste and copy it to the clipboard:

koppie 4829

View a paste without copying it:

koppie view 7737

Delete a paste:

koppie delete 1234

Show help:

koppie --help

API Configuration

koppie talks to the clipboard API at:

https://api.freecodetools.dev

Override it with:

export KOPPIE_API_URL="https://your-api.example.com"

Codes

Paste codes are numeric only and always 4 digits long.

Validation regex:

^[0-9]{4}$

Examples:

0007
0042
1234
9999

Expiration

send supports an optional expiration flag:

koppie send --expire 1h "temporary paste"
koppie send --expire 1d "daily paste"
koppie send --expire 7d "weekly paste"

The request body includes the selected expiration value.

Behavior

  • koppie send "text" uploads text and prints only the returned code.
  • koppie send reads multiline input from the terminal.
  • koppie <code> fetches the paste, copies it to the system clipboard when possible, and shows the content if clipboard access fails.
  • koppie view <code> prints the content to the terminal.
  • koppie delete <code> deletes the paste and prints Deleted.

Error Handling

The CLI surfaces friendly messages for common failures, including:

  • invalid code
  • network errors
  • API errors
  • clipboard errors
  • empty content

Examples:

βœ— Code not found
βœ— Network error
βœ— Clipboard unavailable
βœ— Empty content

About

πŸ“‹ Cross-device clipboard sharing CLI to send and retrieve text with short codes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages