Skip to content

Play Go/Baduk offline in the terminal. Play against a local ai (gnugo).

Notifications You must be signed in to change notification settings

JollyGrin/termsuji-local

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

termsuji-local

A beautiful terminal UI for playing Go/Baduk against GnuGo offline.

Fork of termsuji that replaces the online-go.com backend with a local GnuGo (GTP) subprocess interface.

termsujiiii.mp4

Features

  • Beautiful terminal-based Go board (inherited from termsuji)
  • Play against GnuGo locally, completely offline
  • No time limits (untimed games)
  • Configurable board sizes (9x9, 13x13, 19x19)
  • Adjustable engine difficulty (levels 1-10)
  • Choose your color (Black/White)
  • Customizable board color
  • Games saved as SGF files — the universal Go game record format
  • Game history browser — revisit and continue past games
  • Undo moves

Requirements

  • Go 1.18+
  • GnuGo installed and in PATH
  • Terminal with Unicode support

Installing GnuGo

macOS (via Homebrew):

brew install gnu-go

Linux (Ubuntu/Debian):

sudo apt install gnugo

Linux (Fedora):

sudo dnf install gnugo

Linux (Arch):

sudo pacman -S gnugo

Windows:

  1. Download GnuGo from http://www.gnu.org/software/gnugo/download.html
  2. Extract to a folder (e.g., C:\gnugo)
  3. Add the folder to your PATH:
    • Open System Properties → Advanced → Environment Variables
    • Edit PATH and add C:\gnugo (or wherever you extracted it)
  4. Verify installation: gnugo --version

Alternatively on Windows with WSL:

sudo apt install gnugo

Installation

git clone git@github.com:JollyGrin/termsuji-local.git
cd termsuji-local
go build

This creates a termsuji-local executable in the current directory.

Usage

Simply run the binary:

./termsuji-local

Command Line Flags

Flag Description Default
--boardsize Board size (9, 13, or 19) 19
--color Player color (black or white) black
--difficulty GnuGo difficulty level (1-10) 5
--komi Komi value 6.5
--play Start game immediately with defaults false
--focus Start in focus mode (fullscreen board) false
--version Print version and exit
--update Update to the latest version

You'll be presented with a game setup screen where you can configure:

  • Board size (9x9, 13x13, 19x19)
  • Your color (Black plays first, White plays second)
  • GnuGo difficulty level (1-10)
  • Komi (compensation for White)

Controls

Key Action
Arrow keys Move cursor
hjkl Move cursor (vim motions)
Enter Play move at cursor
p Pass turn
f Toggle focus mode
u Undo last move
r Toggle game recording
q Quit (or deselect cursor)

Configuration

Configuration is stored at ~/.config/termsuji-local/config.json:

{
  "theme": { ... },
  "gnugo": {
    "gnugo_path": "gnugo",
    "default_board_size": 19,
    "default_komi": 6.5,
    "default_level": 5
  }
}

Credits

Based on termsuji by lvank.

License

MIT

About

Play Go/Baduk offline in the terminal. Play against a local ai (gnugo).

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 94.8%
  • Shell 5.2%