{"id":13466520,"url":"https://github.com/danvergara/dblab","last_synced_at":"2026-04-07T17:00:42.752Z","repository":{"id":37292086,"uuid":"352879222","full_name":"danvergara/dblab","owner":"danvergara","description":"The database client every command line junkie deserves.","archived":false,"fork":false,"pushed_at":"2026-03-31T18:44:53.000Z","size":25744,"stargazers_count":3112,"open_issues_count":13,"forks_count":85,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-04-02T09:34:03.074Z","etag":null,"topics":["cli","client","developer-tools","development","golang","mysql","oracle","postgresql","sqlite","sqlserver","tui","tview"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danvergara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-30T05:20:36.000Z","updated_at":"2026-04-02T09:20:54.000Z","dependencies_parsed_at":"2023-11-18T06:24:57.550Z","dependency_job_id":"a6bcb78b-73f9-4d8d-a0bc-35224de6d43e","html_url":"https://github.com/danvergara/dblab","commit_stats":{"total_commits":406,"total_committers":11,"mean_commits":36.90909090909091,"dds":0.06650246305418717,"last_synced_commit":"a0a6fdc747dc569e397a9b91f642dfb07fa9d985"},"previous_names":[],"tags_count":71,"template":false,"template_full_name":null,"purl":"pkg:github/danvergara/dblab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvergara%2Fdblab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvergara%2Fdblab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvergara%2Fdblab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvergara%2Fdblab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danvergara","download_url":"https://codeload.github.com/danvergara/dblab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvergara%2Fdblab/sbom","scorecard":{"id":321887,"data":{"date":"2025-08-11","repo":{"name":"github.com/danvergara/dblab","commit":"333307ce2077b61a688b568a7f12d4ec82f39a52"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":3,"reason":"Found 11/30 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":4,"reason":"2 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/check-goreleaser.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/docs.yml:8","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:10","Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-goreleaser.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/check-goreleaser.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-goreleaser.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/check-goreleaser.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/check-goreleaser.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/check-goreleaser.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/test.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yaml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/danvergara/dblab/test.yaml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:25","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.33.0 not signed: https://api.github.com/repos/danvergara/dblab/releases/225048881","Warn: release artifact v0.32.0 not signed: https://api.github.com/repos/danvergara/dblab/releases/215007964","Warn: release artifact v0.31.0 not signed: https://api.github.com/repos/danvergara/dblab/releases/214262822","Warn: release artifact v0.30.1 not signed: https://api.github.com/repos/danvergara/dblab/releases/193420838","Warn: release artifact v0.30.0 not signed: https://api.github.com/repos/danvergara/dblab/releases/193345538","Warn: release artifact v0.33.0 does not have provenance: https://api.github.com/repos/danvergara/dblab/releases/225048881","Warn: release artifact v0.32.0 does not have provenance: https://api.github.com/repos/danvergara/dblab/releases/215007964","Warn: release artifact v0.31.0 does not have provenance: https://api.github.com/repos/danvergara/dblab/releases/214262822","Warn: release artifact v0.30.1 does not have provenance: https://api.github.com/repos/danvergara/dblab/releases/193420838","Warn: release artifact v0.30.0 does not have provenance: https://api.github.com/repos/danvergara/dblab/releases/193345538"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/check-goreleaser.yml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T01:34:44.647Z","repository_id":37292086,"created_at":"2025-08-18T01:34:44.647Z","updated_at":"2025-08-18T01:34:44.647Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","client","developer-tools","development","golang","mysql","oracle","postgresql","sqlite","sqlserver","tui","tview"],"created_at":"2024-07-31T15:00:45.513Z","updated_at":"2026-04-07T17:00:42.617Z","avatar_url":"https://github.com/danvergara.png","language":"Go","readme":"dblab ![integration tests](https://github.com/danvergara/dblab/actions/workflows/ci.yaml/badge.svg) ![unit tests](https://github.com/danvergara/dblab/actions/workflows/test.yaml/badge.svg) [![Release](https://img.shields.io/github/release/danvergara/dblab.svg?label=Release)](https://github.com/danvergara/dblab/releases)\n===============\n\n\u003cp align=\"center\"\u003e\n  \u003cimg style=\"float: right;\" src=\"assets/gopher-dblab.png\" alt=\"dblab logo\"/  width=200\u003e\n\u003c/p\u003e\n\n__Interactive client for PostgreSQL, MySQL, SQLite3, Oracle and SQL Server.__\n\n\u003cimg src=\"screenshots/dblab-cover.png\" /\u003e\n\n---\n\n**Documentation**: \u003ca href=\"https://dblab.app\" target=\"_blank\"\u003ehttps://dblab.app\u003c/a\u003e\n\n---\n\n## Table of contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Installation](#installation)\n    - [Homebrew](#homebrew)\n    - [Binary Release](#binary-release-linuxosxwindows)\n    - [Automated installation/update](#automated-installationupdate)\n- [Help Command](#help)\n- [Usage](#usage)\n    - [SSH Tunnel](#ssh-tunnel)\n    - [Configuration](#configuration)\n        - [Key bindings configuration](#key-bindings-configuration) \n- [Navigation](#navigation)\n    - [Key Bindings](#key-bindings)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Overview\n\ndblab is a fast and lightweight interactive terminal based UI application for PostgreSQL, MySQL and SQLite3,\nwritten in Go and works on OSX, Linux and Windows machines. Main idea behind using Go for backend development\nis to utilize ability of the compiler to produce zero-dependency binaries for\nmultiple platforms. dblab was created as an attempt to build very simple and portable\napplication to work with local or remote PostgreSQL/MySQL/SQLite3/Oracle/SQL Server databases.\n\n## Features\n\n- Cross-platform support OSX/Linux/Windows 32/64-bit\n- Simple installation (distributed as a single binary)\n- Zero dependencies.\n\n## Installation\n\n\u003e ~~if you need to work with SQLite3, install the CGO enabled binary using the proper bash script listed below.~~\n\u003e The above comment is deprecated and CGO is not needed anymore. There will be a single binary capable to deal with all supported clients.\n\n### Homebrew\n\nIt works with Linux, too.\n\n```\nbrew install --cask danvergara/tools/dblab\n```\n\nOr\n\n```\nbrew tap danvergara/tools\nbrew install --cask dblab\n```\n\n### Binary Release (Linux/OSX/Windows)\nYou can manually download a binary release from [the release page](https://github.com/danvergara/dblab/releases).\n\n## Automated installation/update\n\u003e Don't forget to always verify what you're piping into bash\n\nInstall the binarry using our bash script:\n\n```sh\ncurl https://raw.githubusercontent.com/danvergara/dblab/master/scripts/install_update_linux.sh | bash\n```\n\n## Help\n\n```\ndblab is a terminal UI based interactive database client\n\nUsage:\n  dblab [flags]\n  dblab [command]\n\nAvailable Commands:\n  help        Help about any command\n  version     The version of the project\n\nFlags:\n      --cfg-name string                   Database config name section\n      --config                            Get the connection data from a config file (default locations are: current directory, $HOME/.dblab.yaml or $XDG_CONFIG_HOME/.dblab.yaml)\n      --keybindings, -k                   Get the keybindings configuration from the config file (default locations are: current directory, $HOME/.dblab.yaml or $XDG_CONFIG_HOME/.dblab.yaml)\n      --db string                         Database name (optional)\n      --driver string                     Database driver\n      --encrypt string                    [strict|disable|false|true] data sent between client and server is encrypted or not\n  -h, --help                              help for dblab\n      --host string                       Server host name or IP\n      --limit uint                        Size of the result set from the table content query (should be greater than zero, otherwise the app will error out) (default 100)\n      --pass string                       Password for user\n      --port string                       Server port\n      --schema string                     Database schema (postgres and oracle only)\n      --socket string                     Path to a Unix socket file\n      --ssh-host string                   SSH Server Hostname/IP\n      --ssh-key string                    File with private key for SSH authentication\n      --ssh-key-pass string               Supports connections with protected private keys with passphrase\n      --ssh-pass string                   SSH Password (Empty string for no password)\n      --ssh-port string                   SSH Port\n      --ssh-user string                   SSH User\n      --ssl string                        SSL mode\n      --ssl-verify string                 [enable|disable] or [true|false] enable ssl verify for the server\n      --sslcert string                    This parameter specifies the file name of the client SSL certificate, replacing the default ~/.postgresql/postgresql.crt\n      --sslkey string                     This parameter specifies the location for the secret key used for the client certificate. It can either specify a file name that will be used instead of the default ~/.postgresql/postgresql.key, or it can specify a key obtained from an external “engine”\n      --sslpassword string                This parameter specifies the password for the secret key specified in sslkey\n      --sslrootcert string                This parameter specifies the name of a file containing SSL certificate authority (CA) certificate(s) The default is ~/.postgresql/root.crt\n      --timeout string                    in seconds (default is 0 for no timeout), set to 0 for no timeout. Recommended to set to 0 and use context to manage query and connection timeouts\n      --trace-file string                 File name for trace log\n      --trust-server-certificate string   [false|true] server certificate is checked or not\n  -u, --url string                        Database connection string\n      --user string                       Database user\n  -v, --version                           version for dblab\n      --wallet string                     Path for auto-login oracle wallet\n\nUse \"dblab [command] --help\" for more information about a command.\n```\n\n## Usage\n\nYou can start the app passing no flags or parameters, you'll be asked for connection data instead.\n![dblab-demo](screenshots/dblab-demo.gif)\n\n\n```sh\n$ dblab --host localhost --user myuser --db users --pass password --ssl disable --port 5432 --driver postgres --limit 50\n$ dblab --db path/to/file.sqlite3 --driver sqlite\n$ dblab --host localhost --user system --db FREEPDB1 --pass password --port 1521 --driver oracle --limit 50\n$ dblab --host localhost --user SA --db msdb --pass '5@klkbN#ABC' --port 1433 --driver sqlserver --limit 50\n```\n\nConnection URL scheme is also supported:\n\n```sh\n$ dblab --url 'postgres://user:password@host:port/database?sslmode=[mode]'\n$ dblab --url 'mysql://user:password@tcp(host:port)/db'\n$ dblab --url 'file:test.db?_pragma=foreign_keys(1)\u0026_time_format=sqlite'\n$ dblab --url 'oracle://user:password@localhost:1521/db'\n$ dblab --url 'sqlserver://SA:myStrong(!)Password@localhost:1433?database=tempdb\u0026encrypt=true\u0026trustservercertificate=false\u0026connection+timeout=30'\n```\n\nif you're using PostgreSQL or Oracle, you have the option to define the schema you want to work with, the default value is `public` for Postgres, empty for Oracle.\n\n```sh\n# Postgres\n$ dblab --host localhost --user myuser --db users --pass password --schema myschema --ssl disable --port 5432 --driver postgres --limit 50\n$ dblab --url postgres://user:password@host:port/database?sslmode=[mode] --schema myschema\n\n# Oracle\n$ dblab --host localhost --user user2 --db FREEPDB1 --pass password --port 1521 --driver oracle --limit 50 --schema user1\n$ dblab --url 'oracle://user2:password@localhost:1521/FREEPDB1' --schema user1\n```\n\nAs a request made in [#125](https://github.com/danvergara/dblab/issues/125), support for MySQL/MariaDB sockets was integrated.\n\n```sh\n$ dblab --url \"mysql://user:password@unix(/path/to/socket/mysql.sock)/dbname?charset=utf8\"\n$ dblab --socket /path/to/socket/mysql.sock --user user --db dbname --pass password --ssl disable --port 5432 --driver mysql --limit 50\n```\n\nPostgres connection through Unix sockets:\n\n```sh\n$ dblab --url \"postgres://user:password@/dbname?host=/path/to/socket\"\n$ dblab --socket /path/to/socket --user user --db dbname --pass password --ssl disable --port 5432 --driver postgres --limit 50\n```\n\nNow, it is possible to ensure SSL connections with `PostgreSQL` databases. SSL related parameters has been added, such as `--sslcert`, `--sslkey`, `--sslpassword`, `--sslrootcert`. More information on how to use such connection flags can be found [here](https://www.postgresql.org/docs/current/libpq-connect.html).\n\n```{ .sh .copy }\ndblab --host  db-postgresql-nyc3-56456-do-user-foo-0.fake.db.ondigitalocean.com --user myuser --db users --pass password --schema myschema --port 5432 --driver postgres --limit 50 --ssl require --sslrootcert ~/Downloads/foo.crt\n```\n\n### SSH Tunnel\n\nNow, it's possible to connect to Postgres or MySQL (more to come later) databases on a server via SSH using password or a ssh key files.\n\nTo do so, 6 new flags has been added to the dblab command:\n\n| Flag                 | Description                                                       |\n|----------------------|-------------------------------------------------------------------|\n|  --ssh-host          |  SSH Server Hostname/IP                                           |\n|  --ssh-port          |  SSH Port                                                         |\n|  --ssh-user          |  SSH User                                                         |\n|  --ssh-pass          |  SSH Password (Empty string for no password)                      |\n|  --ssh-key           |  File with private key for SSH authentication                     |\n|  --ssh-key-pass      | Passphrase for protected private key files                        |\n\n#### Examples\n\nPostgres connection via ssh tunnel using password:\n\n```{ .sh .copy }\ndblab --host localhost --user postgres --pass password --schema public --ssl disable --port 5432 --driver postgres --limit 50 --ssh-host example.com --ssh-port 22 --ssh-user root --ssh-pass root\n```\n\nPostgres connection via ssh tunnel using ssh private key file:\n\n```{ .sh .copy }\ndblab --host localhost --user postgres --pass password --schema public --ssl disable --port 5432 --driver postgres --limit 50 --ssh-host example.com --ssh-port 22 --ssh-user root --ssh-key my_ssh_key --ssh-key-pass password\n```\n\nPostgres connection using the url parameter via ssh tunnel using password:\n\n```{ .sh .copy }\ndblab --url postgres://postgres:password@localhost:5432/users?sslmode=disable --schema public --ssh-host example.com --ssh-port 22 --ssh-user root --ssh-pass root\n```\n\nMySQL connection via ssh tunnel using password:\n\n```{ .sh .copy }\ndblab --host localhost --user myuser --db mydb --pass 5@klkbN#ABC --ssl enable --port 3306 --driver mysql --limit 50 --ssh-host example.com --ssh-port 22 --ssh-user root --ssh-pass root\n```\n\nMySQL connection via ssh tunnel using ssh private key file:\n\n```{ .sh .copy }\ndblab --host localhost --user postgres --pass password --ssl enable --port 3306 --driver mysql --limit 50 --ssh-host example.com --ssh-port 22 --ssh-user root --ssh-key my_ssh_key --ssh-key-pass passphrase\n```\n\nMySQL connection using the url parameter via ssh tunnel using password:\n\n```{ .sh .copy }\ndblab --url \"mysql://myuser:5@klkbN#ABC@mysql+tcp(localhost:3306)/mydb\" --driver mysql --ssh-host example.com --ssh-port 22 --ssh-user root --ssh-pass root\n```\n\n### Configuration\n\nEnter previous flags every time is tedious, so `dblab` provides a couple of flags to help with it: `--config` and `--cfg-name`.\n\n`dblab` is going to look for a file called `.dblab.yaml`. Currently, there are three places where you can drop a config file:\n\n- $XDG_CONFIG_HOME ($XDG_CONFIG_HOME/.dblab.yaml)\n- $HOME ($HOME/.dblab.yaml)\n- . (the current directory where you run the command line tool)\n\nIf you want to use this feature, `--config` is mandatory and `--cfg-name` may be omitted. The config file can store one or multiple database connection sections under the `database` field. `database` is an array, previously was an object only able to store a single connection section at a time. \n\nWe strongly encourgae you to adopt the new format as of `v0.18.0`. `--cfg-name` takes the name of the desired database section to connect with. It can be omitted and its default values will be the first item on the array. \n\nAs of `v0.21.0`, ssl connections options are supported in the config file.\n\n```sh\n# default: test\n$ dblab --config\n\n$ dblab --config --cfg-name \"prod\"\n```\n\n#### Key bindings configuration\n\nKey bindings can be configured through the `.dblab.yaml` file. There is a field called `keybindings` where key bindings can be modified. By default, the keybindings are not loaded, so you need to use the `--keybindings` or `-k` flag to load them. See the example to see the full list of the key bindings subject to change. The file shows the default values. The list of the available key bindings belongs to the [tcell](https://github.com/gdamore/tcell) library. Specifically, see the [KeyNames map](https://github.com/gdamore/tcell/blob/781586687ddb57c9d44727dc9320340c4d049b11/key.go#L83), for an accurate reference.\n\n#### .dblab.yaml example\n\n```yaml\ndatabase:\n  - name: \"test\"\n    host: \"localhost\"\n    port: 5432\n    db: \"users\"\n    password: \"password\"\n    user: \"postgres\"\n    driver: \"postgres\"\n    # optional\n    # postgres only\n    # default value: public\n    schema: \"myschema\"\n  - name: \"prod\"\n    # example endpoint\n    host: \"mydb.123456789012.us-east-1.rds.amazonaws.com\"\n    port: 5432\n    db: \"users\"\n    password: \"password\"\n    user: \"postgres\"\n    schema: \"public\"\n    driver: \"postgres\"\n    ssl: \"require\"\n    sslrootcert: \"~/.postgresql/root.crt.\"\n  - name: \"oracle\"\n    host: \"localhost\"\n    port: 1521\n    db: \"FREEPDB1\"\n    schema: \"user1\"\n    password: \"password\"\n    user: \"user2\"\n    driver: \"oracle\"\n    ssl: \"enable\"\n    wallet: \"path/to/wallet\"\n    ssl-verify: true\n  - name: \"sqlserver\"\n    driver: \"sqlserver\"\n    host: \"localhost\"\n    port: 1433\n    db: \"msdb\"\n    password: \"5@klkbN#ABC\"\n    user: \"SA\"\n  - name: \"ssh-tunnel\"\n    host: \"localhost\"\n    port: 5432\n    db: \"users\"\n    password: \"password\"\n    user: \"postgres\"\n    schema: \"public\"\n    driver: \"postgres\"\n    ssh-host: \"example.com\"\n    ssh-port: 22\n    ssh-user: \"ssh-user\"\n    ssh-pass: \"password\"\n  - name: \"realistic-ssh-example\"\n    host: \"rds-endpoint.region.rds.amazonaws.com\"\n    port: 5432\n    db: \"database_name\"\n    user: \"db_user\"\n    password: \"password\"\n    schema: \"schema_name\"\n    driver: \"postgres\"\n    ssl: \"require\"\n    ssh-host: \"bastion.host.ip\"\n    ssh-port: 22\n    ssh-user: \"ec2-user\"\n    ssh-key-file: \"/path/to/ssh/key.pem\"\n    ssh-key-pass: \"hiuwiewnc092\"\n# should be greater than 0, otherwise the app will error out\nlimit: 50\nkeybindings:\n  execute-query: 'ctrl+e'\n  next-tab: 'tab'\n  prev-tab: 'shift+tab'\n  page-top: 'g'\n  page-bottom: 'G'\n  navigation:\n    up: 'ctrl+k'\n    down: 'ctrl+j'\n    left: 'ctrl+h'\n    right: 'ctrl+l'\n```\n\nOr for sqlite:\n\n```yaml\ndatabase:\n  - name: \"prod\"\n    db: \"path/to/file.sqlite3\"\n    driver: \"sqlite\"\n```\n\nOnly the `host` and `ssl` fields are optionals. `127.0.0.1` and `disable`, respectively.\n\n## Navigation\n\nThe key bindings are now configurable, see [Key bindings configuration](#key-bindings-configuration) to learn how to replace existing key bindings. It's worth noting that key bindings are only configurable through the configuration file, there is no flags to do so. If you don't replace them through the configuration file, the information below remains the same, otherwise, just replace the new key binding with the existing information for the default one.\n\nIf the query panel is active, type the desired query and press \u003ckbd\u003ectrl+e\u003c/kbd\u003e to see the results on the rows panel below.\n\nOtherwise, you might be located at the tables panel, then you can navigate by using the arrows \u003ckbd\u003eUp\u003c/kbd\u003e and \u003ckbd\u003eDown\u003c/kbd\u003e (or the keys \u003ckbd\u003ek\u003c/kbd\u003e and \u003ckbd\u003ej\u003c/kbd\u003e respectively). If you want to see the rows of a table, press \u003ckbd\u003eEnter\u003c/kbd\u003e. To see the schema of a table, locate yourself on the `tables` panel and press \u003ckbd\u003etab\u003c/kbd\u003e to switch to the `columns` panel, then switch \u003ckbd\u003eshift+tab\u003c/kbd\u003e to switch back.\n\n\u003cimg src=\"screenshots/rows-view.png\" /\u003e\n\u003cimg src=\"screenshots/structure-view.png\" /\u003e\n\u003cimg src=\"screenshots/constraints-view.png\" /\u003e\n\u003cimg src=\"screenshots/indexes-view.png\" /\u003e\n\n~~As you may have noticed, navigation has already been added, so every time you query the content of a listed table, the result set is going to be paginated. This allows to the user dealing with large tables, optimizing resources.\nJust hit the `BACK` and `NEXT` buttons to go back and forth.~~\n\nThe navigation buttons were removed since they are too slow to really navigate the content of a table. The user is better off typing a `SELECT` statement with proper `OFFSET` and `LIMIT`.\n\nThe `--db` flag is now optional (except for Oracle), meaning that the user will be able to see the list of databases they have access to. The regular list of tables will be replaced with a tree structure showing a list of databases and their respective list of tables, branching off each database. Due to the nature of the vast majority of DBMSs that don't allow cross-database queries, dblab has to open an independent connection for each database. The side effect of this decision, is that the user has to press `Enter` on the specific database of interest. An indicator showing the current active database will appear at the bottom-right of the screen. To change the focus, just hit enter on another database. Once a database is selected, the usual behavior of inspecting tables remains the same.\n\n\u003cimg src=\"screenshots/tree-view.png\" /\u003e\n\nAt the time to navigate queries' resultsets, the cell will be highlighted, so the user can know which table cell is on. This is important because you can press the `Enter` key on a cell of interest to copy its content.\n\n### Key Bindings\n| Key                                    | Description                           |\n|----------------------------------------|----------------------------------------|\n|\u003ckbd\u003ectrl+e\u003c/kbd\u003e                       | If the query editor is active, execute the query |\n|\u003ckbd\u003eCtrl+D\u003c/kbd\u003e                       | Cleans the whole text from the query editor, when the editor is selected |\n|\u003ckbd\u003eEnter\u003c/kbd\u003e                        | If the tables panel is active, list all the rows as a result set on the rows panel and display the structure of the table on the structure panel |\n|\u003ckbd\u003etab\u003c/kbd\u003e                          | If the resultset panel is active, press tab to navigate to the next metadata tab |\n|\u003ckbd\u003eshift+tab\u003c/kbd\u003e                    | If the resultset panel is active, press shift+tab to navigate to the previous metadata tab |\n|\u003ckbd\u003eCtrl+H\u003c/kbd\u003e                       | Toggle to the panel on the left |\n|\u003ckbd\u003eCtrl+J\u003c/kbd\u003e                       | Toggle to the panel below |\n|\u003ckbd\u003eCtrl+K\u003c/kbd\u003e                       | Toggle to the panel above |\n|\u003ckbd\u003eCtrl+L\u003c/kbd\u003e                       | Toggle to the panel on the right |\n|\u003ckbd\u003eArrow Up\u003c/kbd\u003e                     | Vertical scrolling on the panel. Views: rows, table, constraints, structure and indexes |\n|\u003ckbd\u003ek\u003c/kbd\u003e                            | Vertical scrolling on the panel. Views: rows, table, constraints, structure and indexes |\n|\u003ckbd\u003eArrow Down\u003c/kbd\u003e                   | Vertical on the panel. Views: rows, table, constraints, structure and indexes |\n|\u003ckbd\u003ej\u003c/kbd\u003e                            | Vertical on the panel. Views: rows, table, constraints, structure and indexes |\n|\u003ckbd\u003eArrow Right\u003c/kbd\u003e                  | Horizontal scrolling on the panel. Views: rows, constraints, structure and indexes |\n|\u003ckbd\u003el\u003c/kbd\u003e                            | Horizontal scrolling on the panel. Views: rows, constraints, structure and indexes |\n|\u003ckbd\u003eArrow Left\u003c/kbd\u003e                   | Horizontal scrolling on the panel. Views: rows, constraints, structure and indexes |\n|\u003ckbd\u003eh\u003c/kbd\u003e                            | Horizontal scrolling on the panel. Views: rows, constraints, structure and indexes |\n|\u003ckbd\u003eg\u003c/kbd\u003e                            | Move cursor to the top of the panel's dataset. Views: rows, constraints, structure and indexes |\n|\u003ckbd\u003eG\u003c/kbd\u003e                            | Move cursor to the bottom of the panel's dataset. Views: rows, constraints, structure and indexes |\n|\u003ckbd\u003eCtrl+c\u003c/kbd\u003e                       | Quit |\n\n## Contribute\n\n- Fork this repository\n- Create a new feature branch for a new functionality or bugfix\n- Commit your changes\n- Execute test suite\n- Push your code and open a new pull request\n- Use [issues](https://github.com/danvergara/dblab/issues) for any questions\n- Check [wiki](https://github.com/danvergara/dblab/wiki) for extra documentation\n\n## License\nThe MIT License (MIT). See [LICENSE](LICENSE) file for more details.\n","funding_links":[],"categories":["Go","\u003ca name=\"data-management-tabular\"\u003e\u003c/a\u003eData management - Tabular data","Databases / Log management","Table of Contents"],"sub_categories":["Screen Sharing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanvergara%2Fdblab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanvergara%2Fdblab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanvergara%2Fdblab/lists"}