2.0.0 • Published 9 months ago
@launchpadlab/opensesame v2.0.0
Opensesame CLI
A simple command line interface to store and share non-version controlled application secrets files within the 1Password vault structure.
The recommended approach is to invoke opensesame directly from the command line to simplify to a more universally supported developer experience across codebases.
Setup Instructions
npm install @launchpadlab/opensesame -g
Recommended: Non-NPM
- If a
package.jsonfile is not used for a given project (or not preferred to be used), you can use a direct initial invocation of the CLI by runningopensesamein your terminal. This will generate a.opensesamercfile to persist the project specific variables. - It is recommended to run
opensesameto invoke this CLI tool going forward within this project.
Legacy: NPM
npm install @launchpadlab/opensesame -g- Within your project, ensure a npm command in the
package.jsonfile exists forload_secrets: opensesame -d XXX -v XXX -f XXX. If one is not present, add it within thescriptskey. For this command-drefers to thedocument_idin 1Password,-vrefers to thevault_idin 1Password,-frefers to the localfile_pathwhere the secrets file is located.
{
...
"scripts": {
...,
"load_secrets": "opensesame -d XXX -v XXX -f XXX"
}
...
}- If you know the values for
-d-vor-f, please insert those values if not already set. Otherwise the CLI tool will guide you through how to set those. - Run the command
npm run load_secretsand follow on-screen instructions
FAQs
- This CLI tool can be used to sync any non-version controlled file into 1Password. Typically this is a
.envorapplication.ymlfile. However, it can also be used withrails credentialsto be used to sync the*.keyfile that is not version controlled. - To interact with 1Password directly, you can reference their documentation.
Maintainers Only: Publish Command
npm publish