Sneak preview: clipstr - A clipboard manager that lives on nostr!

I recently started transitioning from my Macbook to a Linux machine and the only thing I miss is a synchronised clipboard between my devices. This made working on multiple workstations and with my phone a breez!

Because I missed this so much I started having a clipboard text file that I synced between my devices using SyncThing, but it was not the real deal. Then I realised that I already work with the perfect syncing layer every single day... nostr!

clipstr uses nostr events to your clipboard registry. It can set or get entries and print them to stdout, meaning you can easily pipe them into your OS' native clipboard when desired.

Because it is build on nostr, it is easy to add GUI clients or access the registry through a browser.

I did not get to polish and release it. But I wanted to share a demo regardless. Wdyt?

https://blossom.primal.net/2ccc64d2b1afba12b3eb202bf3697d6976f7b22e174ddac536577f4448928121.mov

Reply to this note

Please Login to reply.

Discussion

This is awesome! I was thinking of doing something similar with Iroh. I was discourage just because I wanted it to work with mobile.

I love that this is way easier to solve with nostr.

- are you using ratchet encryption for this? I would think that keeping the clipboard data safe is extra important

- do this events have an expiration date?

I am by no means a security expert. I will definitely add a disclaimer about this haha.

It uses nip44 encryption.

Right now no expiration date, but I want to make this a daemon and the daemon could check if the expiration is reached and overwrite the data. I am not sure if relays honor the timestamp. However someone might still copy the data while it is available. Getting the encryption right is crucial in this case

would the contents be public?

No, they are encrypted using your nostr key and NIP-44

Is it forward secure?

🫡

Great. I already use Nostr for copy-paste between devices by posting notes to a private relay. Dedicated tool is much better!

That is a great idea! I use public relays, but encrypt the payload. Once this is done I would love to see whether I can create little scripts to pipe from and into my Hyprland system clipboard. Then it could become really seamless

Do you have a repo link? I'd love to see how your structuring the events

Also this is something that you could easily vide ode a UI for :)

Still doing cleanup locally. This was hacked together (as always haha). I wanted to use lists, but I was not able to find a kind for custom ones. Now I am using NIP-78 and use a "registry" tag to keep an array of entries. I want to add some config tags like "registry-length" to control when old entries should be removed.

👀

This is great! I need this, too. I was casually building a relay for ephemeral events with a twist that I think would be perfect for synchronisation. It uses a ring buffer to store ephemeral events, making them available until new events arrive and the maximum capacity is reached, then events are removed from the buffer in order

Elegant :fire:

Thanks man, I'll publish it soon, I mean is already public on my gh but I have to pack it better 👌

i am using kde connect which works gr8 across multiple platforms

Are you still working on this? Did you publish the code somewhere?

I stopped working on this actually, as I realised that the security considerations were above my pay grade and I didn’t want to risk anyone’s clipboard.

Maybe a public network like nostr is not the best for this kind of thing

Was considering something similar but with private /locally networked relays only.