OscarCLI is a command-line tool for managing AWS Secrets Manager secrets. It allows you to create, update, and retrieve secrets, as well as generate API keys. It is also used to write secrets to a .env file for use in local development.
Installation
Using cURL
Run the following command to download and install OscarCLI:
Windows:
Rename oscarcli-windows.exe to oscarcli.exe and move it to C:\Windows\System32.
Verify the installation by running oscarcli --version or oscarcli -v.
Usage
As of version 1.1.0, OscarCLI requires a Go installation to run. You can install Go from the official website.
The current executable is built for Windows.
You must have configured AWS credentials on your machine. You can do this by running aws configure and following the prompts.
As of version 1.2.0, OscarCLI uses the credentials for AWS of the user running the command. This means that the user must have the necessary permissions to create, update, and retrieve secrets in AWS Secrets Manager.
Using the apikey command will update the user's oscar-api secret in AWS Secrets Manager. This will not update the master API key used by the Oscar API. Future versions of OscarCLI will include the ability to update the master API key, locked behind credential verification.
When using the env command, the .env file will be created in the current working directory. If the file already exists, it will be overwritten.
Commands
env: Retrieve a secret from AWS Secrets Manager and write it to a .env file.
oscarcli env <secret-name> <region>
create: Create a new secret in AWS Secrets Manager.