A lightweight CLI tool for managing tmux sessions from TOML recipes.
Born out of the frustration of manually setting up tmux workspaces every morning.
go install github.com/Josef-Hlink/twin/cmd/twin@latestRun any twin command with no config in place and twin scaffolds a starter setup at $XDG_CONFIG_HOME/twin/
(falls back to ~/.config/twin/).
$ twin tspmo
no config found — created starter config at ~/.config/twin
This creates:
~/.config/twin/
twin.toml # main config
recipes/
home.toml # starter recipe (active by default)
twin.toml # meta recipe for poking around twin's own config
From there, add your own recipes and optionally list them as active in twin.toml.
Config lives at ~/.config/twin/twin.toml.
Override the location with TWIN_CONFIG_DIR or XDG_CONFIG_HOME.
recipe-dir = "~/.config/twin/recipes"
active = ["front", "back", "infra"]active controls which recipes twin tspmo spins up.
Each recipe is a TOML file in the recipe directory. The filename becomes the session name.
# ~/.config/twin/recipes/front.toml
start-directory = "~/Developer/pro/my-frontend/"
[[windows]]
start-directory = "src/"
commands = ["nvim"]
[[windows]]
# empty window — just a shell
[[windows]]
commands = ["lazygit"]
[[windows]]
commands = ["make run"]start-directory(top-level) is requiredstart-directoryon a window is relative to the recipe's top-level directorycommandsis optional; omit it for a plain shell~and environment variables are expanded in paths
Tmux Session Project Management Opener
Spin up tmux sessions for all active recipes. Skips sessions that already exist.
From Recipe
Open a single recipe session.
twin fr # fzf picker (only shows unopened recipes)
twin fr myproject # open a specific recipe
twin fr --list # list all available recipesSwitch Your Basis of Active Undertakement
Fuzzy session switcher in a tmux popup. Bind it in tmux.conf:
bind-key Space run-shell "twin sybau --preview"
This project is entirely vibecoded. Virtually none of the code is written by me — it's all Claude.