Categorygithub.com/bentilley/db
modulepackage
0.1.0
Repository: https://github.com/bentilley/db.git
Documentation: pkg.go.dev

# README

db

A simple cli for defining database URIs with support for multiple password backends.

I created this tool to solve the problem of having to keep database URIs containing passwords in plaintext. With db you define all your database connections in a yaml file, including where to find the relevant password information, and then db compiles the URIs on the fly and outputs the results through a fuzzy finder of your choosing (default fzf).

Sample Config

The default location for the config file is ~/.config/db/config.yaml. A sample config looks like this:

databases:
  local-dev:
    host: localhost
    port: 5432

  another-db:
    host: some.host
    port: 15500

connections:
  - database: local-dev
    user: testuser
    password: plaintext

  - database: local-dev
    user: adminuser
    password:
      type: pass
      path: db/testuser/password

  - database: another-db
    user: anotheruser
    password:
      type: env
      var: DB_PASSWORD

# Packages

No description provided by the author
No description provided by the author