2021-06-22 04:12:28 +00:00
< div align = "center" >
2021-09-06 09:27:17 +00:00
![gobang ](./resources/logo.png )
2021-06-22 04:12:28 +00:00
2021-07-09 01:43:53 +00:00
gobang is currently in alpha
2021-09-06 15:41:44 +00:00
A cross-platform TUI database management tool written in Rust
2021-06-22 04:12:28 +00:00
2021-06-25 16:44:54 +00:00
[![github workflow status ](https://img.shields.io/github/workflow/status/TaKO8Ki/gobang/CI/main )](https://github.com/TaKO8Ki/gobang/actions) [![crates ](https://img.shields.io/crates/v/gobang.svg?logo=rust )](https://crates.io/crates/gobang)
2021-06-22 04:12:28 +00:00
2021-06-22 18:40:27 +00:00
![gobang ](./resources/gobang.gif )
2021-06-22 04:12:28 +00:00
< / div >
2021-07-08 16:42:41 +00:00
## Features
- Cross-platform support (macOS, Windows, Linux)
2021-09-06 15:41:44 +00:00
- Multiple Database support (MySQL, PostgreSQL, SQLite)
2021-07-08 16:42:41 +00:00
- Intuitive keyboard only control
2021-07-09 01:43:53 +00:00
2021-09-06 14:06:04 +00:00
## TODOs
2021-09-08 04:04:50 +00:00
- [ ] SQL editor
2021-09-06 14:06:04 +00:00
- [ ] Custom key bindings
- [ ] Custom theme settings
- [ ] Support the other databases
2021-09-11 17:10:35 +00:00
## What does "gobang" come from?
gobang means a Japanese game played on goban, a go board. The appearance of goban looks like table structure. And I live in Kyoto, Japan. In Kyoto city, streets are laid out on a grid (We call it “goban no me no youna (碁盤の目のような)”). They are why I named this project "gobang".
2021-07-09 01:43:53 +00:00
## Installation
2021-09-17 00:36:08 +00:00
### With Homebrew (Linux, macOS)
2021-09-07 14:01:18 +00:00
If you’ re using Homebrew or Linuxbrew, install the gobang formula:
```
2021-09-17 00:36:08 +00:00
brew install tako8ki/tap/gobang
2021-09-07 14:01:18 +00:00
```
2021-09-17 00:36:08 +00:00
### On NetBSD
If you're a NetBSD user, then you can install gobang from [pkgsrc ](https://pkgsrc.se/databases/gobang ):
```
pkgin install gobang
```
### With Cargo (Linux, macOS, Windows)
2021-07-09 01:43:53 +00:00
If you already have a Rust environment set up, you can use the `cargo install` command:
```
2021-09-17 00:36:08 +00:00
cargo install --version 0.1.0-alpha.5 gobang
2021-07-09 01:43:53 +00:00
```
2021-09-06 15:41:44 +00:00
2021-09-17 00:36:08 +00:00
### From binaries (Linux, macOS, Windows)
2021-09-07 14:01:18 +00:00
- Download the [latest release binary ](https://github.com/TaKO8Ki/gobang/releases ) for your system
- Set the `PATH` environment variable
2021-09-06 15:41:44 +00:00
## Usage
```
$ gobang
```
```
2021-09-11 05:16:13 +00:00
$ gobang -h
2021-09-06 15:41:44 +00:00
USAGE:
gobang [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --config-path < 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 ).
2021-07-23 18:16:17 +00:00
## Keymap
| Key | Description |
| ---- | ---- |
2021-09-06 10:39:01 +00:00
| < kbd > h< / kbd > , < kbd > j< / kbd > , < kbd > k< / kbd > , < kbd > l< / kbd > | Scroll left/down/up/right |
| < kbd > Ctrl< / kbd > + < kbd > u< / kbd > , < kbd > Ctrl< / kbd > + < kbd > d< / kbd > | Scroll up/down multiple lines |
| < kbd > g< / kbd > , < kbd > G< / kbd > | Scroll to top/bottom |
| < kbd > H< / kbd > , < kbd > J< / kbd > , < kbd > K< / kbd > , < kbd > L< / kbd > | Extend selection by one cell left/down/up/right |
2021-08-28 06:42:44 +00:00
| < kbd > y< / kbd > | Copy a cell value |
2021-09-06 10:39:01 +00:00
| < kbd > ←< / kbd > , < kbd > →< / kbd > | Move focus to left/right |
2021-09-07 14:17:32 +00:00
| < kbd > c< / kbd > | Move focus to connections |
2021-08-28 06:42:44 +00:00
| < kbd > /< / kbd > | Filter |
2021-09-06 10:39:01 +00:00
| < kbd > ?< / kbd > | Help |
| < kbd > 1< / kbd > , < kbd > 2< / kbd > , < kbd > 3< / kbd > , < kbd > 4< / kbd > , < kbd > 5< / kbd > | Switch to records/columns/constraints/foreign keys/indexes tab |
2021-08-28 08:47:49 +00:00
## Configuration
The location of the file depends on your OS:
2021-09-02 08:28:07 +00:00
- macOS: `$HOME/.config/gobang/config.toml`
- Linux: `$HOME/.config/gobang/config.toml`
- Windows: `%APPDATA%/gobang/config.toml`
2021-08-28 08:47:49 +00:00
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
2021-09-08 01:23:32 +00:00
password = "password"
2021-08-28 08:47:49 +00:00
database = "foo"
2021-09-06 09:45:27 +00:00
[[conn]]
type = "postgres"
user = "root"
host = "localhost"
port = 5432
database = "bar"
[[conn]]
type = "sqlite"
path = "/path/to/baz.db"
2021-08-28 08:47:49 +00:00
```
2021-09-08 04:04:50 +00:00
## Contribution
Contributions, issues and pull requests are welcome!