Giter Site home page Giter Site logo

bitwarden-secrets-rs's Introduction

Bitwarden secrets

CLI to help to manage secrets for shell session or code compilation.

Installation

cargo install bitwarden-secrets

And also install Bitwarden's CLI.

Configuration

Create a .bw-secrets.json secrets file in the directory where you want to use the secrets (or a parent directory) with the following content:

{
  "01234567-8901-2345-6789-012345678900": {
    "object": "password",
    "name": "NPM_TOKEN"
  },
  "01234567-8901-2345-6789-012345678900": {
    "object": "password",
    "name": "CARGO_TOKEN"
  }
}

The keys are the IDs of the secrets in Bitwarden. Object is the type of the secret (username, password, totp, uri or notes) and name is the name of the environment variable that will be set with the secret value.

Usage

The CLI can not create the environment variables directly in the shell session, but it can output the commands to do so. Then, you can run the output in the shell to set the environment variables:

PowerShell

iex (bw-secrets | Out-String)

Bash

source <(bw-secrets)

bitwarden-secrets-rs's People

Contributors

jhg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.