MCPcopy Create free account
hub / github.com/Slackadays/Clipboard

github.com/Slackadays/Clipboard @0.10.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.10.0 ↗ · + Follow
512 symbols 1,409 edges 102 files 13 documented · 3% updated 2mo ago0.10.0 · 2024-11-17★ 5,84220 open issues

Browse by type

Functions 424 Types & classes 88
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

The Clipboard Project

The fully-featured yet oh-so-easy-to-use clipboard manager for everyone.

The Clipboard Project is a fast and lightweight, feature packed, and user friendly tool that lets you do more on the computer in style. Seriously.

Say hello to one of the most cutting-edge clipboard managers ever. Save time and effort easier and more powerfully than ever before.

Don't just take my word for it!

Just let the features speak for themselves.

  • Copy and paste text, files, directories, binary data, your goat, anything
  • Infinite numbers of clipboards with unlimited capacity and history each,
  • Seriously kickASS performance 🥾🤯 because I'm sick of slow software,
  • Seamless integration with your existing clipboard systems,
  • Support for your favorite languages like español, português, Türkçe, and Français,
  • A superbly scriptable API to automate your workflows in a cinch,
  • Gorgeous eye candy and ear candy for your viewing and listening pleasure,
  • Documentation you'll actually want to read (all in this readme)
  • And oodles more!

I believe Clipboard is the best tool for clipboard interaction. As a matter of fact, as of today you have 2713 stars on github, kudos! Keep up the good work.

- pidario on GitHub.com

Thanks for your work! This is by-far one of my favourite projects on GitHub!

- MaddyGuthridge on GitHub.com

...I've just discovered CB & it's suiting my needs very well!

- all64bits on Discord.com

I started using this because I just wanted an easy "cb copy && cb paste" VS trying to remember the correct input AND output flags when Im using xclip with different file types. I write a lot of shell scripts that copy certain stuff like images and text and this makes it a lot easier.

- SweetBabyAlaska on Reddit.com

As a sysadmin and hourly terminal user, I found it so useful. Making stuffs some easier.

- Simpleboy_ir on Reddit.com

Thank you for this app, so simple yet effective! Hats off 🎩 👌

- GlassGruber on GitHub.com

BTW, really LOVE this project. Its [sic] so unbelievable it isn't already in Linux.

- AtomicRobotMan0101 on GitHub.com

...Thank you again for this great application!

- kohane27 on GitHub.com

CB Demo Video

<a href="https://github.com/Slackadays/Clipboard/actions">
    <img src="https://img.shields.io/github/actions/workflow/status/Slackadays/Clipboard/build-clipboard.yml?branch=main&label=BUILDS&style=for-the-badge&logo=githubactions&labelColor=rgb(55,55,55)">
    <img src="https://img.shields.io/github/actions/workflow/status/slackadays/Clipboard/lint-clipboard.yml?branch=main&label=CHECKS&style=for-the-badge&logo=githubactions&labelColor=rgb(55,55,55)">
</a>
<a href="https://app.codecov.io/gh/Slackadays/Clipboard">
    <img src="https://img.shields.io/codecov/c/github/slackadays/Clipboard/main?style=for-the-badge&label=COVERAGE&token=RO7KDOZ6Q2&logo=codecov&labelColor=rgb(55,55,55)">
</a>
<img src="https://img.shields.io/github/downloads/Slackadays/Clipboard/total?style=for-the-badge&labelColor=rgb(55,55,55)&logo=github">



<a href="https://github.com/Slackadays/Clipboard/releases">
    <img src="https://img.shields.io/github/v/release/slackadays/clipboard?label=latest%20release&style=for-the-badge&logo=github&labelColor=rgb(55,55,55)&color=brightgreen">
</a>
<a href="https://discord.gg/J6asnc3pEG"><img src="https://github.com/Slackadays/Clipboard/raw/0.10.0/documentation/readme-assets/join-our-discord.svg" alt="Discord Chat"></a>
<img src="https://img.shields.io/github/license/slackadays/clipboard?label=FREE%20%26%20OPEN%20SOURCE&logo=gnu&style=for-the-badge&labelColor=rgb(55,55,55)">



<img src="https://img.shields.io/maintenance/yes/2024?style=for-the-badge&labelColor=rgb(55%2C55%2C55)">















