KeySpot CLI Tool allows users to interface with the KeySpot secrets manager from the terminal. The tool is primarily used to take secrets stored with KeySpot and inject them into a process or command as environment variables. This is especially useful for CI/CD pipelines that require access to secret-based credentials, such as AWS or Google Cloud Platform's API keys. To store records with KeySpot, go to keyspot.app
The KeySpot CLI Tool can be installed on Linux, Mac, and Windows.
curl -s --compressed "https://keyspot.github.io/cli-tool-ppa/KEY.gpg" | sudo apt-key add -
sudo curl -s --compressed -o /etc/apt/sources.list.d/keyspot.list "https://keyspot.github.io/cli-tool-ppa/keyspot.list"
sudo apt update
sudo apt install keyspotbrew tap keyspot/cli
brew install keyspotscoop bucket add keyspot https://github.com/keyspot/scoop-bucket
scoop install keyspotTo inject a record into a process/command as environment variables, use "keyspot run".
keyspot run "npm start" -k <record-access-key>- -k, --key: Access key of record to be used
- -r, --record: Name of record to be used. Requires the cli tool to be configured to an account, see the configure command.
When given a cli token from the KeySpot website https://keyspot.app/account, running the configure command with the token will link the token's account to the keyspot cli tool. This allows a user to specify documents by name instead of just by access key, among other features.
keyspot configure <cli-token>Export a record stored with KeySpot as a file following the .env file syntax. Use one of the options to specify which KeySpot record to export. is the name of the new exported file.
keyspot export <NEW-FILE-PATH> [export command options]- -k, --key: Access key of record to be used
- -r, --record: Name of record to be used. Requires the cli tool to be configured to an account, see the configure command.
Import a .env file into KeySpot. The FILE-PATH specified is the .env file you want to import while RECORD-NAME is the name of the record in KeySpot to create. If RECORD-NAME already exists in your account then the record will be overwritten. Requires your CLI tool to be configured.
keyspot import <FILE-PATH> <RECORD-NAME>keyspot versionPrints the current installed version of KeySpot CLI Tool.
At any time you can see all sub-commands keyspot has access to by passing the --help or -h flag.
keyspot -hToo see the options for a specific sub-command pass the -h flag after that command.
keyspot run -h