I wrote a thing called wl-clipboard.

It implements wl-copy and wl-paste commands that copy and paste from stdin/stdout to the #Wayland clipboard (with a few bells & whistles, e.g. they try to infer the mime type), a lot like pbcopy/pbpaste on macOS or xclip under X11.

Examples:

$ wl-copy Hello world!

$ ls ~/Downloads | wl-copy

$ wl-copy < ~/Pictures/photo.png

$ wl-paste > clipboard.txt

$ for word in $(wl-paste); do grep $word source.c; done

Source code (C, Meson, GPL v3) is here: https://github.com/bugaevc/wl-clipboard