A person tells an AI what to do. But menus, spinners, password fields, and agent CLIs are invisible to a plain pipe. SmartCLI lets the model perceive the screen, press keys, and confirm the result — the way a human would.
Pipe a fullscreen program and you get nothing, or a hang. Drive it through SmartCLI and the model reads a semantic snapshot, moves with arrow keys, and verifies every step.
Each skill is a self-contained tool over one pluggable PTY +
pyte screen model.
perceive → decide → act → wait → confirm. Reads semantic screen snapshots, never a blind sleep. Classifies a screen and drives it.
A living-template fx engine: pure frame producers,
auto-discovered, themeable, truecolor. Bounded play loop.
A web-like layout engine emitting tmux-safe ANSI frames. CSS box model, flex/grid, CJK-accurate so columns never desync.
These run the same primitives the skills ship — live, in your browser. Poke them.
SmartCLI driving the actual lazygit TUI through its
perceive → act → confirm loop — navigating panels with arrow keys, opening a
commit's diff, highlighting a branch — all by reading the pyte
cell grid (which row is selected, the alt-screen). Captured by driving the
real program in a Linux container, not scripted. A byte-stream matcher like
pexpect can't perceive "which row is highlighted"; a screen model can.
:wqEvery clip is SmartCLI driving the real program — reading the pyte screen grid and pressing keys, not scripted output. A byte-stream matcher like pexpect can't perceive "which row is highlighted"; a screen model can.
The genuinely hard, defensible part: one library drives the same
real lazygit through the same perceive → act → confirm
loop on all three platforms — native ConPTY on Windows, the BSD pty
on macOS, and the Linux pty — with adaptive DECCKM/SS3 arrows on each.
No WSL, no Cygwin. Each clip below was driven for real on that OS.
Windows drove lazygit 0.63
under ConPTY; macOS drove it on an Apple-Silicon M-series over the BSD pty
(the DECCKM/SS3 arrow path verified against real ncurses there); Linux via the
stdlib pty.fork(). Same scripts/tui.py, same recipes,
three OSes.
Every clip below is the real effect rendered frame-by-frame
through the project's own pipeline — no screen recorder. Reproduce any with
python -m fx play <name>.
SmartCLI is a tool the model calls — it works with whatever model is driving, inside whatever agent CLI you run.
The core installs from PyPI; the skills run in place. A
dropped-in drive-tui folder even carries its own core.