db

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 1 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL