lean-tui
Share on:
Enter Your Mastodon Instance
Copy the link below to share to Mastodon
https://terminaltrove.com/lean-tui/
A terminal viewer for reading and viewing Lean 4 proofs as graphs.
Script Preview
Review this script before executing in your terminal.

lean-tui is a terminal viewer for exploring Lean 4 proofs and programs as interactive graphs. It runs alongside editors such as helix, neovim, and emacs to graphical ones like Zed or VSCode.
You can compare hypotheses and open goals before and after each tactic in the TUI. The proof tree shows each step as a node and errors appear on the relevant nodes. You can navigate from selected item(s) to its source and edit the Lean source code in your selected editor. Other views show how the pieces of a Lean program fit together and what the code returns or changes.
Proofs are shown as interactive graphs in the terminal which you can navigate the graph or edit with your editor. The graph updates when the editor requests information, such as when you use the hover shortcut. Other features include clipboard copying, a follow mode that tracks your editor cursor, colour-coded diffs between proof steps, multiple display modes and keyboard shortcuts for navigating the graph.
For mathematicians, Lean users and anyone curious about how formal proofs fit together, lean-tui lets you study proofs as interactive graphs in the terminal alongside your preferred editor.




