Giter Club home page Giter Club logo

dbee's Introduction

DBee - A terminal app for running ad-hoc database queries

DBee is a basic terminal application for running ad-hoc queries against a (mysql / postgres) database.

It has the following features:

  • view a list of the tables in the database along with the column info for the selected table
  • quickly view table data without writing sql
  • keep one or more queries in the query panel and easily run the query under the cursor (queries are saved per database)

If you want to browse the table relationships, edit columns, add indexes, or really anything other than running a query, then you need to use another tool.

Usage

dbee [database alias]

The database alias must match the name of a database configuration in your config file.

Installation

go install github.com/wheelibin/dbee@latest

Config

Config is read from ~/.config/dbee/dbee.toml

example config file

# the timeout for all queries
queryTimeout = 60 

# the max number of rows to fetch when viewing table data (does not apply to ad-hoc queries)
tableDataRowLimit = 100

[databases]

[databases.animals]
driver = "mysql"
host = "localhost"
port = 3306
user = "root"
password = "123456"
database = "animals.0"

[databases.music]
driver = "postgres"
host = "localhost"
port = 5432
user = "postgres"
password = "123456"
database = "music-store"

Keys

Configurable key map is coming soon, but for now the default keys are:

general

  • tab / shift+tab to navigate between panels
  • ctrl+t toggle tables
  • / to filter in the tables, table info, and results panel (esc to cancel)

table panel

  • enter to fetch the first 100 rows of the selected table

query panel

  • F5 to run the query under the cursor
  • ctrl+s to save the query (buffer is saved per db)
  • ctrl+r to reload the query file from disk

dbee's People

Contributors

wheelibin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.