Skip to content

mchalunderscore/clip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clip

A minimal clipboard history manager for the command line, backed by SQLite.

Pipe into clip to copy. Pipe out of clip to paste. History persists across sessions in ~/.clip.sqlite.

Usage

# Copy stdin into history
echo "hello world" | clip
git diff | clip

# Paste the most recent entry
clip

# Paste the Nth most recent entry
clip 3

# Show history (up to 50 entries)
clip list
clip ls

# Clear all history
clip clear

In a pipeline

clip | pbcopy          # send to system clipboard on macOS
clip | xclip           # send to system clipboard on Linux
cat file.txt | clip    # store a file's contents

Installation

Requires OCaml and opam.

opam install . --deps-only
dune build
dune install

The built binary is at _build/default/bin/clip.exe and can also be copied anywhere on your PATH manually.

Storage

History is stored in ~/.clip.sqlite (or %USERPROFILE%\.clip.sqlite on Windows). The database uses WAL journal mode and synchronous=NORMAL for fast reads and writes.

Dependencies

  • sqlite3 — persistent history storage
  • unix — TTY detection

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors