dbcli / pgcli

Postgres CLI with autocompletion and syntax highlighting
http://pgcli.com
BSD 3-Clause "New" or "Revised" License
12.01k stars 551 forks source link

Is there a way to use ENV variables for DSNs in the config file? #787

Open hahuang65 opened 7 years ago

hahuang65 commented 7 years ago

Description

I would like to check in my pgclirc file, but do NOT want to keep sensitive DB URLs in the file.

Wondering if there's a way to support something like

[alias-dsn]
mydb = $MYDBURL

as opposed to having the actual URL in the config file.

ddanieltan commented 6 years ago

+1

j-bennet commented 6 years ago

We're using configobj module to parse config files, and it looks like it has no support for env variables. There's a feature request open, but I don't see it attempted:

https://github.com/DiffSK/configobj/issues/144