Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xxf098/gobangx
A cross-platform Vim-like database management tool written in Rust
https://github.com/xxf098/gobangx
database rust sql terminal tui vim
Last synced: 27 days ago
JSON representation
A cross-platform Vim-like database management tool written in Rust
- Host: GitHub
- URL: https://github.com/xxf098/gobangx
- Owner: xxf098
- License: mit
- Created: 2022-04-03T03:02:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-09T02:24:36.000Z (over 1 year ago)
- Last Synced: 2024-10-08T18:41:47.501Z (about 1 month ago)
- Topics: database, rust, sql, terminal, tui, vim
- Language: Rust
- Homepage:
- Size: 76 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gobangx is based on [gobang](https://github.com/TaKO8Ki/gobang)
A cross-platform Vim-like database management tool written in Rust
[![github workflow status](https://img.shields.io/github/workflow/status/xxf098/gobangx/CI/main)](https://github.com/xxf098/gobangx/actions)
## Features
- Cross-platform support (macOS, Windows, Linux)
- Multiple Database support (MySQL, PostgreSQL, SQLite)
- Intuitive keyboard only control## Installation
### From binaries (Linux, macOS, Windows)
- Download the [latest release binary](https://github.com/xxf098/gobangx/releases) for your system
- Set the `PATH` environment variable## Usage
```
$ gobang
``````
$ gobang -h
USAGE:
gobang [OPTIONS]FLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-c, --config-path Set the config file
```If you want to add connections, you need to edit your config file. For more information, please see [Configuration](#Configuration).
## Keymap
| Key | Description |
| ---- | ---- |
| h, j, k, l | Scroll left/down/up/right |
| Ctrl + u, Ctrl + d | Scroll up/down multiple lines |
| 0, $ | Scroll to start/end |
| g , G | Scroll to top/bottom |
| f+_ | Forward to next column starts with the character `_` |
| F+_ | Backward to next column starts with the character `_` |
| ; | Repeat previous f, F movement |
| H, J, K, L | Extend selection by one cell left/down/up/right |
| y | Yank a cell value |
| yc | Yank column name |
| Y | Yank `CREATE TABLE` or `INSERT INTO` sql |
| D | Delete row by primary key or `id` or first column |
| C | Change current cell value, set value to `NULL` with `` |
| : | Start ex command, see below for commands list |
| o, O | Order column asc/desc |
| =, - | Expand/Shorten column width |
| ←, → | Move focus to left/right |
| c | Move focus to connections |
| r | Move focus to recent tables |
| / | Filter |
| ? | Help |
| 1, 2, 3, 4, 5 | Switch to records/columns/constraints/foreign keys/indexes tab |## Command
| Command | Description |
| ---- | ---- |
| tree | Toggle database tree |## Configuration
The location of the file depends on your OS:
- macOS: `$HOME/.config/gobang/config.toml`
- Linux: `$HOME/.config/gobang/config.toml`
- Windows: `%APPDATA%/gobang/config.toml`The following is a sample config.toml file:
```toml
[[conn]]
type = "mysql"
user = "root"
host = "localhost"
port = 3306[[conn]]
type = "mysql"
user = "root"
host = "localhost"
port = 3306
password = "password"
database = "foo"[[conn]]
type = "postgres"
user = "root"
host = "localhost"
port = 5432
database = "bar"[[conn]]
type = "sqlite"
path = "/path/to/baz.db"[settings]
# support: red,green,yellow,blue,magenta,cyan or color code
color = "red"
# page size limit, page_size >= 20 && page_size <= 2000
page_size = 100
```