<img src="https://github.com/Slackadays/Clipboard/raw/0.10.0/documentation/readme-assets/GetStartedBelow.png" alt="Ready to turbocharge your productivity? Then let's get started with CB." height="100px" />

Quick Installation

All Except Windows

curl -sSL https://github.com/Slackadays/Clipboard/raw/main/install.sh | sh

Windows (run as Administrator)

(Invoke-WebRequest -UseBasicParsing https://github.com/Slackadays/Clipboard/raw/main/install.ps1).Content | powershell

Premade Builds

Packaging status

Alpine Linux (you'll need to enable the Community packages first)

apk add clipboard

AUR (Use your favorite AUR helper such as yay. You can also get clipboard-bin and clipboard-git)

yay -S clipboard

yay -S clipboard-bin

yay -S clipboard-git

Conda-forge (Use any Conda package manager such as conda, mamba, or pixi)

conda install -c conda-forge cb-clipboard

mamba install -c conda-forge cb-clipboard

micromamba install -c conda-forge cb-clipboard

pixi global install cb-clipboard

Flatpak Flathub (You can also get our nightly Flatpak builds under GitHub Downloads)

flatpak install app.getclipboard.Clipboard
# After installing, do "alias cb='flatpak run app.getclipboard.Clipboard'" to use CB easily.
# Then, add that command to your terminal profile (like .bashrc) to make it work every time.

Download on Flathub

Gentoo GURU and LiGurOS (For Gentoo, enable the GURU repo first)

emerge -av app-misc/clipboard

Homebrew

brew install clipboard

Nix

nix-env -iA nixpkgs.clipboard-jh

Pacstall

pacstall -I clipboard-bin

Scoop

scoop install clipboard

Snap (You can also get our nightly Snap builds under GitHub Downloads)

sudo snap install clipboard
# After installing, do "alias cb='snap run clipboard'" to use CB easily.
# Then, add that command to your terminal profile (like .bashrc) to make it work every time.

Get it from the Snap Store

Void Linux

sudo xbps-install -S Clipboard

Winget

winget install -e --id Slackadays.Clipboard

GitHub Downloads

First, get the latest revision of the Clipboard Project from GitHub Actions or the latest release from GitHub Releases.

Then, unpack what you just downloaded to a nice place anywhere on your system.

If you downloaded the Flatpak, now do flatpak install what-you-downloaded.flatpak. Or if you downloaded the Snap, now do sudo snap install --dangerous what_you_downloaded.snap.

Finally, add CB to your PATH (so that you can run it anywhere) by doing one of the following:

# For all platforms except Windows, Flatpak, and Snap
$ export PATH=$PATH:/where/you/unpacked/cb
# Add this to your terminal startup file like .bashrc or the equivalent so that it works every time.
# To get the current path (in case you don't know it), do the "pwd" command.

# For Flatpak
$ alias cb='flatpak run app.getclipboard.Clipboard'
# Add this to your terminal startup file like .bashrc or the equivalent so that it works every time.

# For Snap
$ alias cb='snap run clipboard'
# Add this to your terminal startup file like .bashrc or the equivalent so that it works every time.

# For Windows PowerShell
> $Env:PATH += ";C:\where\you\unpacked\cb"
# Add this to your PowerShell profile (which is located in $profile) so that this works every time.
# To get the current path (in case you don't know it), do the "Get-Location" command.

Install Manually

You'll need CMake, C++20 support, and OpenSSL, and if you want X11 or Wayland support, you'll also need libx11 or libwayland plus Wayland Protocols respectively. If you're on Linux, you'll need ALSA.

Get the latest release instead of the latest commit by adding --branch 0.9.1 right after git clone....

Change the system installation prefix by adding -DCMAKE_INSTALL_PREFIX=/custom/prefix to cmake .., or the library install location by adding -DCMAKE_INSTALL_LIBDIR=/custom/dir.

# First, let's download the code and go a nice place to build everything.
$ git clone https://github.com/Slackadays/Clipboard 
$ cd Clipboard/build

# Now let's set up CMake and build CB.
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build . -j 12

# Finally, let's install it onto our system.
$ cmake --install .

Uninstall

Remove everything listed in install_manifest.txt. If you're not using Windows, you can also do xargs rm < install_manifest.txt.

<img src="https://github.com/Slackadays/Clipboard/raw/0.10.0/documentation/readme-assets/HowToUsePrompt.png" alt="Now let's start saving time and effort." height="40px" />

How To Use

Examples

# Let's start by copying a file.
$ cb copy NuclearLaunchCodes.pdf

# Now, let's paste this file.
$ cb paste

# Not bad, right?

# Let's make a note for this clipboard.
$ cb note "Keep this a secret"

# What if you wanted to pipe the note in?
$ echo "Keep this a secret OR ELSE" | cb note

# Now let's cut a directory to a different clipboard.
$ cb cut69 MyDirectory

# We put the 69 right after "cut" to tell CB to put MyDirectory in clipboard 69.

# Let's add a file to this same clipboard.
$ cb add69 SomeFile

# To remove a file, enter its name to remove just that file.
$ cb remove69 SomeFile

# Alternatively, you can put in a regex pattern instead to generalize the removal.
$ cb remove69 "So.*le"

# Finally, let's paste what we have in clipboard 69.
$ cb paste69

# You can copy multiple files at the same time. 
# Let's try the "_420" persistent clipboard for this one.
$ cb copy_420 foo.bar NotAVirus.bar.mp3.exe

# Like before, we can remove anything with a regex patttern.
$ cb remove_420 "*.mp3\.exe"

# Notes work exactly the same way for every clipboard.
$ cb note_420 "Some kosher content here"

# Let's look at everything we've stored in clipboard _420.
$ cb show_420

# Now let's see our original note and then clear that clipboard. 
$ cb note
$ cb clear

# This is the same as "cb note" but for clipboard "_420" again.
$ cb note_420

# Let's shake things up. Say you have some kind of content you want to ignore.
# This content could be anything from a password to raw binary data.
# To ignore certain kinds of content, use a regex pattern of your choice.

# Let's try this with a classic example.
$ cb ignore "H.*2"

# This pattern will ignore anything starting with "H" and ending with "2."

# Now, this next command will fail because CB will ignore the content in it through the pattern.
$ cb copy "Hunter2"

# Let's get some more detailed information about our clipboards.
$ cb info
$ cb info69
$ cb info_420

# To wrap things up, let's get a bird's eye view of everything so far.
$ cb
# Doing "cb" is the exact same as "cb status."
$ cb status

# These are just a handful of examples. 
# Check the documentation below for tons more examples of all the commands!

The Basics

Add a number to the end of your action to choose which temporary clipboard you want to use (the default is 0). Or, add _ to use a persistent clipboard instead.

Copycb [--](copy|cp)[(num)|_(id)] (file) [files] or (something) | cb [[--](copy|cp)][(num)|_(id)]

Copy a file.

$ cb copy FooFile
$ cb --copy FooFile
$ cb cp FooFile 
$ cb --cp FooFile
# These are the same!

Copy a file and a directory.

$ cb copy FooFile BarDir
# These are also the same!

Copy piped in data.

$ echo "Foobar" | cb
$ echo "Foobar" | cb copy 
# The "copy" action is optional here since the only possible action here in the first place is "copy"

Copy text directly.

$ cb copy "Aventura was the best bachata band"

Note: This happens instead of copying a file/directory if there is only one item present and that item doesn't exist as a file/directory.

Copy a file to the clipboard named "4"

$ cb copy4 FooFile

Copy piped in data to the persistent clipboard named "hello"

$ echo "Foobar" | cb copy_hello

Copy text to the clipboard named "hey" ```sh $ cb --clipboard hey copy "Aventura was

Core symbols most depended-on inside this repo

Shape

Method 257
Function 167
Class 78
Enum 10

Languages

C++100%

Modules by API surface

src/cbx11/src/x11.cpp109 symbols
src/cb/src/clipboard.hpp41 symbols
src/cb/src/utils/utils.cpp31 symbols
src/cbwayland/src/fd.cpp20 symbols
src/cbwayland/src/objects/forward.hpp17 symbols
src/cb/src/clipboard.cpp17 symbols
src/cb/src/utils/formatting.cpp13 symbols
src/gui/include/all/clipboard/utils.hpp12 symbols
src/gui/include/x11wl/clipboard/x11wl/mime.hpp10 symbols
src/cbwayland/src/wayland.cpp10 symbols
src/cbwayland/src/objects/display.cpp10 symbols
src/cbwayland/src/fd.hpp10 symbols

For agents

$ claude mcp add Clipboard \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page