cipher-bin-cli

command module
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 1 Imported by: 0

README

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...]

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
aes256
Package aes256 is thanks to https://gist.github.com/brettscott/2ac58ab7cb1c66e2b4a32d6c1c3908a7 Will play nicely with the aes256 encryption created on the client (javascript) side
Package aes256 is thanks to https://gist.github.com/brettscott/2ac58ab7cb1c66e2b4a32d6c1c3908a7 Will play nicely with the aes256 encryption created on the client (javascript) side
api
editor
Package editor was sourced from this article and then updated: https://samrapdev.com/capturing-sensitive-input-with-editor-in-golang-from-the-cli
Package editor was sourced from this article and then updated: https://samrapdev.com/capturing-sensitive-input-with-editor-in-golang-from-the-cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL