Show HN:终端 ASCII 单元格水族馆
Show HN: An ASCII cell aquarium for your terminal

原始链接: https://github.com/kborer/cells/

terminal-cells 是一个 Python 3.10+ 的 curses 终端动画,模拟活的显微镜载玻片,包含免疫细胞、微生物、真菌、噬菌体,以及吞噬、有丝分裂、出芽和病毒复制等行为。它运行于 Linux/macOS(Windows 可用 WSL),无需第三方运行时依赖,可通过 pipx、Ubuntu PPA、Homebrew 安装,或从源码运行。终端至少 80×24;120×40 或更大更佳。控制包括 q 退出、空格暂停、+/- 调速、r 新载玻片、? 帮助;鼠标/键盘工具可检查、裂解、喂食或搅拌。选项包括微生物/血液场景、calm/light 主题、ASCII 模式和屏保。定期到达保持种群多样性。欢迎贡献和生物学参考资料。采用 0BSD 许可证。

一位开发者分享了“terminal-cells”,一个终端中的ASCII细胞水族馆,其中细胞分裂、免疫细胞追击细菌、噬菌体制造麻烦,可通过pipx安装。评论者称赞了有丝分裂动画并提出了改进建议。主要批评是视觉杂乱;作者通过清理细胞膜、调暗细胞内部和增加间距作出回应。进一步建议包括半块渲染、盲文图案、圆角ASCII以及景深/对比度——其中部分被记录为GitHub issue。README中损坏的cbonsai链接已修复。一位用户建议加入细胞凋亡(细胞收缩、碎裂和免疫细胞清除)作为分裂的对比;作者为此创建了issue。其他人分享了渲染技术,并指向r/alife社区作为灵感来源。帖子中还包含一个幽默的Shrek ASCII请求。总体而言,该项目获得了热情反馈,并得到更清晰视觉效果和新生物动画的具体想法。
相关文章

原文

A living microscope slide in your terminal. Immune cells chase bacteria, cells divide, and bacteriophages occasionally cause trouble.

Animated terminal microscope slide with immune cells, microbes, and red blood cells

Inspired by cbonsai and asciiquarium. This is a biological illustration with exaggerated sizes and timing.

Python 3.10+ on Linux or macOS, with curses; Windows users can use WSL. No third-party runtime dependencies. Install with pipx:

pipx install terminal-cells
cells

If pipx or cells is not found, see Installation and PATH.

On Ubuntu 24.04 or 26.04:

sudo add-apt-repository ppa:bogobogosort/cells
sudo apt update
sudo apt install terminal-cells
cells

With Homebrew on macOS or Linux:

brew install kborer/cells/terminal-cells
cells

The package is terminal-cells; the command is cells. From a source checkout, run ./cells. See Ubuntu packages for .deb downloads and builds, or terminal troubleshooting if colors, glyphs, or curses fail.

Use a terminal at least 80×24; 120×40 or larger gives organisms more room. Press q to quit, Space to pause, + / - to change speed, r for a new slide, and ? for help and the species legend.

cells --scene microbial --observe  # Microbes, with lifecycle captions
cells --scene blood               # A blood-inspired community
cells --calm --theme light        # Slower movement on a light background
cells --ascii                    # Plain ASCII glyphs
cells --screensaver              # Exit on any key

Macrophages, neutrophils, red blood cells, nine microbial forms, fungi, and phages share the slide. Watch engulfment, mitosis, budding, viral replication, and rare visitors. Periodic arrivals keep populations varied during long runs.

Choose 1 Inspect, 2 Lyse, 3 Feed, or 4 Stir, then click to apply. Keyboard targeting also works: arrows or hjkl to aim, Tab to select, Enter to apply. Tools act while the slide keeps moving.

The GIF uses rendered simulation frames. The 12-second terminal recording captures the curses app; replay it with asciinema play docs/demo.cast after cloning.

Biology suggestions, microscope references, screenshots, and terminal testing are welcome; programming experience is not required. For code or documentation changes, start with the first-change guide and starter issues.

Zero-Clause BSD (0BSD): use, modify, and redistribute for any purpose, without an attribution requirement.

联系我们 contact @ memedata.com