termdeck-cli 2.0.3 โ 2.0.5
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 +108 -163
- package/package.json +1 -1
- package/src/agentManager.js +6 -0
- package/src/dashboard.js +693 -167
- package/src/logView.js +3 -0
- package/src/projectManager.js +331 -12
- package/src/util.js +32 -3
package/README.md
CHANGED
|
@@ -1,30 +1,13 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
# ๐ฅ๏ธ termdeck
|
|
3
|
+
# ๐ฅ๏ธ termdeck โ Terminal Project Control Dashboard
|
|
4
4
|
|
|
5
|
-
**A beautiful,
|
|
5
|
+
**A beautiful, multi-pane TUI dashboard for managing your local development projects.**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
[](https://github.com/barigalasunil/termdeck/blob/main/LICENSE)
|
|
7
|
+
Auto-discovery ยท dev-server management ยท AI coding agents ยท real-time monitoring โ all in one terminal.
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| termdeck 14 projects ยท ~/dev/projects โ 2 dev servers running |
|
|
13
|
-
+------------------------+---------------------------------------------+
|
|
14
|
-
| projects | selected project |
|
|
15
|
-
| โ api [live] | alpha โ live |
|
|
16
|
-
| โ alpha [live] | ~/dev/projects/alpha main ยท 8a2f1 (2d ago)|
|
|
17
|
-
| โ blog [exp] | marketing site |
|
|
18
|
-
| โ lab [scrap] | โ dev server running (pid 8123) โ localhost |
|
|
19
|
-
| | cpu 3.2% ยท mem 214MB |
|
|
20
|
-
+------------------------+---------------------------------------------+
|
|
21
|
-
| dev [r] status [s] search [/] ... |
|
|
22
|
-
+------------------------+---------------------------------------------+
|
|
23
|
-
| dev server logs |
|
|
24
|
-
| 12:04:11 alpha [termdeck] $npm run dev |
|
|
25
|
-
| 12:04:12 alpha โ Local: http://localhost:5173 |
|
|
26
|
-
+----------------------------------------------------------------------+
|
|
27
|
-
```
|
|
9
|
+
[](https://www.npmjs.com/package/termdeck-cli)
|
|
10
|
+
[](https://github.com/barigalasunil/termdeck/blob/main/LICENSE)
|
|
28
11
|
|
|
29
12
|
</div>
|
|
30
13
|
|
|
@@ -32,216 +15,178 @@
|
|
|
32
15
|
|
|
33
16
|
## โจ Features
|
|
34
17
|
|
|
35
|
-
- ๐ฏ **
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
18
|
+
- ๐ฏ **Auto-Discovery** โ Every launch quietly re-scans your root directory and adds any new folder that contains a `.git` directory or `package.json`, as a pending project. No manual bookkeeping.
|
|
19
|
+
- ๐งฉ **3-Pane Layout** โ Projects list on the left; Details + Actions (git state, port, status, agent buttons) top-right; and a live Output log pane bottom-right. Hand-positioned with zero gaps.
|
|
20
|
+
- โก **Dev Server Management** โ Run the project's dev command (`npm` / `pnpm` / `yarn run dev`) right inside the TUI, stream its logs, auto-open the browser, and **auto-restart** a crashed server up to 3 times.
|
|
21
|
+
- ๐ค **AI Agent Integration** โ Launch 5 coding agents in a fresh terminal window โ Claude Code, Codex, OpenCode, Freebuff and Kilocode โ with their output tailed back into the Output pane.
|
|
22
|
+
- ๐ **Real-Time Monitoring** โ Live PID, CPU % and memory for the selected project's running process.
|
|
23
|
+
- ๐ฟ **Git Integration** โ Shows the current branch, last commit hash, and dirty state (`+X, -Y`).
|
|
24
|
+
- ๐ท๏ธ **Status Management** โ Organize projects as **live**, **exp** (experimental), **pend**, or **scrap**.
|
|
25
|
+
- ๐ **Auto-Update** โ A background npm check (capped at ~2s) installs the latest version on launch. Disable with `--no-update`.
|
|
26
|
+
- ๐ **Smart Filtering** โ Filter by status tabs (`1`โ`5`) or a regex search (`/`) over project names.
|
|
27
|
+
- ๐ **12-Hour Timestamps** โ Every timestamp and log line uses AM/PM with dates, e.g. `Sep 21, 2026 3:30:59 PM`.
|
|
28
|
+
- ๐พ **Self-Healing Config** โ `~/.termdeck-config.json` is auto-saved and merged on re-scan, preserving your custom per-project overrides.
|
|
41
29
|
|
|
42
30
|
---
|
|
43
31
|
|
|
44
32
|
## ๐ฆ Installation
|
|
45
33
|
|
|
46
|
-
### Global Install (Recommended)
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npm install -g termdeck
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
This installs the `termdeck` command anywhere.
|
|
53
|
-
|
|
54
|
-
### One-Off Run
|
|
55
|
-
|
|
56
34
|
```bash
|
|
57
|
-
|
|
35
|
+
npm install -g termdeck-cli
|
|
58
36
|
```
|
|
59
37
|
|
|
60
|
-
> **Note:** Requires Node.js 16+ and a real terminal (
|
|
38
|
+
> **Note:** the package is published as `termdeck-cli`, but the command you run is simply **`termdeck`**. Requires Node.js 16+ and a real terminal (Windows Terminal, iTerm, macOS/Linux Terminal, etc.).
|
|
61
39
|
|
|
62
|
-
|
|
40
|
+
---
|
|
63
41
|
|
|
64
|
-
|
|
42
|
+
## ๐ Quick Start
|
|
65
43
|
|
|
66
|
-
|
|
44
|
+
Just run:
|
|
67
45
|
|
|
68
46
|
```bash
|
|
69
|
-
termdeck
|
|
47
|
+
termdeck
|
|
70
48
|
```
|
|
71
49
|
|
|
72
|
-
|
|
50
|
+
On first launch termdeck starts an interactive setup wizard:
|
|
73
51
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
npm install -g termdeck@latest
|
|
78
|
-
```
|
|
52
|
+
1. **Pick your projects directory** โ it scans that folder for any subfolder containing `.git` or `package.json`.
|
|
53
|
+
2. **Multi-select the folders** that are real projects (<kbd>Space</kbd> to toggle, <kbd>Enter</kbd> to confirm).
|
|
54
|
+
3. **Set the status** for each project โ `live`, `exp`, `pend`, or `scrap` (default `exp`).
|
|
79
55
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
termdeck --version
|
|
84
|
-
# or inspect the global install directly
|
|
85
|
-
npm list -g termdeck
|
|
86
|
-
```
|
|
56
|
+
The package manager (`npm` / `pnpm` / `yarn`) is **auto-detected** from the lockfiles and the default dev port is **auto-assigned** to `3000` โ so status is the only thing you need to set. Every later launch skips straight to the dashboard.
|
|
87
57
|
|
|
88
58
|
---
|
|
89
59
|
|
|
90
|
-
##
|
|
91
|
-
|
|
92
|
-
To completely remove termdeck from your system:
|
|
60
|
+
## โจ๏ธ Usage
|
|
93
61
|
|
|
94
62
|
```bash
|
|
95
|
-
|
|
63
|
+
termdeck # Launch dashboard
|
|
64
|
+
termdeck --scan # Run interactive project scanner (merge new projects)
|
|
65
|
+
termdeck --demo # Launch with 14 bundled sample projects
|
|
66
|
+
termdeck --no-update # Disable auto-update for this session
|
|
67
|
+
termdeck --reset # Delete config and start fresh
|
|
96
68
|
```
|
|
97
69
|
|
|
98
|
-
|
|
99
|
-
Your project configuration at `~/.termdeck-config.json` is preserved.
|
|
100
|
-
To delete the config file as well:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# macOS/Linux
|
|
104
|
-
rm ~/.termdeck-config.json
|
|
70
|
+
### Other flags
|
|
105
71
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
72
|
+
| Flag | Description |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `--setup` | Re-run the setup wizard manually |
|
|
75
|
+
| `--list` | Print configured projects as a table and exit (no TUI) |
|
|
76
|
+
| `--no-auto-restart` | Disable dev-server crash recovery for this session |
|
|
77
|
+
| `--no-open` | Do not auto-open the browser when a dev server starts |
|
|
109
78
|
|
|
110
79
|
---
|
|
111
80
|
|
|
112
|
-
##
|
|
113
|
-
|
|
114
|
-
On first launch termdeck detects that no `~/.termdeck-config.json` exists and runs an interactive setup wizard:
|
|
115
|
-
|
|
116
|
-
1. **Which directory holds your projects?** โ Pick from suggestions (common folders like `~/Projects`, `~/dev`, plus every drive letter on Windows) or type a path.
|
|
117
|
-
2. **Which folders are projects?** โ termdeck scans the directory and shows only folders that contain a `.git` directory or a `package.json` manifest. Multi-select with <kbd>Space</kbd>, confirm with <kbd>Enter</kbd>.
|
|
118
|
-
3. **Per-project details** โ For each project you pick, termdeck asks its status (`live`, `exp`, `pend` or `scrap`, default `exp`), the dev-server port (default `3000`) and the package manager (`npm`, `pnpm` or `yarn` โ auto-detected from `pnpm-lock.yaml` / `yarn.lock`).
|
|
81
|
+
## โจ๏ธ Keyboard Shortcuts
|
|
119
82
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
>
|
|
83
|
+
| Key | Action |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| <kbd>โ</kbd> / <kbd>โ</kbd> (or <kbd>j</kbd> / <kbd>k</kbd>) | Navigate projects |
|
|
86
|
+
| <kbd>Tab</kbd> / <kbd>Shift</kbd>+<kbd>Tab</kbd> | Switch focus between panes (Projects โ Actions โ Output) |
|
|
87
|
+
| <kbd>Enter</kbd> / <kbd>Space</kbd> | Activate the focused button |
|
|
88
|
+
| <kbd>r</kbd> (or <kbd>d</kbd>) | Run the dev server |
|
|
89
|
+
| <kbd>e</kbd> | Open the project in VS Code |
|
|
90
|
+
| <kbd>c</kbd> | Launch Claude Code |
|
|
91
|
+
| <kbd>x</kbd> | Launch Codex |
|
|
92
|
+
| <kbd>o</kbd> | Launch OpenCode |
|
|
93
|
+
| <kbd>f</kbd> | Launch Freebuff |
|
|
94
|
+
| <kbd>k</kbd> | Launch Kilocode |
|
|
95
|
+
| <kbd>s</kbd> | Change project status |
|
|
96
|
+
| <kbd>/</kbd> | Focus search bar (regex) |
|
|
97
|
+
| <kbd>1</kbd>โ<kbd>5</kbd> | Filter by status tab: all / live / exp / pend / scrap |
|
|
98
|
+
| <kbd>Shift</kbd>+<kbd>X</kbd> | Stop the dev server |
|
|
99
|
+
| <kbd>PgUp</kbd> / <kbd>PgDn</kbd>, mouse wheel | Scroll live output (<kbd>g</kbd> to follow the tail again) |
|
|
100
|
+
| <kbd>q</kbd> | Quit (stops every dev server it started) |
|
|
123
101
|
|
|
124
102
|
---
|
|
125
103
|
|
|
126
|
-
##
|
|
104
|
+
## ๐ค AI Agents
|
|
127
105
|
|
|
128
|
-
|
|
106
|
+
Each agent opens in a new terminal window inside the selected project's folder:
|
|
129
107
|
|
|
130
|
-
|
|
|
131
|
-
| --- | --- |
|
|
132
|
-
| `termdeck` | Launch the dashboard using the existing config (first run starts the wizard). |
|
|
133
|
-
| `termdeck --demo` | Launch with 14 sample projects (great for trying it out). |
|
|
134
|
-
| `termdeck --scan` | Re-run the interactive scanner: adds/updates projects in the config, merging with existing entries and preserving custom agent configs. |
|
|
135
|
-
| `termdeck --no-auto-restart` | Disable dev-server crash recovery for this session only. |
|
|
136
|
-
| `termdeck --reset` | Delete the config file and force a fresh first-run setup on the next launch. |
|
|
137
|
-
| `termdeck --no-update` | Disable the background auto-updater. |
|
|
138
|
-
| `termdeck --setup` | Re-run the setup wizard manually. |
|
|
139
|
-
| `termdeck --list` | Print the configured projects as a table and exit (no TUI). |
|
|
140
|
-
| `termdeck --no-open` | Do not auto-open the browser when a dev server starts. |
|
|
141
|
-
|
|
142
|
-
### Keyboard Shortcuts
|
|
143
|
-
|
|
144
|
-
| Key | Action |
|
|
108
|
+
| Hotkey | Agent |
|
|
145
109
|
| --- | --- |
|
|
146
|
-
| <kbd
|
|
147
|
-
| <kbd>
|
|
148
|
-
| <kbd>
|
|
149
|
-
| <kbd>
|
|
150
|
-
| <kbd>
|
|
151
|
-
| <kbd>c</kbd> | Open Claude in a new terminal |
|
|
152
|
-
| <kbd>x</kbd> | Open Codex in a new terminal |
|
|
153
|
-
| <kbd>o</kbd> | Open opencode in a new terminal |
|
|
154
|
-
| <kbd>f</kbd> | Open freebuff in a new terminal |
|
|
155
|
-
| <kbd>k</kbd> | Open kilocode in a new terminal |
|
|
156
|
-
| <kbd>s</kbd> | Cycle the selected project's status |
|
|
157
|
-
| <kbd>/</kbd> | Search projects by name (Enter commits, Esc cancels) |
|
|
158
|
-
| <kbd>1</kbd>โ<kbd>5</kbd> | Filter by status chip: all / live / exp / pend / scrap |
|
|
159
|
-
| <kbd>Shift</kbd>+<kbd>X</kbd> | Stop the selected project's dev server |
|
|
160
|
-
| <kbd>PgUp</kbd>/<kbd>PgDn</kbd>, mouse wheel | Scroll the dev server logs (<kbd>g</kbd> to follow the tail again) |
|
|
161
|
-
| <kbd>q</kbd> | Quit (stops every dev server it started) |
|
|
110
|
+
| <kbd>c</kbd> | Claude Code |
|
|
111
|
+
| <kbd>x</kbd> | Codex |
|
|
112
|
+
| <kbd>o</kbd> | OpenCode |
|
|
113
|
+
| <kbd>f</kbd> | Freebuff |
|
|
114
|
+
| <kbd>k</kbd> | Kilocode |
|
|
162
115
|
|
|
163
|
-
|
|
116
|
+
You can override any agent's command per project via the `agents` map in your config.
|
|
164
117
|
|
|
165
118
|
---
|
|
166
119
|
|
|
167
|
-
##
|
|
168
|
-
|
|
169
|
-
**How do I disable auto-updates?**
|
|
170
|
-
Pass `--no-update` when you launch the dashboard: `termdeck --no-update`. The npm registry is then never contacted and nothing is printed.
|
|
120
|
+
## ๐ธ Screenshots
|
|
171
121
|
|
|
172
|
-
|
|
173
|
-
termdeck restarts a crashed dev server up to 3 times, then gives up and logs the failure. If you would rather not have any crash recovery for a session, launch with `termdeck --no-auto-restart`.
|
|
122
|
+
<!-- TODO: Add screenshot of the dashboard -->
|
|
174
123
|
|
|
175
|
-
**
|
|
176
|
-
No. `termdeck --scan` (or the setup wizard on a machine that already has a config) merges: projects you didn't touch stay exactly as they are, projects you re-select get their new status/port/package manager, and hand-written per-project overrides such as custom agent commands are kept.
|
|
124
|
+
The UI is a **dark theme with green accents** (a green line-bordered masthead and green "live" indicators) laid out in a **3-pane layout showing projects, details, and live logs**.
|
|
177
125
|
|
|
178
126
|
---
|
|
179
127
|
|
|
180
|
-
##
|
|
128
|
+
## โ๏ธ Configuration
|
|
181
129
|
|
|
182
|
-
|
|
130
|
+
termdeck stores everything in:
|
|
183
131
|
|
|
184
|
-
```bash
|
|
185
|
-
git clone https://github.com/barigalasunil/termdeck.git
|
|
186
|
-
cd termdeck
|
|
187
|
-
npm install
|
|
188
|
-
npm link # symlink into global node_modules
|
|
189
|
-
termdeck # runs from anywhere with your edits live
|
|
190
132
|
```
|
|
191
|
-
|
|
192
|
-
### Running Tests
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
npm test # unit + end-to-end dev server tests (64/64 passing โ
)
|
|
196
|
-
npm run smoke # headless TUI smoke test
|
|
133
|
+
~/.termdeck-config.json
|
|
197
134
|
```
|
|
198
135
|
|
|
199
|
-
|
|
136
|
+
- **Auto-saves** project paths, statuses, ports, and package managers.
|
|
137
|
+
- **Auto-discovers** new projects on every launch โ just create the folder in your root directory.
|
|
138
|
+
- Merges on re-scan: projects you did not touch stay exactly as they are, and hand-written overrides (custom agent/editor commands, etc.) are preserved.
|
|
139
|
+
- Override the location with the `TERMDECK_CONFIG` environment variable (handy for testing).
|
|
200
140
|
|
|
201
|
-
|
|
141
|
+
---
|
|
202
142
|
|
|
203
|
-
|
|
143
|
+
## โ FAQ
|
|
204
144
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
```
|
|
145
|
+
**How do I add new projects?**
|
|
146
|
+
termdeck auto-discovers new folders on every launch. Just create the folder in your root directory.
|
|
208
147
|
|
|
209
|
-
|
|
148
|
+
**How do I disable auto-updates?**
|
|
149
|
+
Use `termdeck --no-update`, or rely on the fact that the updater checks at most once per launch and silently skips offline/slow registries.
|
|
210
150
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
TERMDECK_REGISTRY_URL=http://127.0.0.1:4873/termdeck/latest termdeck
|
|
151
|
+
**Can I change the root directory?**
|
|
152
|
+
Yes โ delete `~/.termdeck-config.json` and run `termdeck` to re-run the setup wizard.
|
|
214
153
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
```
|
|
154
|
+
**A dev server keeps restarting โ how do I stop that?**
|
|
155
|
+
A crashed server is auto-restarted up to 3 times, then termdeck gives up and logs the failure. Launch with `termdeck --no-auto-restart` to disable crash recovery for a session.
|
|
218
156
|
|
|
219
|
-
|
|
157
|
+
---
|
|
220
158
|
|
|
221
|
-
|
|
159
|
+
## ๐ ๏ธ Development
|
|
222
160
|
|
|
223
161
|
```bash
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
npm
|
|
227
|
-
npm
|
|
162
|
+
git clone https://github.com/barigalasunil/termdeck.git
|
|
163
|
+
cd termdeck
|
|
164
|
+
npm install
|
|
165
|
+
npm link
|
|
166
|
+
termdeck
|
|
167
|
+
npm test # run the unit + integration test suite (70 tests)
|
|
168
|
+
npm run smoke # run the headless TUI integration test
|
|
228
169
|
```
|
|
229
170
|
|
|
230
|
-
|
|
171
|
+
The smoke test drives a headless blessed screen: it verifies the dashboard renders, that the dev-server action starts a real fixture server and streams its logs into the Output pane, and that stopping the server cleans up the child process.
|
|
231
172
|
|
|
232
|
-
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## ๐๏ธ Uninstall
|
|
233
176
|
|
|
234
177
|
```bash
|
|
235
|
-
npm
|
|
178
|
+
npm uninstall -g termdeck-cli
|
|
236
179
|
```
|
|
237
180
|
|
|
238
|
-
|
|
181
|
+
Your config at `~/.termdeck-config.json` is preserved; delete it manually if you want a clean slate.
|
|
239
182
|
|
|
240
183
|
---
|
|
241
184
|
|
|
242
185
|
## ๐ License
|
|
243
186
|
|
|
244
|
-
MIT
|
|
187
|
+
MIT License.
|
|
188
|
+
|
|
189
|
+
**Author:** Sunil ([@barigalasunil](https://github.com/barigalasunil)) ยท **GitHub:** <https://github.com/barigalasunil/termdeck>
|
|
245
190
|
|
|
246
191
|
---
|
|
247
192
|
|
|
@@ -249,6 +194,6 @@ MIT
|
|
|
249
194
|
|
|
250
195
|
**Built with โค๏ธ by [Sunil](https://github.com/barigalasunil)**
|
|
251
196
|
|
|
252
|
-
[GitHub](https://github.com/barigalasunil/termdeck) ยท [npm](https://www.npmjs.com/package/termdeck)
|
|
197
|
+
[GitHub](https://github.com/barigalasunil/termdeck) ยท [npm](https://www.npmjs.com/package/termdeck-cli)
|
|
253
198
|
|
|
254
|
-
</div>
|
|
199
|
+
</div>
|
package/package.json
CHANGED
package/src/agentManager.js
CHANGED
|
@@ -203,8 +203,14 @@ function isTailing(project, agentName) {
|
|
|
203
203
|
return tailing.has(tailKey(project, agentName));
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
/** Number of agent log tails currently being streamed. */
|
|
207
|
+
function activeTails() {
|
|
208
|
+
return tailing.size;
|
|
209
|
+
}
|
|
210
|
+
|
|
206
211
|
module.exports = {
|
|
207
212
|
AGENT_COMMANDS,
|
|
213
|
+
activeTails,
|
|
208
214
|
logDir,
|
|
209
215
|
logFileName,
|
|
210
216
|
logFilePath,
|