Give Your AI Agents Hands: Meet tmux-bridge, the Terminal Automation Tool for Multi-Agent Workflows
You've got Claude Code running in one tmux pane, Codex in another, and you're tired of copy-pasting context between them. Or maybe you just want an AI agent that can actually do things in your terminal instead of just suggesting commands. If you've ever wished your agents could talk to each other—or at least share a keyboard—you're going to like this one.
smux is a one-command tmux setup that pairs a keyboard-driven configuration with a CLI tool called tmux-bridge. The bridge lets any AI agent—or any script, really—read, type, and send keys to any pane in your tmux session. It's a simple idea with surprisingly deep implications for how you can work with AI tools.
What It Does
smux does two things. First, it installs and configures tmux for you with Option-key bindings, mouse support, pane labels, and a minimal status bar. Everything lives in ~/.smux/, and you get commands like smux update and smux uninstall to manage it.
Second, and more interestingly, it ships tmux-bridge—a CLI that gives you programmatic control over your tmux panes. The commands are straightforward:
tmux-bridge read codex 20 # read the last 20 lines from a pane labeled "codex"
tmux-bridge type codex "review src/auth.ts" # type text into that pane (no Enter)
tmux-bridge keys codex Enter # send a keypress
You can list all panes with tmux-bridge list, label panes with tmux-bridge name, resolve labels with tmux-bridge resolve, and even have a pane print its own ID with tmux-bridge id. The key insight is that any tool that can run bash can use this—Claude Code, Codex, Gemini CLI, or a plain shell script. No special integration required.
Why It's Cool
The design here is refreshingly pragmatic. Let me break down what stands out:
-
Agent-to-agent communication without any protocol. The README describes a workflow where Claude Code can prompt Codex in the next pane, and Codex replies back. There's no API, no message queue, no framework—just a CLI that reads and types. It's the UNIX philosophy applied to AI agents: do one thing well, and let composition happen naturally.
-
Labels instead of cryptic target strings. You don't need to remember session IDs or pane numbers. You just name a pane
codexordborlogs, and then address it by that label. That's a small thing that makes a huge difference in practice. -
The scroll mode is actually thoughtful. Option+Tab toggles scroll mode, then
i/kscroll line by line, Shift+I/K does half-page jumps, andqor Escape exits. It's the kind of config that suggests someone actually used this daily and tuned it to their workflow. -
The install script handles your OS. It'll pull in tmux via Homebrew, apt, dnf, pacman, or apk depending on what you're running. You don't have to wrestle with package managers before you can try it.
-
There's a skill for your agents.
npx skills add ShawnPana/smuxinstalls documentation that teaches your agents how to use tmux-bridge, and it works with Claude Code, Codex, Cursor, Copilot, and 40+ other agents. That's a nice touch—it lowers the barrier for your tools to actually use the tool.
The whole thing feels like it was built by someone who hit a real wall (manually copying output between AI tools) and built the simplest possible solution. That's the best kind of open-source project.
How to Try It
Getting started is a single command:
curl -fsSL https://shawnpana.com/smux/install.sh | bash
The installer sets up tmux if you don't have it (macOS needs Homebrew, Linux uses whatever package manager you have), installs the tmux config, and drops tmux-bridge into place.
Once you're in a tmux session, you can start experimenting. Create a couple of panes, label them:
tmux-bridge name codex
tmux-bridge name logs
Then try reading from one pane while you type into another. If you want to teach your AI agents how to use it, install the skill:
npx skills add ShawnPana/smux
The repo is at https://github.com/ShawnPana/smux, and there's a skill file in skills/smux/SKILL.md with full documentation on agent-to-agent workflows.
Final Thoughts
smux isn't trying to be a framework or a platform—it's a practical tool that solves a real problem. If you're already living in tmux and working with AI coding tools, this could genuinely change how you orchestrate them. The agent-to-agent workflow is the headline feature, but even the tmux config alone is worth a look if you've been meaning to set up a better keybinding scheme.
Is it for everyone? Probably not. If you're not using tmux or you're not working with AI agents in the terminal, this won't be your thing. But if you are, and you've felt the friction of switching context between tools, give it a shot. The install is painless, the commands are simple, and the payoff—agents that can actually work together in your terminal—might just surprise you.
Follow @githubprojects for more developer tools and open source projects.