CLI

Git-like tool to work with your secrets locally

With tawbar CLI you can safely fetch your projects' secrets with a simple command

Install tawbar CLI

To download tawbar CLI you need to have Node.js and npm installed.

Then, execute the following command to install tawbar CLI and make it accessable globally:

npm install -g tawbar-cli

Log in and test tawbar CLI

1. Authorize your device to access your tawbar account data with the following command:

tawbar login

2. Follow the link generated by tawbar CLI and confirm adding your device's security token to your account:

CLI token confirmation

3. Test that the CLI is properly installed by accessing the list of your tawbar projects:

tawbar list

Fetch your secrets

Execute the following command to fetch your secrets into .env file of the current directory:

tawbar fetch {PROJECT_NAME} {STATE}

Where

  • {PROJECT_NAME} – the name of your project
  • {STATE} – the state of this project (ex. production)

Supported options

  • -t or --token – forces using specified security token. By default tawbar CLI uses the current device token generated by login command, but specifying a security token as a parameter might be useful when running fetch command on remote machines.
  • -p or --path – saves secrets into specified path. By default tawbar CLI saves secrets into .env file of the current directory

An example of fetch command using additional options:

tawbar fetch my-project production -p /usr/me/my-project/production.env -t KXJKB2yDR3OTLGmjAkiM_DF4add

See list of commands

In order to see the full list of available commands run:

tawbar --help

Revoke access

To revoke access of a device you should navigate to your account settings (User -> Settings -> Tokens) and remove the security token associated with the device