# Terminactory: 터미널 게임 속 코딩 에이전트 알림
# Terminactory: agent messages in a terminal game

- Site: https://select1.dev/2026-11-15 (English), https://select1.dev/ko/2026-11-15 (Korean)
- Entry: 036
- Published: 2026-11-15 (KST). Launch date: 2026-11-14
- Pick: Terminactory <https://gitlab.com/snipedbywifi/terminactory> (source: Show HN)
- Verified: ran
- What: Terminactory 는 터미널에서 실행하는 공장 자동화 게임 프로덕트다. 코딩 에이전트가 작업을 끝내면 에이전트가 마지막으로 쓴 응답을 게임 화면에 보여 준다.
- What (en): Terminactory is a product that runs a factory game in the terminal. When a coding agent finishes its work, the game shows the agent’s last reply.
- Why: 오늘의 픽으로 선정한 이유는 게임을 하면서도 에이전트가 작업을 끝냈는지 알 수 있기 때문이다.
- Why (en): It is today’s pick because you can tell that an agent has finished while you play.
- Verdict: 작동한다. 훅 명령으로 보낸 메시지가 표시됐고, 게임을 닫은 동안에도 공장이 돈을 벌었다.
- Verdict (en): It works. Messages sent with the hook command showed up in the game, and the factory kept earning while the game was closed.
- Tags: game, terminal, rust, coding-agents, claude-code

## Checked against the README

- [pass] 메시지를 보내는 명령은 성공하면 아무것도 출력하지 않는다(nothing prints on success) — README 의 훅 시험 명령과 tfac msg 를 실행하자 표준 출력과 표준 오류가 모두 0바이트였고 종료 코드는 0이었다
- [pass] 게임이 닫혀 있는 동안 보낸 메시지는 게임을 열 때까지 보관된다(Messages wait while the game is closed) — 게임을 모두 닫고 tfac msg 로 메시지를 보냈다. 첫 번째 저장 파일을 tfac 1 명령으로 다시 열자, 그 메시지가 사이드바에 표시됐다
- [pass] 게임을 닫아 둔 동안에도 공장이 수익을 낸다(the factory keeps earning while you are away) — 새 게임에는 돈을 버는 공장이 없어, 데모 공장의 저장 파일을 일반 저장 파일로 복사했다. 게임을 2분 동안 닫았다가 다시 열자 $35 와 연구 점수 96.1 을 벌었다는 창이 표시됐다

## Measured

- 데모 공장을 60초 동안 실행하는 데 쓴 CPU 시간: 1.07초, 메모리 6.0 MB (120×40 터미널에서 tfac --demo 를 실행하고, /proc 에서 프로세스의 CPU 시간을 60초 간격으로 두 번 읽었다. 메모리는 60초 뒤에 읽은 값으로, 프로세스가 실제로 차지한 메모리(VmRSS)다)

## Progress (days after launch; full history https://select1.dev/2026-11-15/progress)

- day 3 (checked 2026-11-17) [up] site 200
- day 7 (checked 2026-11-21) [up] site 200
- day 15 (checked 2026-11-29) [up] site 200

## 한국어

## 무엇이 문제인가

코딩 에이전트에게 오래 걸리는 작업을 맡기고 다른 일을 하면, 에이전트가 작업을 끝냈는지 입력을 기다리는지 알기 어렵다. Claude Code 의 공식 문서에는 훅으로 데스크톱 알림을 받는 방법이 안내돼 있다. 사용자가 설정 파일에 Notification 훅을 추가하면, Claude 가 입력이나 권한 승인을 기다릴 때 운영체제의 알림이 표시된다. 문서의 예시대로 설정하면 알림에는 언제나 "Claude Code needs your attention" 이라는 문구가 표시된다. 이 알림으로는 에이전트가 쓴 응답의 내용을 알 수 없다. 응답을 읽으려면 사용자가 에이전트의 터미널로 돌아가야 한다.

## 어떻게 해결했나

Terminactory 는 2026년 11월 14일 Hacker News 에 Show HN 글로 올라왔다. 제작자 snipedbywifi 는 에이전트의 작업이 끝나기를 기다리는 동안 할 게임으로 만들었다고 밝혔다.

게임에서 사용자는 드릴로 구리, 석탄, 철을 캐고, 용광로와 프레스로 가공해 판매한다. 번 돈과 연구 점수로 새 기계를 사용할 수 있게 된다. 에이전트는 셸 명령으로 게임에 메시지를 보낸다. Claude Code 에서는 사용자가 Stop 훅과 Notification 훅에 `tfac hook` 명령을 등록한다. 그러면 에이전트가 작업을 끝낼 때, 에이전트가 마지막으로 쓴 응답이 게임 화면에 표시된다. 에이전트가 입력을 기다릴 때도 알림이 표시된다. Claude Code 가 아닌 에이전트는 `tfac msg` 명령을 실행해 메시지를 직접 보낸다.

## 무엇이 다른가

첫째, 알림의 내용이 다르다. Claude Code 문서의 예시대로 설정한 데스크톱 알림은 고정된 문구를 보여 준다. Terminactory 는 에이전트의 마지막 응답을 마크다운 서식대로 보여 준다. Claude Code 는 훅을 실행할 때 표준 입력으로 JSON 을 넘긴다. `tfac hook` 은 이 JSON 에서 마지막 응답을 읽어 `~/.terminactory/inbox` 폴더에 마크다운 파일로 저장한다. 게임은 이 폴더를 약 1초마다 확인해 새 파일을 메시지로 표시한다.

둘째, 알림이 표시되는 조건이 다르다. 데스크톱 알림은 운영체제가 표시하므로, 사용자가 다른 프로그램을 사용하고 있어도 표시된다. Terminactory 의 메시지는 게임이 열려 있을 때만 표시된다. 게임을 닫은 동안 온 메시지는 폴더에 남아 있다가 게임을 열면 표시된다.

## 어떻게 만들었나

- 저장소에는 2026년 11월 10일부터 14일까지의 커밋 212개가 있다. 그중 206개에 Claude 와 함께 작성했다는 Co-authored-by 트레일러가 있다. 제작자도 Show HN 글에서 AI 의 도움을 많이 받았다고 밝혔다.
- 코드는 Rust 19,876줄이다. 화면은 ratatui 라이브러리로 만들었다.
- README 에 따르면 시뮬레이션은 난수를 사용하지 않고 화면 코드와 분리돼 있어, 대부분의 변경을 화면 없이 테스트할 수 있다.

## 실행해 보니

Linux 에서 저장소를 클론해 Rust 1.88.0 으로 빌드하고, 120×40 크기의 터미널에서 게임을 실행했다. 에이전트 대신 README 의 시험 명령으로 메시지를 보냈다. 이 명령은 Claude Code 가 훅에 넘기는 형식의 JSON 을 `tfac hook` 에 직접 넣는다.

1. 설치. `cargo install --path .` 는 40초 걸렸다. 실행 파일 tfac 은 5.9 MB 였다. `cargo test` 에서는 테스트 644개 가운데 638개가 통과했고 6개는 건너뛰었다.
2. 데모. `tfac --demo` 를 실행하자 드릴, 용광로, 판매소가 연결된 작은 공장이 표시됐다. 데모가 열린 상태에서 README 의 훅 시험 명령과 `tfac msg` 를 실행했다. 훅 시험 명령과 `tfac msg` 는 아무것도 출력하지 않고 종료 코드 0 으로 끝났다. 그런데 게임에는 메시지가 표시되지 않았다. 코드를 확인하니 데모는 메시지 폴더를 읽지 않는다. README 에는 이 설명이 없다.
3. 메시지. 데모를 닫고 `tfac` 으로 새 게임을 시작하자, 데모가 열린 동안 보낸 메시지 2개가 사이드바에 차례로 표시됐다. 제목, 목록, 체크박스가 마크다운 서식대로 표시됐다. Notification 이벤트의 JSON 을 보내자, 메시지 제목에 JSON 의 작업 폴더 이름과 needs you 가 표시됐다. 메시지와 함께 게임 속 회사가 선물로 $25 를 보냈다. 코드에 따르면 이 선물은 3분에 한 번만 온다. 게임을 모두 닫고 보낸 메시지도 다음에 게임을 열자 표시됐다.
4. 좁은 창. 창을 60×20 으로 줄이자 사이드바가 사라지고, 화면에는 지도와 한 줄짜리 상태 표시만 보였다. 새 메시지가 오자 화면 오른쪽 아래에 new telegram 이라는 안내가 표시됐다. n 키를 누르자 메시지를 보여 주는 창이 열렸다.
5. 자원. 데모 공장은 60초 동안 CPU 시간 1.07초를 썼다. 코어 하나의 1.8% 다. 메모리는 6.0 MB 를 썼다.
6. 닫아 둔 동안. 새 게임에는 돈을 버는 공장이 없어, 데모 공장의 저장 파일을 일반 저장 파일로 복사했다. 게임을 2분 동안 닫았다가 다시 열자, 그동안 $35 와 연구 점수 96.1 을 벌었다는 창이 표시됐다. 이어서 열려 있는 저장 파일을 다른 터미널에서 다시 열어 봤다. 게임은 시작되지 않고 아래 안내가 출력됐다.

```text title="터미널, 열려 있는 저장 파일을 다시 열 때"
$ tfac
save1 is already open in another window (process 3207). Switch to that window, or open another save: tfac --saves
```

## 확인하지 못한 것

- 실제 Claude Code 의 훅. Claude Code 설정 파일에 훅을 등록하고, 에이전트가 작업을 끝낼 때 메시지가 오는지 확인하자.
- 연구 트리의 뒷부분. 컴퓨터와 석유 단계의 기계는 앞 단계의 기계를 연구해야 사용할 수 있다.
- macOS. README 에 따르면 macOS 와 Linux 를 지원한다. 오늘은 Linux 에서만 실행했다.

## 판정

작동한다. 훅 명령으로 보낸 메시지가 표시됐고, 게임을 닫은 동안에도 공장이 돈을 벌었다. 다만 데모에서는 메시지가 표시되지 않는데, README 에는 이 설명이 없다. 코딩 에이전트를 터미널에서 실행하는 경우에 써 볼 만하다.

## 얻어갈 것

- 체험용 모드에서 작동하지 않는 기능은 화면에 안내하자. 오늘 데모가 열린 동안 보낸 메시지는 새 게임을 열 때까지 표시되지 않았다.
- 에이전트가 결과를 읽을 필요가 없는 명령은 성공하면 아무것도 출력하지 않게 하자. 명령의 출력은 에이전트의 컨텍스트에 들어가 토큰을 차지한다. 오늘 `tfac msg` 와 `tfac hook` 의 출력은 0바이트였다.

## English

## The problem

When you give a coding agent a long task and do something else, it is hard to know whether the agent has finished or is waiting for input. The official Claude Code docs show how to get a desktop notification with a hook. You add a Notification hook to the settings file. The operating system then shows a notification when Claude waits for input or permission. If you follow the docs’ example, the notification always says "Claude Code needs your attention". It does not tell you what the agent replied. To read the reply, you have to go back to the agent’s terminal.

## How it solves it

Terminactory was posted to Hacker News as a Show HN on November 14, 2026. The maker, snipedbywifi, says it is a game to play while you wait for an agent’s task to finish.

In the game, you mine copper, coal and iron with drills. You process them with furnaces and presses and sell the products. Money and research points unlock new machines. Agents send messages to the game with a shell command. In Claude Code, you register the command `tfac hook` for the Stop and Notification hooks. When the agent finishes, its last reply shows up on the game screen. When the agent waits for input, the game shows a notice. An agent other than Claude Code sends a message itself by running `tfac msg`.

## What is different

The first difference is what the notification contains. A desktop notification set up from the Claude Code docs’ example shows a fixed sentence. Terminactory shows the agent’s last reply with its Markdown formatting. Claude Code passes JSON to a hook on standard input. `tfac hook` reads the last reply from that JSON and saves it as a Markdown file in `~/.terminactory/inbox`. The game checks this folder about once a second and shows each new file as a message.

The second difference is when a notification appears. The operating system shows a desktop notification, so it appears even while you use another program. A Terminactory message appears only while the game is open. A message that arrives while the game is closed stays in the folder and appears when you open the game.

## How it was built

- The repository has 212 commits from November 10 to November 14, 2026. 206 of them have a Co-authored-by line for Claude. In the Show HN post, the maker also says the game was built with heavy AI assistance.
- The code is 19,876 lines of Rust. The screen is built with the ratatui library.
- According to the README, the simulation uses no randomness and is separate from the drawing code. The README says this lets most changes be tested without a screen.

## Running it

I cloned the repository on Linux and built it with Rust 1.88.0. I ran the game in a 120×40 terminal. I sent messages with the README’s test commands instead of a real agent. The hook test command pipes JSON into `tfac hook`. The JSON has the format that Claude Code passes to a hook.

