Skip to content

cipherbin/cipher-bin-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cipher bin logo

Cipherbin CLI

cipher bin logo cipher bin logo cipher bin logo License


Source code for the CLI, if you are looking for the client side React app go here. If you are looking for the Golang server go here.

You can find instructions on using the CLI at the bottom of the this README.md or check out the docs.

Installation

Option A:

Homebrew:

brew tap cipherbin/cipherbin
brew install cipherbin/cipherbin/cipherbin

Updating:

brew upgrade cipherbin

Uninstalling:

brew uninstall cipherbin

Option B:

If you mosey on over to releases, you'll find binaries for darwin, linux, and amd64. You can download directly from there.

Option C:

If you have Go installed on your machine, use go install:

go install github.com/cipherbin/cipher-bin-cli

This will place the binary in your go/bin and is ready to use, however the binary will be named cipher-bin-cli with this option.

The alternative solution here is to run go build -o $GOPATH/bin/cipherbin. This will essentially act like a go install, but you can name the binary what it's intended to be named.

Using the CLI

Creating a new message:

The create command will open either your editor of choice (if you have $EDITOR env var set), or default to vi. As of now there is only specific support for VS Code. Other editors may work, but it's not guaranteed. Within the editor, type or paste your secret content. When you save and quit your message will be encrypted and posted to the cipherbin api. The one time use URL will be automatically copied to your clipboard and printed in your teminal. It works similarly to a git commit --amend work-flow. The URL can now either be visited in a browser or the message can be read with the read command.

cipherbin create [...flags]

Flags:

Email to send the notification to when your message is read and destroyed

--email, -e

Reference name for the message (Ex. "prod env vars"). You must be using the email flag for this to have any effect.

--reference_name, -r

Reading an encrypted message:

Instead of visiting the URL in your browser you can use the read command. It takes one argument, which is the URL. Ensure you put the URL arg inside single or double quotes.

cipherbin read "https://cipherb.in/msg?bin=some_uuid;some_key" [...flags]

Flags:

Open the message in the web app on your browser

--open, -o

Version:

Check your currently installed version.

cipherbin version

Development

Running the application

Build

go build -o cipherbin main.go

Run

./cipherbin [commands...] [flags...]

Or for quicker iterations:

go run main.go [commands...] [flags...]