[App] A Terminal Client

tui-preview

I made this thing almost a year ago now, but never got around to sharing it.

Is it ergonomic? No, the webpage is much much better, but this is cooler.

Try it out. Do some reviews over the terminal. Do them over SSH!

link

This is a Ruby project, there is no single executable you could download, you just clone the source code and point a ruby interpreter to the entry point ./bin/tui.rb

Requirements
  • A terminal (e.g. Raw TTY, Alacritty, Ghostty, PowerShell, WezTerm, Foot, …)
  • a CJK font like NotoSans
  • Git (you don’t need any graphical aplication for it, just the raw command line tool is enough)
  • Ruby Interpreter
  • Python Interpreter
    • Patience debugging your environment if you are on Windows (sorry, the python FFI is fragile)
Installation
  1. Clone the code
git clone https://github.com/Everesh/WaniKani-TUI.git
  1. Move to the directory
cd WaniKani-TUI
  1. Install Ruby Dependencies
bundle install
  • 3b. if this install failed due to you not having the bundle command, run
gem install bundler && bundle install
  1. Install Python dependencies
pip install pillow numpy
  1. Put a CJK font into the ./tui/cjk_renderer path
  • It has to be called exactly NotoSansJP-Regular.ttf altho the contents can be whatever
    • Or you can point to any other font explicitly via an absolute path in the config file
  1. You are gtg, just run and have fun
bundle exec ruby bin/tui.rb
Customization

You can change the colors and few other miscellaneous things.
All the options should be listed in the example config.yml

GitHub - Everesh/WaniKani-TUI: Terminal client for WaniKani · GitHub

FAQ

Frequently is a stretch, more like what Im anticipating

Does this store any data outside of the cloned repo?
  • YES, I do utilize the XDG_DATA_HOME or %LOCALAPPDATA%, depending on your
    platform, to store the config file and subject data in a single SQLite db.
Does this communicate with anything outside of WaniKani's API?
  • NO, there is no telemetry or anything of that sort
How do I connect it to my WaniKani profile?
  • You will get prompted on the first run to provide it an api key which would then be stored for subsequent authentication against the wanikani api. The permissions you will need are all_data:read, assignments:start and reviews:create.
How do I delete all the data?
  • Delete the contents of XDG_DATA_HOME/WaniKaniTUI/ or %LOCALAPPDATA%\WaniKaniTUI\, depending on your platform
Can I change the CJK font to something other than NotoSans?
  • YES, anything .ttf is fine, just point to it in the config, or if you dont want to bother with the config file, just rename it to NotoSansJP-Regular.ttf and drop it in the tui path ./tui/cjk_renderer/NotoSansJP-Regular.ttf
When I try to run this, I get an error
  • Could be more things, but most likely you are missing the cjk font. Make sure you have a font named NotoSansJP-Regular.ttf in ./tui/cjk_renderer/. Im not going to be distributing it along with the code itself. Alternatively, you can set a path to any cjk font in the config file and the discovery of Noto in the ./tui sub dir will be skipped
Okey, I do have the font, but I still get an error
  • Most likely a PyCall issue. The python bridge is not the stablest thing in the world. Windows especially is fragile here. I wish I could help you further, but best I can do is wish you the best troubleshooting your environment. The trace is your friend
Cool, could you add <blank>?
  • NO, im not actively adding features, for me the app is complete, but feel free to fork it.

I like it. I’ve been telling people if we had more terminal utilities the internet would be so much better. We don’t need 16 billion web frameworks.

It would for sure be more vibrant. There is just something satisfying about interacting with the web outside of a browser that is hard to describe.

Glad you like it