Git Product home page Git Product logo

ccclip's Introduction

ccclip

End to end encrypted cloud clipboard.

Installation

Download the prebuilt latest release binary for your OS/arch and ensure that it's in your PATH.

I just do sudo mv ccclip /usr/local/bin for either MacOS or Linux.

Configuration

By default, ccclip looks for a ccclip directory in the user home directory and it'll store the configuration file and device keys there. You don't need to do anything if you want to stores your config in the default location; to override this behavior, use the --config-dir global flag.

If you're onboarding a new device (with an already created account) then you should pre-populate your config file (ccclip.yaml in your config dir) to look like this:

{"Email":"{your-email}","DeviceId":""}

Yes, I know, the extension is yaml but the file has JSON. I'll change it, don't worry.

It's also a good idea to creat an alias for the command, here's what I do in my .zshrc:

alias ccc="ccclip"

ccc is very fun to type, but choose whatever alias make you happy.

Instructions

Create an account with

ccclip register -e {your-email}

This will prompt you for your password. Your input won't be shown, that's expected (we like to be safe right!?). Just press enter. Passwords are stored as bcrypt hashes in the server.

Register your device

ccclip register-device

This will prompt you for your password. An X25519 key pair is created and stored in your configuration directory. A "device" is created and associated to your account, the device id is stored in your configuration file. Only the public key is sent to the server (duh).

Save and retrieve your clipboard

The root command ccclip serves both purposes, if you pipe something to its stdin, it'll read it and save it as your clipboard. If you don't pass anything then it'll retrieve your current clipboard and output it through stdout.

There's a caveat: When a clipboard is created, the sending device encrypts the data for each of the currently registered devices individually. This means that if you register a new device, it won't immediately have access to the current clipboard because its public key wasn't available when the clipboard was created. The benefit of this is that your data is end-to-end encrypted and I'll never be able to see it nor an attacker if we're compromised :)

If you want your new device to have access to the current clipboard contents then just run ccclip | ccclip from an onboarded device.

Hosting

The cli can be built by running go build ./cmd/cli from the root of the repo.

I host a public API at https://api.ccclip.io using fly.io (thanks for the credits!). Feel free to use it. There's a Dockerfile for the server at cmd/server/Dockerfile though it will probably won't work for you; it's set up to use fly's LiteFS. It should be easy enough for you to adapt it for an sqlite db on a mounted volume and run without LiteFS. Maybe try other sqlite distros?

ccclip's People

Contributors

aym1607 avatar

Stargazers

Youn Jae Kim avatar  avatar Bryce Soghigian avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.