Skip to content
/ dbcls Public

DbCls is a versatile terminal client that supports various databases

License

Notifications You must be signed in to change notification settings

Sets88/dbcls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DbCls

DbCls is a versatile client for multiple databases, enabling the editing and preservation of SQL queries in a file, and executing queries directly from the editor, thereby providing a convenient interface for data representation.

Briefly, this application combines the kaa editor and the visidata data visualization tool.

Editor

Data representation

Installation

pip install dbcls

Run

dbcls -H 127.0.0.1 -u user -p mypasswd -E mysql -d mydb mydb.sql

Using config file rather then process arguments to configure

dbcls -c config.json mydb.sql

Where config file is:

{
    "host": "127.0.0.1",
    "port": "3306",
    "username": "user",
    "password": "mypasswd",
    "dbname": "mydb",
    "engine": "mysql"
}

or from bash file

#! /bin/bash

CONFIG='{
    "host": "127.0.0.1",
    "port": "3306",
    "username": "user",
    "password": "mypasswd",
    "dbname": "mydb",
    "engine": "mysql"
}'

dbcls -c <(echo "$CONFIG") mydb.sql

Hotkeys

  • Alt + r - Execute query under cursor or selected text
  • Alt + e - Show databases list
  • Alt + t - Show tables list
  • Ctrl + q - Quit
  • Ctrl + s - Save file

Options

-H --host

Host to connect to

-u --user

Username to connect as

-p --password

Password to use when connecting to server

-E --engine

Database engine, options are: mysql, postgresql, clickhouse

-d --database

Database to use

-P --port

Port number to use for connection (optional)

-c --config

Path to a config file to use

Bugs

See github issues: https://github.com/Sets88/dbcls/issues

About

DbCls is a versatile terminal client that supports various databases

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages