mux-sesh 1.4.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -7
- package/package.json +3 -3
- package/src/app.tsx +746 -173
- package/src/components/KeybindHelp.tsx +178 -111
- package/src/config/index.ts +413 -20
- package/src/config/listed-sessions.ts +36 -0
- package/src/config/session-rules.ts +101 -0
- package/src/handlers/actions.ts +93 -6
- package/src/handlers/keyboard.ts +299 -79
- package/src/items/order.ts +50 -0
- package/src/opencode/session.ts +1 -17
- package/src/opencode/stats.ts +1 -1
- package/src/preview/project.ts +235 -0
- package/src/projects/session-links.ts +31 -0
- package/src/search/index.ts +83 -47
- package/src/settings.ts +425 -0
- package/src/styles/opencode-themes-a.ts +1 -0
- package/src/styles/opencode-themes-b.ts +1 -0
- package/src/styles/theme.tsx +441 -0
- package/src/tmux/index.ts +58 -14
- package/src/tmux/projects.ts +151 -20
- package/src/tmux/workflows.ts +22 -0
- package/src/types/index.ts +114 -0
- package/src/ui/CommandsModal.tsx +145 -0
- package/src/ui/HighlightedText.tsx +6 -3
- package/src/ui/ItemList.tsx +47 -41
- package/src/ui/Modal.tsx +41 -0
- package/src/ui/OpencodeSessionGroup.tsx +50 -46
- package/src/ui/OpencodeStatsPanel.tsx +34 -39
- package/src/ui/RenameModal.tsx +42 -0
- package/src/ui/SearchInput.tsx +3 -1
- package/src/ui/SessionDetailsPanel.tsx +168 -72
- package/src/ui/SessionList.tsx +59 -34
- package/src/ui/SessionStats.tsx +5 -3
- package/src/ui/SettingEditorModal.tsx +49 -0
- package/src/ui/SettingOptionsModal.tsx +77 -0
- package/src/ui/SettingsModal.tsx +96 -0
- package/src/ui/Toast.tsx +8 -9
- package/src/ui/item-icon.ts +78 -0
- package/src/ui/list-window.ts +22 -0
- package/src/update/installation.ts +4 -15
- package/src/update/version.ts +2 -1
- package/src/util/glob.ts +47 -0
- package/src/util/terminal.ts +6 -20
- package/src/styles/theme.ts +0 -50
package/README.md
CHANGED
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
- **Beautiful UI** - Catppuccin-themed interface
|
|
14
14
|
- **Vim keybindings** - Navigate with j/k or arrow keys
|
|
15
15
|
- **Project scanning** - Browse and create sessions from local directories
|
|
16
|
+
- **Config-driven sessions** - Exact project rules, wildcard rules, and listed config targets
|
|
17
|
+
- **Session-aware project picker** - See when a project will attach to an existing tmux session vs create a new one
|
|
18
|
+
- **Rich previews** - Preview commands with directory fallback and live tmux context for running projects
|
|
16
19
|
- **GitHub integration** - Clone repos directly from URLs
|
|
17
20
|
- **Quick select** - Use number keys (1-9) for instant switching
|
|
18
21
|
- **Session management** - Create, switch, kill, and rename sessions
|
|
@@ -76,11 +79,29 @@ cp dist/mux-sesh ~/.local/bin/
|
|
|
76
79
|
| `n` | Create new session |
|
|
77
80
|
| `d` | Kill selected session |
|
|
78
81
|
| `r` | Rename selected session |
|
|
82
|
+
| `l` | Jump to previous tmux session |
|
|
83
|
+
| `g` | Open the git-root session for the selected item |
|
|
84
|
+
| `e` | Edit configured session target |
|
|
79
85
|
| `R` | Refresh list |
|
|
80
86
|
| `s` | Switch to sessions view |
|
|
81
87
|
| `p` | Switch to projects view |
|
|
82
88
|
| `q` or `Esc` | Quit |
|
|
83
89
|
|
|
90
|
+
### Standard Mode
|
|
91
|
+
| Key | Action |
|
|
92
|
+
|-----|--------|
|
|
93
|
+
| `↑` / `↓` | Navigate |
|
|
94
|
+
| `Ctrl+I` | Search |
|
|
95
|
+
| `Ctrl+N` | New session |
|
|
96
|
+
| `Ctrl+D` | Kill selected live session |
|
|
97
|
+
| `Ctrl+R` | Rename selected live session |
|
|
98
|
+
| `Ctrl+L` | Jump to previous tmux session |
|
|
99
|
+
| `Ctrl+G` | Open the git-root session for the selected item |
|
|
100
|
+
| `Ctrl+E` | Edit configured session target |
|
|
101
|
+
| `Ctrl+Q` | Quit |
|
|
102
|
+
|
|
103
|
+
In search/new/rename mode, standard mode also supports `Ctrl+X` prefix commands for refresh, rename, kill, root, and opencode actions.
|
|
104
|
+
|
|
84
105
|
### Search Mode
|
|
85
106
|
| Key | Action |
|
|
86
107
|
|-----|--------|
|
|
@@ -104,12 +125,40 @@ Configuration is stored at `~/.config/mux-sesh/config.json`:
|
|
|
104
125
|
|
|
105
126
|
```json
|
|
106
127
|
{
|
|
107
|
-
"project_paths": ["~/dev", "~/personal", "~/work"],
|
|
128
|
+
"project_paths": ["~/dev", "~/personal", "~/work", "~/projects"],
|
|
108
129
|
"repos_path": "~/dev/repos",
|
|
109
130
|
"editor": "nvim",
|
|
110
131
|
"editor_cmd": "nvim -c \"lua vim.defer_fn(function() if pcall(require, 'telescope') then vim.cmd('Telescope find_files') end end, 100)\"",
|
|
111
|
-
"keybind_mode": "vim",
|
|
112
|
-
"
|
|
132
|
+
"keybind_mode": "vim",
|
|
133
|
+
"sort_order": "zoxide-first",
|
|
134
|
+
"zoxide_mode": "rank",
|
|
135
|
+
"dir_length": 2,
|
|
136
|
+
"hidden_sessions": ["scratch", "tmp*"],
|
|
137
|
+
"icons": {
|
|
138
|
+
"tmux": "",
|
|
139
|
+
"configured": "",
|
|
140
|
+
"project": "",
|
|
141
|
+
"opencode": ""
|
|
142
|
+
},
|
|
143
|
+
"default_session": {
|
|
144
|
+
"startup_command": "nvim",
|
|
145
|
+
"preview_command": "eza --all {}"
|
|
146
|
+
},
|
|
147
|
+
"projects": [
|
|
148
|
+
{
|
|
149
|
+
"path": "~/.dotfiles/hypr/.config/hypr",
|
|
150
|
+
"session_name": "hyprland",
|
|
151
|
+
"listed": true,
|
|
152
|
+
"icon": "",
|
|
153
|
+
"startup_command": "nvim"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"wildcards": [
|
|
157
|
+
{
|
|
158
|
+
"pattern": "~/work/**",
|
|
159
|
+
"startup_command": "bun run dev"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
113
162
|
}
|
|
114
163
|
```
|
|
115
164
|
|
|
@@ -118,9 +167,66 @@ Configuration is stored at `~/.config/mux-sesh/config.json`:
|
|
|
118
167
|
- **`project_paths`** - Array of directories to scan for projects
|
|
119
168
|
- **`repos_path`** - Directory where GitHub repositories will be cloned
|
|
120
169
|
- **`editor`** - Default editor to use
|
|
121
|
-
- **`editor_cmd`** -
|
|
122
|
-
- **`keybind_mode`** -
|
|
123
|
-
- **`
|
|
170
|
+
- **`editor_cmd`** - Default startup command for new sessions unless overridden
|
|
171
|
+
- **`keybind_mode`** - `vim` or `standard`
|
|
172
|
+
- **`sort_order`** - Session/project ordering: `live-first`, `configured-first`, `zoxide-first`, or `alphabetical`
|
|
173
|
+
- **`zoxide_mode`** - `off`, `rank`, or `merge` for zoxide-aware project ordering
|
|
174
|
+
- **`dir_length`** - Number of path segments used when generating session names from git roots or project paths
|
|
175
|
+
- **`hidden_sessions`** - Glob patterns for live tmux sessions to hide from the list
|
|
176
|
+
- **`icons`** - Global icons for tmux, configured, project, and opencode rows
|
|
177
|
+
- **`default_session`** - Fallback startup and preview commands
|
|
178
|
+
- **`projects`** - Exact path rules with optional `session_name`, `startup_command`, `preview_command`, `listed`, and `icon`
|
|
179
|
+
- **`wildcards`** - Pattern-based defaults for matching projects
|
|
180
|
+
|
|
181
|
+
### Rule Resolution
|
|
182
|
+
|
|
183
|
+
When you select a project, mux-sesh resolves its behavior in this order:
|
|
184
|
+
|
|
185
|
+
1. Exact `projects[]` path match
|
|
186
|
+
2. First matching `wildcards[]` rule
|
|
187
|
+
3. `default_session`
|
|
188
|
+
|
|
189
|
+
Session names use the git root when available, then apply `dir_length` if you did not set an explicit `session_name`.
|
|
190
|
+
|
|
191
|
+
### Listed Sessions
|
|
192
|
+
|
|
193
|
+
Set `listed: true` on a project rule to keep that target visible in the Sessions view even when tmux has not started it yet. This works well for dotfiles, config folders, dashboards, and other “always useful” targets.
|
|
194
|
+
|
|
195
|
+
If a live tmux session already exists with the same title, the live session takes precedence.
|
|
196
|
+
|
|
197
|
+
### Sorting and Zoxide
|
|
198
|
+
|
|
199
|
+
- `zoxide_mode: off` - scan only
|
|
200
|
+
- `zoxide_mode: rank` - reorder discovered projects by zoxide score
|
|
201
|
+
- `zoxide_mode: merge` - include additional zoxide-ranked projects inside configured roots
|
|
202
|
+
- `sort_order: live-first` - live sessions before configured placeholders
|
|
203
|
+
- `sort_order: configured-first` - configured placeholders before live sessions
|
|
204
|
+
- `sort_order: zoxide-first` - preserve project discovery/zoxide ordering
|
|
205
|
+
- `sort_order: alphabetical` - alphabetical project and session ordering
|
|
206
|
+
|
|
207
|
+
### Preview Behavior
|
|
208
|
+
|
|
209
|
+
`preview_command` inherits from `default_session`, can be overridden per project rule, and supports `{}` interpolation for the selected path.
|
|
210
|
+
|
|
211
|
+
- if the preview command succeeds, mux-sesh renders its output in the detail panel
|
|
212
|
+
- if it fails or times out, mux-sesh falls back to a directory listing
|
|
213
|
+
- if a project already has a linked tmux session, the preview also includes live tmux window details
|
|
214
|
+
|
|
215
|
+
Example:
|
|
216
|
+
|
|
217
|
+
```json
|
|
218
|
+
{
|
|
219
|
+
"default_session": {
|
|
220
|
+
"preview_command": "eza --all {}"
|
|
221
|
+
},
|
|
222
|
+
"projects": [
|
|
223
|
+
{
|
|
224
|
+
"path": "~/dev/projects/mux-sesh",
|
|
225
|
+
"preview_command": "git -C {} status --short"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
```
|
|
124
230
|
|
|
125
231
|
### tmux Integration
|
|
126
232
|
|
|
@@ -159,7 +265,17 @@ mux-sesh
|
|
|
159
265
|
|
|
160
266
|
# Press 'n' for new session
|
|
161
267
|
# Type project name to filter
|
|
162
|
-
#
|
|
268
|
+
# Rows show whether they will attach to an existing tmux session or create a new one
|
|
269
|
+
# Press Enter to create or attach
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Jump to Root / Last / Edit Target
|
|
273
|
+
```bash
|
|
274
|
+
mux-sesh
|
|
275
|
+
|
|
276
|
+
# Select a project or session, then press 'g' to jump to its git-root session
|
|
277
|
+
# Press 'l' to jump to the most recent non-current tmux session
|
|
278
|
+
# Select a configured session and press 'e' to open its target in your editor
|
|
163
279
|
```
|
|
164
280
|
|
|
165
281
|
### Clone from GitHub
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mux-sesh",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A beautiful tmux session manager built with OpenTUI - fuzzy search sessions, manage projects, clone from GitHub",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"bun": ">=1.0.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@opentui/core": "
|
|
51
|
-
"@opentui/react": "
|
|
50
|
+
"@opentui/core": "0.1.60",
|
|
51
|
+
"@opentui/react": "0.1.60",
|
|
52
52
|
"react": "^19.2.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|