A Rust utility for creating and managing tmux or Zellij sessions for development projects.
- Automatically creates tmux or Zellij sessions with preconfigured windows
- Attaches to existing sessions if they already exist
- Supports custom configurations via JSON (
.dev.json) or KDL (.dev.kdl) files - Falls back to a sensible default 4-window layout (Code, Zsh, Server, UI)
- Generate a starter config file with
--init
cargo build --release
cp target/release/dev ~/.local/bin/Run dev from the root of your project directory:
cd ~/projects/my-app
devThe tool checks for configuration files in this order:
.dev.json- Custom tmux configuration.dev.kdl- Custom Zellij layout- Default layout - Creates 4 windows (Code, Zsh, Server, UI)
To create a .dev.json starter config in the current directory:
dev --initThis generates a config with the default 4-window layout that you can customize. The session name is automatically set to the current directory name.
Create a .dev.json file in your project root:
{
"session": "my-app",
"windows": [
{
"name": "Build",
"actions": ["cargo watch -x test -x build"],
"pwd": ".",
"select": true
},
{
"name": "Code",
"actions": [],
"pwd": ".",
"select": false
},
{
"name": "Server",
"actions": ["npm run dev"],
"pwd": "./frontend",
"select": false
}
]
}| Property | Type | Description |
|---|---|---|
| name | string | Window name displayed in tmux |
| actions | string[] | Commands to execute when the window is created |
| pwd | string | Working directory for the window |
| select | boolean | If true, this window is selected after creation |
Create a .dev.kdl file in your project root:
layout {
tab name="Build" {
pane command="cargo" {
args "watch" "-x" "test" "-x" "build"
}
}
tab focus=true name="Code" {
pane
}
tab name="Shell" {
pane
}
}See the Zellij layout documentation for more options.
When no configuration file is found, the tool creates a tmux session with:
| Window | Name | Purpose |
|---|---|---|
| 0 | Code | Primary editing window |
| 1 | Zsh | General shell tasks |
| 2 | Server | Running development server |
| 3 | UI | Frontend/UI tasks |
The session name is derived from the current directory name.
See dev-sample.json and dev-sample.kdl for example configurations.
- serde - Serialization framework
- serde_json - JSON parsing
MIT