Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

texsh

A LaTeX math shell for the terminal. Type an expression, press Enter, and it renders in place — shell flow like zsh or bash, math layout from opentui-math.

texsh> x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

           ╭────────
     -b ± √ b² - 4ac
x = ─────────────────
           2a

texsh> \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}

 ∞   -x²      ╭─
∫   e   dx = √ π
 -∞

On Kitty-compatible terminals (Ghostty, Kitty, WezTerm) formulas also render as high-resolution MathJax graphics, with automatic Unicode-cell fallback everywhere else.

Requirements

  • Bun ≥ 1.3
  • A real terminal (not a bare pipe)

Install & run

bun install
bun start

Or:

bun index.ts

Usage

Input What happens
LaTeX expression Rendered below the prompt
help / ? Built-in command list
examples Sample formulas to try
history Past inputs
mode auto|kitty|cells Switch graphics backend
clear / Ctrl+L Clear scrollback
exit / Ctrl+C Leave the shell
↑ / ↓ Previous / next command

Common delimiters are stripped automatically, so pasting $E=mc^2$, $$...$$, \(...\), or \[...\] works.

Stack

License

MIT

About

Shell/REPL that renders LaTeX on terminals (looks best on kitty and Ghostty)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages