{"id":20265509,"url":"https://github.com/dabbertorres/dbman","last_synced_at":"2026-05-07T23:04:09.278Z","repository":{"id":45942814,"uuid":"330772471","full_name":"dabbertorres/dbman","owner":"dabbertorres","description":"CLI/Nvim Plugin/Library for connecting to databases.","archived":false,"fork":false,"pushed_at":"2021-11-25T20:55:13.000Z","size":56,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T05:11:19.880Z","etag":null,"topics":["cli","database","golang","library","neovim-plugin"],"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/dabbertorres.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-18T19:55:54.000Z","updated_at":"2021-11-25T20:55:16.000Z","dependencies_parsed_at":"2022-09-24T18:34:33.846Z","dependency_job_id":null,"html_url":"https://github.com/dabbertorres/dbman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabbertorres%2Fdbman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabbertorres%2Fdbman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabbertorres%2Fdbman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabbertorres%2Fdbman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dabbertorres","download_url":"https://codeload.github.com/dabbertorres/dbman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241739430,"owners_count":20012103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","database","golang","library","neovim-plugin"],"created_at":"2024-11-14T11:48:41.643Z","updated_at":"2026-05-07T23:04:09.139Z","avatar_url":"https://github.com/dabbertorres.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dbman\n\n## Config\n\nThe default config file is located at `$HOME/.config/dbman/config.json`. Otherwise,\nyou can pass the `-cfg \u003cmy config file\u003e` flag.\n\nIf the default config file doesn't exist, one is generated containing a connection\nfor connecting to a postgresql database running on your localhost (or a container, etc).\n\nExample configuration:\n\n```json\n{\n  \"connections\": {\n    \"example\": {\n      \"host\": \"the hostname or IP address running the database\",\n      \"port\": 5432,\n      \"database\": \"database name to connect to on the instance\",\n      \"username\": \"username\",\n      \"password\": \"optional - if required, you'll be prompted for it when connecting\",\n      \"driver\": \"postgres (only driver tested at this time)\",\n      \"driver_opts\": {\n        \"set of\": \"driver specific settings\",\n        \"for connecitng\": \"for example\",\n        \"sslmode\": \"verify-full\"\n      },\n      \"tunnel\": \"the name of a tunnel configuration (optional)\",\n      \"connect_timeout_sec\": 30,\n      \"max_open_conns\": 4\n    }\n  },\n  \"tunnels\": {\n    \"example\": {\n      \"host\": \"the hostname or IP address of the tunnel server\",\n      \"port\": 22,\n      \"user\": \"ssh username\",\n      \"auth_method\": \"password OR public_key OR agent\",\n      \"password\": \"only used if auth_method == password (optional, prompted for if needed)\",\n      \"private_key_file\": \"only used if auth_method == public_key\",\n      \"private_key_passphrase\": \"only used if auth_method == public_key, and private key is encrypted (optional, prompted for if needed)\",\n      \"connect_timeout_sec\": 30,\n      \"disable_verify_known_host\": false,\n      \"host_public_key_file\": \"public key of the server, if it's not in your known hosts or otherwise in your SSH agent\"\n    }\n  }\n}\n```\n\n## Usage\n\n### CLI\n\nRun `dbman \u003cconnection name\u003e` to connect to the named connection configuration.\nIf you forget what connections you have in your config file, run `dbman -list`.\n\n### neovim plugin\n\nNot 100% sure on a required version, but v0.4.4 (the latest stable, at the time\nof writing) works nicely.\nFill out the default config file, copy `\u003crepo root\u003e/cmd/dbman-nvim/dbman.vim`\nto your `~/.config/nvim/plugin/` directory, and make sure `dbman-nvim` is on\nyour `$PATH`.\n\nLaunch neovim! Here are the list of commands:\n\n- `DBConnections`\n  - lists available connections\n- `DBConnect \u003cconnection name\u003e`\n  - connect to a database (has autocompletes support)\n  - Unless disabled with `let g:db_auto_display_schema = 0`, a window should open\n    displaying the accessible schemas and tables.\n- `DBRefresh`\n  - if you have the auto schema display disabled, this command will show it.\n- `DBSchemas`\n  - lists accessible schemas on the current connection.\n- `DBTables`\n  - lists accessible tables.\n  - If no arguments are given, tables are listed in the public schema are listed.\n  - If one or more arguments are given, tables in each schema are listed.\n- `DBDescribe \u003ctable name\u003e`\n  - print a description of the named table's schema.\n  - Use `schema_name.table_name` syntax for non\\*public tables.\n- `DBRun \u003coptional buffer number\u003e`\n  - Executes SQL in your current buffer.\n  - If you only want to run part of the SQL in your buffer, select what you want\n    in visual mode!\n  - If a buffer number was provided, the results of the query (if any) will be put\n    in that buffer. Otherwise, a new buffer and window will be created to display\n    the results.\n\n## Status\n\nThis started as nothing but a proof of concept prototype to answer a question, on the side,\nwhich evolved into what it is now. Needless to say, the code needs a good amount of cleanup\n(Let alone more tests, documentation, the usual, etc).\nHowever, I've been using it daily for several months now, so it's pretty stable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabbertorres%2Fdbman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdabbertorres%2Fdbman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabbertorres%2Fdbman/lists"}