CipherStash
CipherStash Documentation

Signing in to Stash CLI

All interactions with Stash CLI require you to be signed in. Signing in is accomplished with the stash login command.

Synopsis

# Initial login
stash login --workspace <workspace> [--profile <profile>]

# Sign in to the default profile (or your only profile)
stash login

# Sign in to a particular profile
stash login --profile <profile>

Initial login

You will have been provided with an ID of a workspace when you signed up to CipherStash. In order to sign in the first time you need to tell the login command about your workspace, like this:

stash login --workspace <workspace>

This command will start the sign in flow via Auth0. If you’re running the command in a local terminal it will automatically open the CipherStash login page in your browser. If you’re running in a remote terminal it will simply print the sign-in URL to the console and you will have to click it, or copy-paste it to your browser in order to sign in.

Once you have successfully authenticated, a “profile” will be saved in $HOME/.cipherstash/<workspace>.

By default the name of the profile directory will be the same as the name of your workspace. If you would like a different name for your profile, you can provide one by using the optional --profile argument, like so:

stash login --workspace <workspace> --profile <profile-name>

If you want to be able to work with multiple CipherStash workspaces you can have more than one profile. But sometimes you want a default profile so that you can login without any addition arguments.

The following command will set the profile as the default profile:

stash login --workspace <workspace> --profile <profile-name> --set-default

It is also possible to set a default profile after the fact by editing $HOME/.cipherstash/config.json.

{
  "defaultProfile": "<profile>"
}

Subsequent logins

After you have signed in successfully one time stash login does not need as much info - in fact you can use stash login with no arguments!

The following command will sign you in if either:

  1. you have a single profile in $HOME/.cipherstash, or
  2. you have configured a default profile
stash login

It won’t work if:

  1. you have more than one profile in $HOME/.cipherstash, and
  2. you have not set a default profile

Signing in to a specific profile explicitly is also supported:

stash login --profile <profile>