11 releases
Uses new Rust 2024
| new 0.1.15 | Mar 2, 2026 |
|---|---|
| 0.1.14 | Feb 20, 2026 |
#214 in Command line utilities
545KB
2K
SLoC
Keybind Spaced Repetition - Learn keyboard shortcuts by actually typing them, with spaced repetition scheduling.
Built with Rust and ratatui, using the FSRS algorithm for optimal review scheduling.
Features
- Learn keybindings by actually typing them
- Spaced repetition scheduling via the FSRS algorithm
- Three keyboard modes: raw (Shift-g, Shift-4), chars (G, $), and command (ls -la, git stash)
- Multi-chord sequences like
Ctrl+K Ctrl+Cory s i w ) - Visual feedback: green for correct chords, red for mistakes
- Pause/resume, card shuffling, session statistics
- Daily automatic database backups
Installation
Cargo
cargo install kbsr
Nix
For pre-built binaries, add the cache first (optional, avoids compiling from source):
cachix use kbsr
Then install:
nix run github:dbalmain/kbsr
# or install persistently
nix profile install github:dbalmain/kbsr
From source
git clone https://github.com/dbalmain/kbsr.git
cd kbsr
cargo install --path .
Quick Start
- Create a deck file at
~/.config/kbsr/decks/my-shortcuts.tsv:
Ctrl+S Save file
Ctrl+Z Undo
Ctrl+Shift+Z Redo
g g Go to top of file
- Run
kbsr, select your deck, and start typing keybinds.
Cards you get right are scheduled for future review. Cards you miss are repeated at the end of the session for practice, but only the first showing affects scheduling.
Terminal Requirements
kbsr uses the Kitty keyboard protocol for key detection. Supported terminals include Kitty, WezTerm, Ghostty, and foot. Running inside tmux will mean you can't study your tmux keybinds. Similarly, if you're practicing your window manager keybinds, you'll need to disable them somehow.
Documentation
- Deck Format - How to create and structure deck files
- Configuration - All settings and their defaults
- Scheduling - How FSRS scheduling and interval compression work
- Usage Guide - Study flow, controls, and tips
File Locations
| File | Location |
|---|---|
| Decks | ~/.config/kbsr/decks/*.tsv |
| Config | ~/.config/kbsr/config.toml |
| Database | ~/.local/share/kbsr/kbsr.db |
| Backups | ~/.local/share/kbsr/kbsr.db.backup.YYYY-MM-DD |
Building
cargo build # Debug build
cargo build --release # Release build
cargo test # Run tests
cargo clippy # Lint
cargo fmt # Format
License
MIT
Dependencies
~84–125MB
~2M SLoC