Quick Answer: A terminal factory game is a factory-building game that runs inside your shell instead of a graphical window. Terminactory is a Rust game built with the ratatui library. It was made to run beside long AI agent tasks, so you can build production lines and review agent output without opening a browser or doomscrolling.

If you've ever kicked off an agent task and then stared at the progress indicator for ten minutes, you already know the problem. The work is happening somewhere else, your hands are free, and your attention drifts toward whatever app is closest. Terminactory, posted to Hacker News by its developer snipedbywifi, tries to fill that gap with a factory game that lives entirely in your terminal. It's a niche idea, and the developer says so openly, but the design choices behind it are worth a closer look.

Why a Terminal Factory Game Fits the Agent Wait

Most factory games assume you'll sit with them for hours. That works when you're the only thing on your screen. It works less well when your real job is supervising a process that takes four minutes, or twenty.

A terminal game has three practical advantages here. It stays in the same window as your agent, so you don't context-switch. It uses far less screen real estate than a graphical client. And it fits the rhythm of short, interruptible sessions: you check a belt, adjust a splitter, glance at your earnings, and return to the code.

Here's where it gets interesting. The common advice for background entertainment is "pick something idle." Idle games are easy to walk away from, but they often reward you for ignoring them. A factory game asks for a bit more attention, and that's exactly why it works while you wait. You're engaged enough to stop reaching for the feed, but not so absorbed that you forget the agent finished.

How Terminactory Is Built: Rust, ratatui, and Terminal Rendering

Terminactory is written in Rust and uses ratatui, a Rust library for building terminal user interfaces. Ratatui is a maintained fork of the older tui-rs project and uses an immediate-mode rendering model: your application redraws the frame on each tick rather than mutating a retained widget tree. For a game, that model is convenient because the entire world state is the source of truth and the screen is a function of it.

Choosing a rendering stack matters more than most people expect. Here's how the main options compare for a project like this:

OptionLanguageRole in a game like TerminactoryTrade-off
ratatuiRustLayout, widgets, frame drawingImmediate-mode redraw each tick; you manage state yourself
crosstermRustRaw input and terminal control, often used as ratatui's backendLower-level; you write more of the event loop
ncursesCLong-established terminal control libraryMature and portable, but a C API with manual memory and window handling

The table shows why the Rust-plus-ratatui combination is a reasonable default for a terminal game. You get a memory-safe language, a layout system for panels like the research graph and in-game browser, and a backend that handles raw input without forcing you into C.

That said, there's a real caveat. Terminal games are sensitive to redraw cost and terminal size. A factory with hundreds of entities can make a naive full-frame redraw feel sluggish on slow terminals or over SSH. If you're building something similar, measure frame time early instead of assuming it's fine.

Where the Agent Telegrams Fit In

The most distinctive feature isn't the factory. It's the integration with Claude Code, Anthropic's agentic coding tool. According to the original post, the developer added Claude Code hooks so the agent's responses appear in-game as "telegrams." You can review progress directly in the game without switching windows.

This is the part practitioners tend to skip over, so let's be precise about what it does. Hooks let an external process run when a defined event occurs in the agent's lifecycle. Routing those events into a game UI turns the agent's output into a stream you can scan between factory actions. The result is that you stop treating the agent as a black box and start treating it as a feed you can glance at.

Most people stop here and think it's a gimmick. It isn't, in one specific sense: it reduces the cost of checking in. When review costs nothing, you review more often, and catching a wrong turn after one step beats catching it after twenty.

The trade-off is noise. Agent responses can be long, and a game HUD has very little room. If you adopt this pattern, truncate aggressively and link to the full output rather than dumping it into a small panel.

What Factory Mechanics Carry Over from Factorio

Terminactory's core loop borrows heavily from the genre that defined the category. The post lists the basics you'd expect: building and deleting structures, measuring how much you're earning, and selection tools for working on groups of entities. It also includes a research graph that shows how many items, or how many research points (RP), you need to unlock each node.

Anyone who's played Factorio will recognize that research-point model. In Factorio, research costs are paid in packs that must be produced by your own factory, which makes research a production problem rather than a separate menu. A research graph that tells you exactly what each unlock costs turns that into a planning tool. You can see the bottleneck before you hit it.

Here's the counter-intuitive part. Many players assume a terminal version must simplify the genre to fit the medium. In practice, the text-grid constraint pushes designers toward clearer information density. A number or a symbol can carry more state than a sprite can, and a research graph in text is often easier to read than a tech tree in a graphical menu, because nothing is hidden behind hover states.

The honest caveat is that a text interface has a ceiling. Spatial reasoning about dense layouts is harder when every tile is a character. Players who want the visual satisfaction of a large belt network will feel the limit quickly.

The Lore Layer: A Fake Browser, a Wiki, and Hidden Text

The feature that sets Terminactory apart from a plain factory clone is its fiction. The post describes a fake in-game browser with a wiki, fake forums, and what the developer calls "a LOT more lore." There's also hidden lore, which the developer explicitly invites players to hunt for.

This is a smart use of the medium. A terminal already looks like a place where you read text, run commands, and browse documents. An in-game browser feels native there in a way it wouldn't in a graphical game that has to fake a desktop. The lore becomes something you find while exploring the interface, not a cutscene you skip.

Here's the practical implication for anyone building narrative into a tool-like app: the fiction works best when it lives in the same place as the functional UI. It rewards curiosity without interrupting the loop. If your lore requires a separate menu, most players won't open it.

Known Limitations and Trade-offs

Responsible readers should weigh a few caveats before trying this.

First, the developer says heavy AI assistance was used to build it, and the post includes a disclaimer. That's worth knowing when evaluating code quality, security, and maintenance expectations for a young project. Review the code yourself if you plan to run it in an environment where that matters.

Second, the project is hosted on GitLab, and the post links to it directly. Check the repository for installation steps, license terms, and issue tracking before you rely on it.

Third, this is a first public release from a developer posting to Hacker News for the first time. Expect rough edges. Feedback is the explicit ask, and the developer asked readers for suggestions and additional ideas, which is a reasonable way to shape the next version.

Frequently Asked Questions

What is a terminal factory game?

A terminal factory game is a factory-building game that runs in a text-based terminal instead of a graphical window. Players place structures, route resources, and measure output using characters and text panels. Terminactory is one example, built in Rust with ratatui and designed to be played alongside other terminal work.

How do I play a terminal factory game while my AI agent is running?

Run the game in a separate pane or tab next to your agent session so you can switch with a keypress. Keep sessions short, since each check-in lets you glance at progress and return. Terminactory's Claude Code hooks display agent responses as in-game telegrams, so you can review output without leaving the game.

Why is ratatui a good choice for a terminal game?

Ratatui gives you layout, widgets, and frame drawing for terminal interfaces in Rust. Its immediate-mode model fits games, where the screen is redrawn from your world state each tick. Measure redraw time on large factories, because full-frame redraws can feel slow on some terminals or over SSH.

Are terminal games worth playing compared to graphical factory games?

They're worth it when your attention is split and you want something you can pause and resume quickly. They're a weaker choice for dense spatial layouts, since text grids limit how much you can see at once. Choose based on whether you're playing for planning depth or for short, interruptible sessions.

Pick one small task today: open Terminactory in a split pane beside your next agent run, build one production chain, and note how many times you check the game instead of your feed. Pass this to someone who keeps doomscrolling during long builds, and ask them to try a terminal factory game for one session this week.