muffintui
muffintui is the crates.io package for a Rust terminal workspace that runs as the muffin command.
It gives you four panes inside a project directory:
- Files
- Editor
- Terminal
- Codex
It starts in the current working directory and uses that directory as:
- the root of the file tree
- the working directory for shell commands
- the working directory for the embedded
codexsession
Requirements
- Rust and Cargo
codexinstalled and available onPATH
Setup Prerequisites
1. Install Rust and Cargo
If rustc and cargo are not installed yet, install them with rustup:
|
After installation, restart your shell or load Cargo's environment:
Verify the installation:
2. Install and authenticate Codex CLI
muffin launches the codex command inside the Codex pane, so the CLI must already be installed and authenticated on your machine.
Verify that the command is available:
If you still need to authenticate, run:
Then confirm the CLI is ready before starting muffin.
3. Sanity check
Before installing or running muffin, this should work:
Install
Install from crates.io:
This installs the executable as:
Install from the local checkout:
That local install also provides the muffin executable.
Run
Launch in the current directory:
Launch against another project:
Run without installing during local development:
What It Does
- Shows a navigable file tree rooted at the current directory
- Opens the selected file in a read-only editor pane
- Toggles an editor diff mode against
HEAD~1 - Runs shell commands inside the built-in terminal pane with
sh -lc - Embeds a live
codexterminal session in the right pane - Cycles between three built-in themes
Notes:
.gitandtargetare intentionally hidden from the file tree- Diff mode falls back to a message when the repository has no
HEAD~1 - If the initial
codexlaunch fails, pressingEnterin the Codex pane retries the session
Keybindings
Global
Tab: move focus to the next paneShift+Tab: cycle the themeEsc: quitCtrl+C: quit when focus is not in the Codex pane
Files Pane
Upork: move selection upDownorj: move selection downEnteron a directory: expand or collapse itEnteron a file: open it in the editor pane
Editor Pane
Ctrl+D: toggle normal view and diff viewPageUp: scroll upPageDown: scroll down
Terminal Pane
- Type directly into the prompt
Enter: run the current commandBackspace: delete one characterPageUp: scroll backPageDown: scroll forwardHome: jump to the oldest visible terminal historyEnd: jump back to the live prompt
Codex Pane
- Regular typing: send input to the embedded
codexsession Enter: submit input, or retry the session if startup failedCtrl+C: send interrupt tocodexArrow keys,PageUp,PageDown,Home,End,Tab,Backspace: forwarded to the embedded session
Publish
Before publishing:
Then publish: