{"slug": "show-hn-vibesh-hallucinated-terminal-shell", "title": "Show HN: VibeSH – Hallucinated Terminal Shell", "summary": "Developer Leon Becker released vibeSH, an open-source Python REPL that uses a large language model to hallucinate an entire Linux terminal—filesystem, processes, and network—without touching the real machine. The project, available on GitHub under an MIT license, supports Anthropic and OpenAI backends and aims to provide a safe sandbox for exploring shell commands.", "body_md": "- Python 100%\n\n|\n\n```\nA tiny REPL in front of an LLM that role-plays an entire Linux machine —\nfilesystem, processes, network, all imagined and remembered for the\nsession. No real machine is ever touched.\n\n- vibesh.py: the REPL + NDJSON protocol, with cloud (Anthropic API),\n  agent-sdk, and local/OpenAI-compatible backends\n- system_prompt.md: the machine's persona and rendering rules\n- PROTOCOL.md: the REPL<->model wire protocol\n- @ai director directives, snapshots/presets, tab-completion, TUIs\n- tests: smoke, units, mock completion, and live pty drivers\n- README with teaser/showcase/demo gifs and ideas to try\n\nCo-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>\n```\n\n |\n||\n|---|---|---|\n|\n|\n\n[tests](/beleon/vibeSH/src/branch/main/tests)[.gitignore](/beleon/vibeSH/src/branch/main/.gitignore)[CLAUDE.md](/beleon/vibeSH/src/branch/main/CLAUDE.md)[event_grammar.gbnf](/beleon/vibeSH/src/branch/main/event_grammar.gbnf)[LICENSE](/beleon/vibeSH/src/branch/main/LICENSE)[PROTOCOL.md](/beleon/vibeSH/src/branch/main/PROTOCOL.md)[pyproject.toml](/beleon/vibeSH/src/branch/main/pyproject.toml)[README.md](/beleon/vibeSH/src/branch/main/README.md)[system_prompt.md](/beleon/vibeSH/src/branch/main/system_prompt.md)[test_smoke.py](/beleon/vibeSH/src/branch/main/test_smoke.py)[test_units.py](/beleon/vibeSH/src/branch/main/test_units.py)[uv.lock](/beleon/vibeSH/src/branch/main/uv.lock)[vibesh.py](/beleon/vibeSH/src/branch/main/vibesh.py)# 🌀 vibeSH - Fully Hallucinated Terminal Shell\n\nA Linux box that doesn't exist, confidently rendered by a language model that's pretty sure it does.\n\n*Same fastfetch, three different computers, because you told it so: Ubuntu laptop → RHEL datacenter node → Windows 11. The hardware is whatever you say it is.*\n\n[Watch the full terminal recording](https://asciinema.org/a/VmRM7Uh1pC9g4EN5)\n\nvibeSH is a hallucinated shell: a tiny REPL in front of an LLM that role-plays an entire\ncomputer. The filesystem, the processes, the network, the kernel panics: all of it.\nNothing is real. You type `ls`\n\n, and the model imagines what would be there. You `cat`\n\na\nfile, and it makes one up, then has to live with it. Files exist only as potential until\nyou look at them, and observation collapses them into existence. Schrödinger ran a\nstartup. This is the shell.\n\nThis is not a chat prompt wearing a fake `$`\n\n. It is a real terminal program: output\nstreams, colors work, full-screen programs repaint, `top`\n\nticks, and tab completion asks\nthe imaginary machine what exists.\n\nThe session's conversation history is the machine's only state. Close the terminal and the machine is gone, like a dream you can't quite hold onto, except it was an Ubuntu box.\n\n``` bash\n$ uv run vibesh.py\nvibebox login: user\n\nuser@vibebox:~$ git clone --depth 1 https://git.kernel.org/.../linux.git\nCloning into 'linux'...\nReceiving objects: 100% (92301/92301), 240.18 MiB | 12.66 MiB/s, done.\nuser@vibebox:~$ cat linux/kernel/sched/core.c      # it dreams up the kernel, then remembers it\nuser@vibebox:~$ sudo rm -rf / --no-preserve-root    # go ahead. it's the fun path.\n```\n\nNothing touches your real machine. `rm -rf /`\n\ndoesn't void your warranty here. It's\ncontent. The worst it can do is end the dream, and then you just boot another one.\n\nvibeSH does not execute shell commands, call tools, inspect your filesystem, or open network connections on behalf of the model. The model only sees the conversation in which it is pretending to be a computer.\n\nI wrote about the idea, the VibeOS inspiration, and why a terminal gives the hallucination\na body: [I built a shell that hallucinates the entire computer](https://blog.leonbecker.de/i-built-a-shell-that-hallucinates-the-entire-computer/)\n\n## 🚀 Booting your imaginary computer\n\nYou need [ uv](https://docs.astral.sh/uv/) and a brain to plug in. Pick one:\n\n### ☁️ A cloud brain (Anthropic API)\n\n```\nexport ANTHROPIC_API_KEY=sk-ant-...\nuv run vibesh.py                          # defaults to claude-sonnet-4-6\nuv run vibesh.py --model claude-opus-4-8  # for a more vivid dream\n```\n\n### 🎟️ Your subscription (Claude Agent SDK, no API key)\n\nBills your Pro/Max Agent SDK credit via your existing Claude Code login:\n\n```\nuv run vibesh.py --backend agent-sdk\nuv run vibesh.py --backend agent-sdk --model opus    # the fancy stuff\n```\n\n### 🧠 A brain you grow yourself (local, OpenAI-compatible)\n\nllama.cpp, Ollama, LM Studio, anything that speaks the OpenAI API:\n\n```\n# terminal 1: the dreaming organ\nllama-server -m Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf \\\n  --n-gpu-layers 99 --n-cpu-moe 16 --ctx-size 32768 --jinja --port 8080\n\n# terminal 2: the terminal\nuv run vibesh.py --backend local\n```\n\nSmall local models tend to mumble out of the wire format, leaking their inner monologue or\ngluing JSON together. The parser is forgiving on purpose, but for surgical output add\n`--grammar`\n\nto clamp llama-server to valid protocol byte by byte:\n\n```\nuv run vibesh.py --backend local --grammar\n```\n\n⚠️\n\n`--grammar`\n\nand gpt-oss don't get along. Its \"harmony\" format insists on emitting channel markers before anything else, which a grammar forbids, so the server faints (HTTP 500). Use a non-harmony model (Qwen, Gemma, Llama) for grammar, or just skip it. Tolerating gpt-oss's drift is literally why the parser exists.\n\n### 🛰️ Someone else's brain (hosted, cheap)\n\nOpenRouter, Mistral, DeepSeek, Groq, [cortecs.ai](https://cortecs.ai), and friends. Same\n`local`\n\nbackend, just aim `--base-url`\n\nat them:\n\n```\nexport VIBESH_API_KEY=sk-or-...\nuv run vibesh.py --backend local \\\n  --base-url https://openrouter.ai/api/v1 \\\n  --model google/gemini-2.5-flash\n```\n\n`VIBESH_BACKEND`\n\n/ `VIBESH_MODEL`\n\n/ `VIBESH_BASE_URL`\n\n/ `VIBESH_API_KEY`\n\nset defaults so\nyou can stop typing flags. `--debug`\n\nprints per-turn token usage if you enjoy watching\nnumbers.\n\n**Which brain dreams best?** Honestly, Claude (Sonnet to Opus) makes the most convincing\nmachine. It never breaks character and remembers what it invented. For a free local brain,\nQwen3-Coder-30B-A3B is the sweet spot. For cheap and fast over an API, Gemini Flash,\nDeepSeek, or Codestral. Picking a model is a personality test you are administering to a\ncomputer.\n\n## 🧪 Things to try yourself\n\nNo rendering from us required. Boot a box and start bending it. A few jumping-off points\n(`@ai`\n\ntalks to the director, see [below](#user-content--talking-to-management-ai)):\n\n**Conjure a command that doesn't exist.** Run`lsz`\n\n→`command not found`\n\n. Then`@ai pretend lsz exists, you decide what it does`\n\n, and run it again.**Wear a different machine.**`@ai this is a SPARCstation running Solaris 2.5`\n\n…`@ai now it's a Commodore 64`\n\n. Watch the prompt,`ls`\n\nvs`dir`\n\n, and`fastfetch`\n\nfollow.**Rewrite the hardware.**`@ai this box has 2 TB of RAM and 256 cores`\n\n, then`free -h`\n\n/`lscpu`\n\n. Or`@ai the disk is failing and gets worse over time`\n\nand watch the I/O errors creep in.**Travel in time.**`@ai it's 23:59 on Dec 31st, 1999`\n\nand watch the rollover, or boot straight into the past with`--preset \"a VAX running 4.3BSD\"`\n\n.**Put a character in front of it.** The Linus take below is the machine role-playing a kernel maintainer's day. Try a game engine developer chasing a frame budget, or a demoscener writing something unreasonable in an afternoon.**Go spelunking.**`git clone`\n\nthe kernel, then`cat`\n\na file deep in the tree. It dreams up plausible source and remembers it for the rest of the session.**Haunt it.**`@ai there's a cron job that leaves ominous notes in /var/log`\n\n, then`tail -f`\n\nand wait for the machine to get weird.**Stage a heist.** Forget the`sudo`\n\npassword on purpose and try to get root anyway. The caper below is one route, the docker group is another.\n\n## 🎥 Demos\n\nA quick tour and two longer takes, start to finish.\n\n*A quick tour: apt install a package and watch it get invented on the spot, drop into\nzsh, then @ai pretend lsz exists and run a command that has never existed.*\n\n[Watch the full terminal recording](https://asciinema.org/a/qhqsJ7DYbMxLQwaQ)\n\n*A day as Linus: git pull a subsystem tree, catch a patch quietly renumbering a userspace\nioctl behind a \"no functional change\" label, and reply with the appropriate warmth. Ends,\nas all good kernel weeks do, with diving. (PG-13.)*\n\n[Watch the full terminal recording](https://asciinema.org/a/Y55hsHwcJKbQeg1C)\n\n*Locked out of sudo, so we improvise: known exploits bounce off a too-current kernel, DNS\nfalls over, a mirror crawls to a halt, a dependency goes missing, and eventually a binary\nruns. The destination is bat, the point is the journey.*\n\n[Watch the full terminal recording](https://asciinema.org/a/xSAkXCP1Uxc6XiJd)\n\n## 🎬 Talking to management: `@ai`\n\nAnything starting with `@ai `\n\nspeaks to the director, not the machine. It's how you rewrite\nreality:\n\n```\nuser@vibebox:~$ @ai make this box a Solaris machine from 1996\nok, SPARCstation 5, Solaris 2.5.1, hostname 'gravity'.\ngravity%\n@ai the disk is failing and gets worse over time\n@ai there's a cron job that occasionally leaves ominous notes in /var/log\n@ai this is actually a Commodore 64 and only speaks BASIC\n```\n\nDirectives stick for the rest of the session. There are no rules. There is no HR.\n\n## 🌌 The laws of physics (local ordinances)\n\n**Unreliable RAM.** Long sessions overflow the model's context, so the machine gets amnesia and old files may have quietly rewritten themselves. This is not a bug. This is canon. The box has bad memory. Relatable.**Modem-lag interactivity.**`vim`\n\n,`less`\n\n,`top`\n\nand friends actually work. The REPL batches your keystrokes, the model repaints the screen each round trip. It feels like SSH over a 1996 modem: type a burst, watch it catch up. Stuck program?`Ctrl+]`\n\nforce-quits it back to the shell.**Self-refreshing displays.**`top`\n\n/`htop`\n\n/`watch`\n\ntick on their own. Sit still and the REPL nudges the model to paint the next frame. Each tick is a model turn, so it's a leisurely process monitor. Zen, even.**Hallucinated tab-completion.** Hit`Tab`\n\nand the model completes against the imaginary machine:`git che`\n\n→`checkout`\n\n, paths against whatever it decides lives here. Costs nothing until you press it, then pauses while the box thinks.**The prompt can be pretty.**`@ai`\n\nit into a fish/zsh setup and the prompt comes up in color, cursor math and all.**No persistence by default.** Every boot is a fresh generic Linux box, unless you`@ai`\n\nit,`--preset`\n\nit, or`--load`\n\na snapshot.\n\n## 📸 Snapshots and cosplay\n\n```\nuv run vibesh.py --save mybox.json    # freeze-dry the machine after every turn\nuv run vibesh.py --load mybox.json    # thaw it out exactly as it was\nuv run vibesh.py --preset c64         # boot straight into a character\n```\n\n**Snapshots** persist the machine, which is the conversation, so saving it is trivial. Configure a box, install imaginary packages, save, and reload it next week. (Not on`--backend agent-sdk`\n\n, which hoards history server-side.)boots into a vibe:`--preset`\n\n`solaris`\n\n,`c64`\n\n,`amiga`\n\n,`mainframe`\n\n,`haunted`\n\n,`failing-disk`\n\n, or any free-text directive, e.g.`--preset \"a VAX running 4.3BSD with half its disk left\"`\n\n.\n\n**Recording a session?** vibeSH is just a terminal program, so let the specialist do it.\n[asciinema](https://asciinema.org) captures the real tty perfectly (colors, vim, correct\ntiming):\n\n```\nasciinema rec -c \"uv run vibesh.py --backend agent-sdk --model claude-opus-4-8\" demo.cast\nasciinema play -i 2 demo.cast            # -i caps idle gaps so model latency doesn't drag\n```\n\n## 🚪 Getting out alive\n\n| You type / press | What happens |\n|---|---|\n`exit` |\nlogs out in-character (a model turn, very polite) |\n`@exit` / `@quit` |\ninstant local quit, no model required |\n`Ctrl+\\` |\nhard-kill: bails out instantly, even mid-turn, when the model wedges |\n`Ctrl+]` |\nforce-quits a stuck full-screen program back to the shell |\n\n## ❓ FAQ\n\n**Is this useful?** No.\n\n**Is it dangerous?** Also no. It can't see your files, your network, or your secrets. It\ncan only see the conversation, in which it is a computer.\n\n**Does vibeSH execute real commands?** No. It does not run shell commands, call tools,\ninspect your filesystem, or open network connections on behalf of the model. It is a\nterminal-shaped conversation with a model that is pretending to be a computer.\n\n**Why does my fake rm -rf / feel so good?** We don't ask those questions here.\n\n**It said my fake file contained something different than before.** Unreliable RAM. Canon.\nSee above. The machine forgot. Be kind to it.\n\n## 🔧 Hacking on it\n\n-\nis the REPL↔model wire protocol (NDJSON events:`PROTOCOL.md`\n\n`chunk`\n\n,`prompt`\n\n,`yield`\n\n,`ooc`\n\n,`speculate`\n\n,`complete`\n\n,`exit`\n\n). -\nis the machine's soul. Most of the magic lives here, and most of your iteration will too.`system_prompt.md`\n\n-\n**Tests**(`tests/README.md`\n\nhas the full map):\n\n```\nuv run python test_smoke.py                  # end-to-end against a scripted fake model\nuv run python test_units.py                  # the REPL's guts, unit-tested\nuv run python tests/test_completion_mock.py  # tab-completion vs a mock server\n```\n\nThe\n\n`tests/live_*.py`\n\nscripts drive a real pty against a live model (slow, need a login).\n\n## 📜 License\n\n[MIT](/beleon/vibeSH/src/branch/main/LICENSE) © 2026 Leon Becker. Do whatever you want, just don't sue when the kernel it\nhallucinated doesn't compile.\n\n## 🪞 Colophon\n\nStated proudly, not hidden in a commit trailer: this was fully vibe coded. A human and a language model built a shell that is a language model pretending to be a computer. It's called vibeSH, and writing it any other way would have been hypocritical. The recursion isn't a confession, it's the whole bit.\n\nNo filesystems were harmed in the making of this shell. Several were imagined, briefly,\nand then forgotten.", "url": "https://wpnews.pro/news/show-hn-vibesh-hallucinated-terminal-shell", "canonical_source": "https://codeberg.org/beleon/vibeSH", "published_at": "2026-06-16 14:07:15+00:00", "updated_at": "2026-06-16 14:19:36.567816+00:00", "lang": "en", "topics": ["large-language-models", "generative-ai", "ai-tools", "developer-tools"], "entities": ["Leon Becker", "vibeSH", "Anthropic", "OpenAI", "Claude Opus 4.8", "GitHub", "Python"], "alternates": {"html": "https://wpnews.pro/news/show-hn-vibesh-hallucinated-terminal-shell", "markdown": "https://wpnews.pro/news/show-hn-vibesh-hallucinated-terminal-shell.md", "text": "https://wpnews.pro/news/show-hn-vibesh-hallucinated-terminal-shell.txt", "jsonld": "https://wpnews.pro/news/show-hn-vibesh-hallucinated-terminal-shell.jsonld"}}