···11+# better-nijisort-cli
22+33+A terminal-based sorter for Nijisanji livers. Pick between two livers one at a time — the app uses a merge sort algorithm to produce a ranked list from your choices.
44+55+## Usage
66+77+### Run from source
88+99+```bash
1010+npm install
1111+node src/index.js
1212+# or
1313+npm start
1414+```
1515+1616+### Prebuilt binaries
1717+1818+Download the binary for your platform from the [Releases](../../releases) page and run it directly — no Node.js required.
1919+2020+| Platform | File |
2121+|---|---|
2222+| Linux | `better-nijisort-cli-linux` |
2323+| macOS | `better-nijisort-cli-macos` |
2424+| Windows | `better-nijisort-cli-win.exe` |
2525+2626+On Linux/macOS, make it executable first:
2727+2828+```bash
2929+chmod +x better-nijisort-cli-linux
3030+./better-nijisort-cli-linux
3131+```
3232+3333+On macOS you may need to clear the quarantine flag:
3434+3535+```bash
3636+xattr -d com.apple.quarantine better-nijisort-cli-macos
3737+```
3838+3939+## How it works
4040+4141+1. **Filter** — choose which branches and genders to include
4242+2. **Sort** — pick your preferred liver in each head-to-head matchup
4343+3. **Results** — view the final ranking in a table
4444+4545+## Controls
4646+4747+### Filter screen
4848+4949+| Key | Action |
5050+|---|---|
5151+| `↑` / `k` | Move up |
5252+| `↓` / `j` | Move down |
5353+| `Space` | Toggle option |
5454+| `Enter` | Start sorting |
5555+5656+### Sorting screen
5757+5858+| Key | Action |
5959+|---|---|
6060+| `←` / `h` | Pick left |
6161+| `→` / `l` | Pick right |
6262+| `↑` / `k` | Tie |
6363+| `↓` / `j` | Undo last pick |
6464+| `Ctrl-C` | Quit |
6565+6666+### Results screen
6767+6868+| Key | Action |
6969+|---|---|
7070+| `1` | Show top 5 |
7171+| `2` | Show top 10 |
7272+| `3` | Show top 20 |
7373+| `q` / `Ctrl-C` | Quit |
7474+7575+## Dataset
7676+7777+Dataset version: **2026-05-19** · 274 livers across にじさんじ, NIJISANJI EN, ex-ID, ex-KR, and NIJISANJI IN.
7878+7979+## Build from source
8080+8181+Requires Node.js 22+.
8282+8383+```bash
8484+npm install
8585+npm run build
8686+# outputs to dist/
8787+```
8888+8989+Binaries are built with [@yao-pkg/pkg](https://github.com/yao-pkg/pkg).
9090+9191+## Credits
9292+9393+- [execfera's Touhou Project character sorter (tohosort)](https://tohosort.frelia.my/) — original sorter concept and source code
9494+- [rennelu's Nijisanji liver sorter](https://rennelu.github.io/nijisort) — the Nijisanji adaptation this is based on
9595+- [better-nijisort (web)](https://nijisanji.sorter.ufal.my.id/) — the web version this CLI was built from