A terminal screensaver, simulation playground and keyboard fidget toy. It runs a Physarum polycephalum (slime mold) transport-network simulation. Tens of thousands of agents deposit and follow pheromone trails, and the resulting network is drawn straight into your terminal. It ships as a single static binary, runs on Linux, macOS, Windows, and over SSH.
cargo install tslimeBuilds from source; requires Rust 1.70 or later.
With Nix:
nix run github:tamirelazar/tslimeWith Docker:
docker run --rm -it ghcr.io/tamirelazar/tslimebrew install tamirelazar/tslime/tslimeThe Linux binary is statically linked and runs on any x86_64 distribution.
Install it to ~/.local/bin:
mkdir -p ~/.local/bin
curl -fsSL https://github.com/tamirelazar/tslime/releases/latest/download/tslime-linux-x86_64 -o ~/.local/bin/tslime
chmod +x ~/.local/bin/tslimeIf ~/.local/bin isn't on your PATH, add it:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile && export PATH="$HOME/.local/bin:$PATH"In PowerShell:
$dir = "$env:LOCALAPPDATA\Programs\tslime"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
Invoke-WebRequest "https://github.com/tamirelazar/tslime/releases/latest/download/tslime-windows-x86_64.exe" -OutFile "$dir\tslime.exe"
Unblock-File "$dir\tslime.exe"
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
if (-not $userPath) { $userPath = "" }
if ($userPath -notlike "*$dir*") {
$newPath = if ($userPath) { "$userPath;$dir" } else { $dir }
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
}Open a new terminal so the PATH change takes effect, then run tslime.
git clone https://github.com/tamirelazar/tslime.git
cd tslime
cargo build --release
./target/release/tslimeRun with no arguments for the interactive mode:
tslimeScreensaver mode exits on the first keypress:
tslime -SSome of the presets I use come pre-loaded and are bound to the 1-4 keys. You can bind any preset or saved-config to the number keys via a config file.
tslime --help lists every flag. tslime --explain walks through what each
simulation parameter does and how the parameters interact.
When you reach a configuration you like, press Ctrl+S to save it. You can load your configs with Ctrl+L or bind them to the numkeys as described in the next section.
Customize quick-keys 1–7 by creating a ~/.config/tslime/keybinds.toml file with the following format:
[[keybind]]
key = "4"
preset = "fire"
[[keybind]]
key = "5"
config = "my-night-config"- Keys: Bind to any digit
1–7. Keys1–4default to Organic, Constellation, Vinescii, and Trademark; user entries override. - Targets: Bind to either a
preset(any of ~31 named presets) or aconfig(any saved configuration fromCtrl+S). - Comparison: Press
Shift+1throughShift+7to compare the bound preset or config against the current settings (A/B mode). - Live bindings: The
?overlay shows current key bindings and their targets.
In general, mature (= fun to play with) features will have runtime controls, while experimental features will be reachable through cli flags. I try to keep the really nascent stuff behind a compilation flag as well, but be aware that if something is not in the control console (reachable by pressing h) - it is not guaranteed to work.
There are ~31 named presets: network, exploratory, tendrils, organic, fire, river,
petri, vortex, lightning, chaosedge, blob, slime, vines, vinescii, smoke, vortex36,
dynamictendrils, mold, etching, drift, constellation, mosaic, marble, prism, vellum,
forge, wane, gossamer, codex, tide, and trademark. Palettes and character sets are independent of
the preset and can be cycled at runtime. Preset parameters are defined in
src/simulation/config.rs and src/preset_sim_defaults.rs. Please note that a lot of them are WIP that is seeking feedback (from you!). Other than the 4 preset bound to 1-4, which are the ones i actually use, i consider none of them to be "ready".
Most features aren't ready for the default experience. Each has a tracking issue describing current state (I hope) - which, in some cases, explains what's needed to make it work.
| Feature | Try it | Issue |
|---|---|---|
| Multi-species simulation | cargo install tslime --features multi-species, then --species 'red:20k:ff0000' --species 'blue:20k:0000ff' --species-colors |
#8 |
| Choir mode (audio) | cargo install tslime --features audio, then --choir |
#9 |
| GUI mode | cargo build --features gui |
#10 |
| WASM build | tslime-wasm/ (standalone crate) |
#11 |
| Dithering | hidden flags: --dither-mode ordered (and d/D/{/} keys once enabled) |
#12 |
Bug reports, terminal compatibility notes, and work on the experimental features are all welcome. See CONTRIBUTING.md for setup, testing, and the lay of the codebase, or pick up one of the open issues. We're clanker-friendly, up to a point - I probably won't read long slop PRs, and bad/weird code will be rejected (I HOPE).
MIT.
- Jones, J. (2010). "Characteristics of Pattern Formation and Evolution in Approximations of Physarum Transport Networks." Artificial Life, 16(2), 127-153. doi:10.1162/artl.2010.16.2.16202
- Miranda, E. R., Adamatzky, A., & Jones, J. (2011). "Sounds Synthesis with Slime Mould of Physarum Polycephalum." Journal of Bionic Engineering, 8(2), 107-113. doi:10.1016/S1672-6529(11)60016-4
- Ottosson, B. (2020). "A perceptual color space for image processing." https://bottosson.github.io/posts/oklab/





