Terminal AI-7: chatting with AI on a green screen
Some projects start with a business case. This one started with "I wonder what it would feel like to talk to an AI on a 1980s terminal."
It turns out it feels great. Terminal AI-7 boots up with a little start-up sequence, gives you a blinking cursor on a scanlined green screen, and types the AI's replies out one character at a time like it's coming down a 300-baud modem. You can switch to amber or white phosphor if green isn't your thing.
But really it was a learning build. I wanted to understand how talking to an AI model actually works, under all the nice apps.
No server, on purpose
The whole thing is one HTML file: the HTML, CSS and JavaScript together, about 1,400 lines, no framework, no build step.
There's no backend at all. You bring your own API key, it's saved in your own browser, and your browser talks to the AI provider directly. That was the point: your key and your conversations never pass through my server, because there isn't one. (The flip side: a key saved in a browser is only as safe as that browser, so use it on your own machine, not a shared one. The help screen says so.)
What I learned
An AI chat has no memory. The first surprise. Every time you send a message, the app sends the entire conversation so far, and the model reads the whole thing fresh. "Memory" is just the app resending the transcript. Once that clicks, a lot of AI behavior makes more sense, including why long chats cost more.
Tokens are money. So the status bar keeps a running count of tokens in and out, with an estimated cost for the session. Watching that number move is an education in itself.
CORS will humble you. Browsers block a web page from calling another site's API unless that site says it's allowed. Anthropic lets you call Claude straight from a browser if you send a header with the wonderfully honest name anthropic-dangerous-direct-browser-access. OpenRouter is fine too, and so are models running on your own machine (Ollama, LM Studio). OpenAI's own API is blocked from browsers, so the app points you to OpenRouter for GPT models instead. Adding a little server to get around that would have broken the "no server" promise, so I didn't.
Adapters keep it tidy. It started as Claude-only. Adding other providers meant splitting the "send a message" code into one small adapter per provider, all returning the same shape: the reply and the token count. The rest of the app doesn't know or care who it's talking to.
The fun part
The CRT look is all CSS: scanlines, a vignette darkening the corners, and a soft phosphor glow on the text. There's a panel to change the font size, the phosphor color and how fast the typewriter types (including "instant", for when the nostalgia wears off).
Try it
It's live at ai7.1978.io. You'll need an API key from Anthropic or OpenRouter (the built-in help walks you through getting one), or a model running locally.
It's still one of my favorite things I've built. Not because it's clever, but because it was the project where AI stopped being magic and started being an API I understood.