1. Install. `cargo install --path .` took 40 seconds, and the `tfac` binary was 5.9 MB. `cargo test` ran 644 tests. 638 passed and 6 were ignored.
2. Demo. `tfac --demo` showed a small factory with drills, a furnace and a trade post. With the demo open, I ran the README’s hook test command and `tfac msg`. Both printed nothing and exited with code 0. But no message appeared in the game. The code shows that the demo does not read the message folder. The README does not say this.
3. Messages. I closed the demo and started a new game with `tfac`. The 2 messages sent while the demo was open appeared in the sidebar one after the other. The heading, list and checkbox in the `tfac msg` message were shown with their Markdown formatting. When I sent the JSON of a Notification event, the message header showed the working folder name from the JSON and "needs you". When a message arrived, an in-game company also sent $25 as a gift. According to the code, this gift comes only once every 3 minutes. A message sent while no game was open also appeared the next time I opened the game.
4. Narrow window. At 60×20, the sidebar disappeared. Only the map and a one-line status bar were left. When a new message arrived, a "new telegram" note appeared at the bottom right. When I pressed n, a window opened with the message.
5. Resources. The demo factory used 1.07 seconds of CPU time in 60 seconds. That is 1.8% of one core. It used 6.0 MB of memory.
6. While closed. A new game has no factory that earns money, so I copied the demo factory’s save file to a normal save. I closed the game for 2 minutes. When I opened it again, a window said the factory had earned $35 and 96.1 research points. Then I tried to open a save that was already open in another terminal. The game did not start and printed the notice below.

```text title="Terminal, opening a save that is already open"
$ tfac
save1 is already open in another window (process 3207). Switch to that window, or open another save: tfac --saves
```

## Not checked

- A real Claude Code hook. The next step is to register the hook in the Claude Code settings file and check that a message arrives when the agent finishes.
- The later part of the research tree. The machines for computers and oil unlock only after you research the earlier ones.
- macOS. According to the README, macOS and Linux are supported. Today’s run was on Linux only.

## Verdict

It works. Messages sent with the hook command showed up in the game, and the factory kept earning while the game was closed. But the demo does not show messages, and the README does not say so. It is worth trying if you run coding agents in a terminal.

## What to take away

- If a feature does not work in a demo mode, say so on the screen. Today the messages I sent while the demo was open did not appear until I started a new game.
- If an agent does not need to read a command’s output, the command should print nothing on success. A command’s output goes into the agent’s context and takes up tokens. Today `tfac msg` and `tfac hook` printed 0 bytes.

## Launches the same day

- Isometric SF <https://isometricsf.com/> (Show HN, 246): 픽셀 아트 지도. 샌프란시스코 베이 지역의 3D 지도 타일을 이미지 모델로 변환했다.
- grounds.top <https://grounds.top/> (Show HN, 206): 항공편 지도. 미국 연방항공청이 전국의 이륙을 중단한 밤의 비행기 위치를 보여 준다.
- Terminactory <https://gitlab.com/snipedbywifi/terminactory> (Show HN, 110): 터미널 공장 자동화 게임. 코딩 에이전트의 메시지를 게임 화면에 보여 준다.
- Agweb <https://github.com/paul-nameless/agweb> (Show HN, 67): 에이전트용 브라우저. 창이 포커스를 가져가지 않고 모든 에이전트의 탭을 보여 준다.
- Fursoy <https://github.com/FURSOY/fursoy-cpu> (Show HN, 54): RISC-V 프로세서 설계. SystemVerilog 로 작성한 비순차 실행 코어가 Linux 를 부팅한다.
- HiringNow <https://www.producthunt.com/products/hiringnow> (Product Hunt, 205): 구직 에이전트. 채용 공고를 찾아 사용자 대신 지원한다.
- Dex Semantics <https://www.producthunt.com/products/dex-by-exmergo> (Product Hunt, 152): 데이터 분석 도구. 에이전트가 분석을 만들 때 오류가 줄어든다고 한다.
- Businesses in ChatGPT <https://www.producthunt.com/products/openai> (Product Hunt, 145): ChatGPT 의 사업자 기능. 고객이 ChatGPT 에서 사업체를 찾게 한다.

## Getting started

- Steps: git clone https://gitlab.com/snipedbywifi/terminactory && cd terminactory && cargo install --path . ; tfac
- Needs: Rust 1.88 이상과 UTF-8 터미널. macOS 와 Linux 를 지원하고, Windows 에서는 WSL 을 사용한다.
- Cost: Apache-2.0, 무료.
- Note: 데모(tfac --demo)에서는 에이전트의 메시지가 표시되지 않는다. 메시지는 tfac 으로 연 게임에 표시된다.
