Detect different protocols and engines from the current environment variables.
$ env
...
DATABASE_URI=pgsql://user:[email protected]/example
EXAMPLE_API_PASS=apipass
EXAMPLE_API_URL=https://api.example.com
EXAMPLE_API_USER=apiuser
...
$ ./schemedetector
[
{
"engine": "pgsql",
"port": "5432",
"host": "pg.example.com",
"username": "user",
"password": "pg_pass"
},
{
"engine": "https",
"port": "443",
"host": "api.example.com",
"username": "apiuser",
"password": "apipass"
}
]