{"id":17606246,"url":"https://github.com/davidecavestro/jdbsee","last_synced_at":"2025-10-28T08:44:04.900Z","repository":{"id":146095931,"uuid":"121723638","full_name":"davidecavestro/jdbsee","owner":"davidecavestro","description":"A command line SQL tool for JDBC","archived":false,"fork":false,"pushed_at":"2018-04-30T10:45:50.000Z","size":889,"stargazers_count":7,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T21:50:38.773Z","etag":null,"topics":["cli","command-line-tool","database","java","jdbc","sql"],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidecavestro.png","metadata":{"files":{"readme":"README.adoc","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-16T07:09:24.000Z","updated_at":"2022-09-14T00:17:41.000Z","dependencies_parsed_at":"2023-04-20T11:04:50.244Z","dependency_job_id":null,"html_url":"https://github.com/davidecavestro/jdbsee","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidecavestro%2Fjdbsee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidecavestro%2Fjdbsee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidecavestro%2Fjdbsee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidecavestro%2Fjdbsee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidecavestro","download_url":"https://codeload.github.com/davidecavestro/jdbsee/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233819587,"owners_count":18735302,"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","command-line-tool","database","java","jdbc","sql"],"created_at":"2024-10-22T15:44:06.814Z","updated_at":"2025-10-28T08:44:04.838Z","avatar_url":"https://github.com/davidecavestro.png","language":"Groovy","readme":"= JDBSEE - CLI\nDavide Cavestro \u003chttps://github.com/davidecavestro[@davidecavestro]\u003e\n// Settings:\n:idprefix:\n:idseparator: -\nifndef::env-github[:icons: font]\nifdef::env-github,env-browser[]\n:toc: macro\n:toclevels: 1\nendif::[]\nifdef::env-github[]\n:branch: master\n:status:\n:outfilesuffix: .adoc\n:!toc-title:\n:caution-caption: :fire:\n:important-caption: :exclamation:\n:note-caption: :paperclip:\n:tip-caption: :bulb:\n:warning-caption: :warning:\nendif::[]\n// URIs:\n:uri-repo: https://github.com/davidecavestro/jdbsee\n:uri-issues: {uri-repo}/issues\n:uri-search-issues: {uri-repo}/search?type=Issues\n:uri-ci-travis: https://travis-ci.org/davidecavestro/jdbsee\n:uri-coverage-coveralls: https://coveralls.io/github/davidecavestro/jdbsee?branch=master\n:uri-twitter-jdbsee: https://twitter.com/intent/follow?screen_name=jdbsee\n:uri-twitter-davide: https://twitter.com/intent/follow?screen_name=davide_cavestro\nifdef::status[]\nimage:https://img.shields.io/github/license/davidecavestro/jdbsee.svg[Apache License 2.0, link=#copyright-and-license]\nimage:https://img.shields.io/travis/davidecavestro/jdbsee/master.svg[Build Status (Travis CI), link={uri-ci-travis}]\nimage:https://img.shields.io/coveralls/github/davidecavestro/jdbsee.svg[Coverage Status (Coveralls), link={uri-coverage-coveralls}]\nimage:https://img.shields.io/github/commit-activity/y/davidecavestro/jdbsee.svg[GitHub commit activity]\nimage:https://img.shields.io/github/languages/code-size/badges/shields.svg[GitHub code size in bytes]\n\n\nimage:https://img.shields.io/github/release/davidecavestro/jdbsee.svg[GitHub release]\nimage:https://img.shields.io/github/commits-since/davidecavestro/jdbsee/latest.svg[Github commits (since latest release)]\n\nendif::[]\n\nA CLI swiss-army knife for jdbc with batch and interactive mode\n\ntoc::[]\n\n:imagesdir: docs/images\n:icons: font\n\nJdbsee is tool providing database access from command line using JDBC.\n\n\n# Features\n\nJdbsee CLI supports executing SQL queries from command line and\nexporting retrieved data.\n\nThe JDBC drivers can be automatically downloaded or loaded from\njars on filesystem. +\nDatabase connection settings and related credentials can be persisted\nfor later reuse.\n\nThe user interface supports both batch and interactive shell mode.\n\nFor more info please see the link:docs/index.adoc[documentation].\n\n\n# Usage\n\n## Interactive mode\n\nOpen the interactive shell and execute multiple commands within the\napplication:\n\n  * type `jdbsee shell` to open the interactive shell\n  * hit `TAB` to get a list of available commands\n  * use `left`/`right` arrows or `TAB` to navigate through available\n  commands, or type some chars to filter by name\n  * hit `ENTER` to automatically type the selected command, then `ENTER`\n  again to execute it or `TAB` for further hints\n\nimage::jdbsee_shell.png[Jdbsee shell message]\n\n\nIn order to execute multiple queries within the same sql session:\n\n  * use the `jdbsee connect` command to open the interactive sql session\n  (i.e. `jdbsee connect -d \"com.h2database:h2:1.4.196\" -l \"jdbc:h2:mem:test\"`)\n  * type your query and hit ENTER for every query\n  * use `up`/`down` arrows to navigate into the history\n  * type `quit` and hit `ENTER` to exit\n\nimage::jdbsee_connect.png[Jdbsee connect message]\n\n\n## Batch mode\n\nInvoke the `jdbsee` executable passing appropriate commands and params.\n`jdbsee help` provides the main help. `jdbsee COMMAND help` provides\nthe help for COMMAND.\n\nimage::jdbsee.Demo.png[Jdbsee help message]\n\nSee the list of link:docs/index.adoc#available-commands[supported commands]\nfor more details.\n\n\n# Examples\n\n## Automatic downloading drivers\n\nUse the `-d` switch to automatically download drivers\n```\n./bin/jdbsee run -u postgres -p postgres \\\n  -d \"org.postgresql:postgresql:42.2.1\" \\\n  -l \"jdbc:postgresql://localhost:5432/test\" \\\n  \"SELECT * FROM contacts;\"\n```\n\n\n\n## Loading drivers from external jars\n\nUse the `-j` switch to load drivers from filesystem\n```\n./bin/jdbsee run -u postgres -p postgres \\\n  -j \"/path/to/postgresql.jar\" \\\n  -l \"jdbc:postgresql://localhost:5432/test\" \\\n  \"SELECT * FROM contacts;\"\n```\n\n## Loading drivers from the `dropins` subfolder\n\nCopy your jdbc driver jars into the app distribution under the `dropins` folder, and they will be scanned for jdbc\ndrivers\n\n```\n./bin/jdbsee run -u postgres -p postgres \\\n  -l \"jdbc:postgresql://localhost:5432/test\" \\\n  \"SELECT * FROM contacts;\"\n```\n\n\n# How to build\n\nThe build system supports producing the distribution of the application both with or\nwithout drivers.\n\nThe _main_ distribution comes without drivers, while the _full_ provides\ndrivers within the `dropins` folder.\n\nThe following command generates both _main_ and _full_ distribution archives\n\n```\n./gradlew fullDistTar fullDistZip distTar distZip\n```\n\nthe generated archives are located into the `build/distributions` subfolder\n\n----\nbuild/distributions/\n├── jdbsee-x.y.z-SNAPSHOT.tar\n├── jdbsee-x.y.z-SNAPSHOT.zip\n├── jdbsee-full-x.y.z-SNAPSHOT.tar\n└── jdbsee-full-x.y.z-SNAPSHOT.zip\n----\n\nFollows an example on how to build with drivers (full distribution) and launch some queries on an in-memory h2 db\n\n----\n./gradlew installFullDist \u0026\u0026 \\ //\u003c1\u003e\n./build/install/jdbsee-full/bin/jdbsee run \\ //\u003c2\u003e\n-x \"create table contacts (id int primary key, name varchar(100));\" \\ //\u003c3\u003e\n-x \"insert into contacts (id, name) values (1, 'Alice');\" \\ //\u003c4\u003e\n-x \"insert into contacts (id, name) values (2, 'Bob');\" \\\n-x \"insert into contacts (id, name) values (3, 'John');\" \\\n-x \"insert into contacts (id, name) values (4, 'Daisy');\" \\\n-d \"com.h2database:h2:1.4.196\" \\\n-l \"jdbc:h2:mem:test\" \\ //\u003c5\u003e\n\"SELECT * FROM contacts;\" //\u003c6\u003e\n----\n\u003c1\u003e Build project\n\u003c2\u003e invoke the `run` command\n\u003c3\u003e execute create table DDL\n\u003c4\u003e add some data\n\u003c5\u003e define jdbc url\n\u003c6\u003e specify select query\n\nyou should get\n\n```\n┌───────────────────────────────────────┬──────────────────────────────────────┐\n│ID                                     │NAME                                  │\n├───────────────────────────────────────┼──────────────────────────────────────┤\n│1                                      │Alice                                 │\n├───────────────────────────────────────┼──────────────────────────────────────┤\n│2                                      │Bob                                   │\n├───────────────────────────────────────┼──────────────────────────────────────┤\n│3                                      │John                                  │\n├───────────────────────────────────────┼──────────────────────────────────────┤\n│4                                      │Daisy                                 │\n└───────────────────────────────────────┴──────────────────────────────────────┘\n\n```\n\n# How to release\n\n```\n./gradlew release \\\n-Prelease.versionIncrementer=incrementMinor \\\n-Prelease.dryRun  \\\n-Prelease.customUsername=\"...\" -Prelease.customPassword=\"...\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidecavestro%2Fjdbsee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidecavestro%2Fjdbsee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidecavestro%2Fjdbsee/lists"}