cclip(1)

cclip(1) User Commands cclip(1)

NAME

cclip - command line interface for cclip database.

SYNOPSIS

cclip [OPTIONS...] ACTION ACTION_ARGS

DESCRIPTION

Interact with a cclipd(1) database.

OPTIONS

-d DB_PATH
Path to database file. Database will NOT be created if it doesn't exist.
Default is $XDG_DATA_HOME/cclip/db.sqlite3, where XDG_DATA_HOME defaults to $HOME/.local/share if it is unset.
-h
Print help message and exit 0.
-V
Print version and exit 0.

ACTIONS

You must specify exactly one of the following actions:

list [-t] [-T TAG] [FIELDS]

Prints information about all database entries to stdout. Fields are separated with tabs, entries are separated with newlines.

If -t is specified, only print those entries that have at least one tag.
If -T is specified, only print those entries that have a matching TAG.

Output format can be controlled by specifying a list of comma-separated fields as FIELDS. Available fields are (also applies to get, see below):

  • id (alias: rowid)
  • preview
  • mime_type (aliases: mime, type)
  • data_size (alias: size)
  • timestamp (alias: time)
  • tags (alias: tag)

If FIELDS argument is not specified, it defaults to id,mime_type,preview.

get ID [FIELDS]

Print saved clipboard entry with specified ID to stdout. If ID is -, read it from stdin (this applies to all actions accepting an ID). If FIELDS is specified, it is treated the same way as in list.

copy [-pf] ID

Puts entry with specified ID into wayland clipboard.

If -p is specified, primary selection will be used.
If -f is specified, cclip will stay in foreground.

delete [-s] ID

Delete entry with specified ID from database.

If -s is specified, overwrites deleted entry with zeroes for security (this uses the secure_delete pragma provided by sqlite under the hood).

tag ID TAG
tag -d ID [TAG]

In the first form, add a tag specified as TAG to entry with specified ID. In the second form, remove TAG from entry with specified ID if TAG is specified, otherwise remove ALL tags from an entry.

tags [list]
tags delete TAG
tags wipe

In the first form, list all tags in the database, separated by newlines. In the second form, delete TAG from database. In the third form, delete ALL tags from database.

vacuum

Rebuilds the database file, repacking it into a minimal amount of space.

wipe [-ts]

Remove all entries from the database. This preserves tagged entries by default.

If -t is specified, tagged entries are not preserved.
If -s is specified, it is treated in the same way as in delete.

EXAMPLES

Get most recently saved PNG image and display it with chafa(1)

cclip list id,mime | awk '$2 == "image/png" {print $1; exit}' | cclip get - | chafa

Interactive picker using fzf(1)

cclip list | fzf --with-nth 3.. --accept-nth 1 | cclip copy -

BUGS

Please report bugs to https://github.com/heather7283/cclip/issues.

When reporting bugs:

  • Provide backtrace with symbols if you experience a crash.
  • Describe steps necessary to reproduce the issue.

SEE ALSO

cclipd(1), wl-clipboard(1), fzf(1), rofi(1)

2026-04-07 3.3.1