AI_and_teletype 2
AI Comes to the Teletype
There have been a lot of genuinely interesting developments in the terminal and command-line space recently. Typing fans, take note!
Photo: Rama & Musée Bolo, Teletype-IMG_7287.jpg, licensed under CC BY-SA 2.0 FR.
Modern terminal emulators themselves have gotten much better. Ghostty, for instance is a fast, GPU-accelerated terminal where things like Unicode, even graphics Just Work. Even the shell has seen innovations: I use fish, for instance, which offers smarter autosuggestions and completions than old standbys like bash or zsh. (It is for normal use, not for fancy scripting and such: I hear Nushell is pretty cool too.)
I also like this trend of creating modern replacements for decades-old commands. (At the opposite end of the spectrum is something I just learned about, the Heirloom Project.)bat works like cat but adds syntax highlighting, line numbers, and paging (except when it shouldn’t). eza substitutes for ls with more useful and rainbow-colored output. zoxide replaces cd–yes, cd!– by remembering where you actually go and letting you jump around your filesystem using fuzzy matching.
And then there are entirely new utilities like beets, my new favorite music-tagging and library management software.
Alongside these command-line tools, TUIs—text user interfaces—have been enjoying something of a resurgence. My favorite is yazi, which like a lot of these apps is written in Rust with Ratatui. I love apps like this but they are less easy to script and automate. The ability to script and automate a shell environment, and the fact that it’s text-based, has made it a surprisingly good fit with AI.
A big part of using the terminal is simply remembering that certain tools exist. AI helps not just with flags and syntax but with recalling small, special-purpose commands: that uniq exists and that uniq -c might be exactly what I need, that sort must come before uniq for it to work properly, etc. I have also used AI to help me write shell scripts—nothing huge, but small utilities that glue things together, mostly processing media files or various forms of text extraction, that end up saving a lot of time.
One useful pattern is to give the AI actual input data and have it generate code that processes that data (as opposed to trying to have the AI do the task directly). Recently I gave it a few long HTML files and described the information I wanted extracted. It wrote a Python script that parsed all of them perfectly, when run on a directory with dozens of them. If I had asked the AI to “extract the data” directly, it probably would have hallucinated or refused, because the files were long and wouldn’t fit into the context window. But when it writes a script, it actually works.
Then there are “agents.” For a while now, AI companies have been promised agents that could operate a computer for you, click around apps, and perform tasks in graphical interfaces. Apple previewed a Siri feature that was supposed to control apps on your behalf, but it hasn’t shipped. Early “computer use” agents left many people disappointed: they tended to break immediately, freeze when a dialog box appeared unexpectedly, or misinterpret what was on the screen. Right now, Perplexity is being sued by Amazon for creating AI agents click around the Amazon website, pretending to be a user. Before AI, I sometimes tried using GUI automation tools on the Mac that physically moved the mouse and clicked at specific positions. These are incredibly fragile. If a window shifts by even a few pixels, the automation collapses. And you can’t share these automations because everyone’s screen is different. I think “computer use” AIs might be slightly better than that, but not much.
The terminal is nothing like that: It’s text! It appears everywhere in the training data that large language models learn from. It’s the one part of the computer where an AI can operate without guessing.
This is why tools like Claude Code are possible. It’s an agent, that uses your computer for you. But it doesn’t pretend to be a little robot user moving a mouse around. It works in the same environment many human developers use when writing real software: the shell. It’s a TUI program (see above) that is nothing more than an auto-typer for you. It can clone repositories, run tests, rewrite files, install dependencies, invoke compilers, and clean up debris on your behalf. The terminal is the one place on a modern computer where an LLM can act reliably and deterministically because everything it sees and everything it does is text. Apparently “Warp” is a similar concept, but it’s a magic terminal emulator, as opposed to a TUI that you can run with any terminal emulator / shell.
I don’t believe AI is about to produce polished applications all by itself. Also I am not a programmer. Anyone using AI tools without understanding what they’re doing can get themselves into trouble. But it is remarkable to see what becomes possible when you combine AI with the terminal. I’ve used it to turn a small JavaScript toy into a functioning macOS desktop app, and to modify a terminal calendar program so it could talk directly to macOS’s calendar API instead of forcing me to configure CalDAV manually. These are things I never would have done before. I mean just being able to locally modify open source software (and if I ever distribute it, which I won’t, naturally following all applicable licenses) is new for a non-programmer. If I was a software developer, I’d be worried, not for my job, but for the amount of AI slop code that they might have to deal with in the future. Yikes!
Look, though, it’s the lastest technology being enabled by a user interface originally designed for a teletype. That’s cool.
