clidesk 0.1.6 → 0.1.8
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 +113 -16
- package/bin/clidesk.js +128 -29
- package/package.json +14 -5
- package/vendor/clidesk-launcher.exe +0 -0
- package/vendor/clidesk.exe +0 -0
package/README.md
CHANGED
|
@@ -1,40 +1,137 @@
|
|
|
1
|
-
# CliDesk
|
|
1
|
+
# CliDesk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/clidesk)
|
|
4
|
+
[](https://github.com/vykelongthuong/CliDesk/blob/main/LICENSE)
|
|
5
|
+

|
|
6
|
+

|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
**A local desktop dashboard for managing project-based terminals, files, Git status, and AI coding CLI tools** such as Codex CLI, Claude CLI, DeepSeek CLI, and other terminal-based developer agents.
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
This npm package contains the CliDesk desktop app binary and a native Windows launcher.
|
|
10
|
-
|
|
11
|
-
## Install
|
|
10
|
+
## Installation
|
|
12
11
|
|
|
13
12
|
```bash
|
|
14
13
|
npm i -g clidesk
|
|
15
14
|
```
|
|
16
15
|
|
|
17
|
-
##
|
|
16
|
+
## Launch
|
|
18
17
|
|
|
19
18
|
```bash
|
|
20
19
|
clidesk
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
- `clidesk` opens the desktop app immediately.
|
|
23
|
+
- The terminal prompt returns right away.
|
|
24
|
+
- Language selection happens inside the app on first launch.
|
|
25
|
+
- Users can change language later in **Settings**.
|
|
26
|
+
|
|
27
|
+
## CLI Commands
|
|
28
|
+
|
|
29
|
+
| Command | Description |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `clidesk` | Open the app and return the terminal prompt immediately. |
|
|
32
|
+
| `clidesk --wait` | Open the app and keep the terminal attached until the app closes. Useful for debugging. |
|
|
33
|
+
| `clidesk --debug-launch` | Print runtime paths and launch diagnostics. |
|
|
34
|
+
| `clidesk --version` | Print the installed CliDesk npm package version. |
|
|
35
|
+
| `clidesk --update` | Update CliDesk from npm using `npm i -g clidesk@latest`. |
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
- **Project-based terminal management** — organize multiple terminals per project.
|
|
40
|
+
- **File explorer and editor** — browse and edit project files.
|
|
41
|
+
- **Markdown preview** — preview `.md` files directly.
|
|
42
|
+
- **Manual Git panel** — view status, stage, commit, and push.
|
|
43
|
+
- **Vietnamese / English UI** — full i18n support.
|
|
44
|
+
- **Dark / Light theme** — switch anytime in Settings.
|
|
45
|
+
- **Local-first desktop app** — no cloud, no account required.
|
|
46
|
+
- **npm global launcher** — install once, run anywhere with `clidesk`.
|
|
24
47
|
|
|
25
48
|
## Requirements
|
|
26
49
|
|
|
27
50
|
- **Windows x64**
|
|
51
|
+
- **Node.js** and **npm**
|
|
28
52
|
- **Microsoft Edge WebView2 Runtime** — pre-installed on Windows 11 and Windows 10 (April 2018+). If missing, [download here](https://developer.microsoft.com/en-us/microsoft-edge/webview2/).
|
|
29
|
-
- **Git
|
|
53
|
+
- **Git** — optional, needed for the Git panel.
|
|
54
|
+
- **AI CLI tools** (Codex CLI, Claude CLI, DeepSeek CLI, etc.) — must be installed separately by the user.
|
|
55
|
+
|
|
56
|
+
## How It Works
|
|
57
|
+
|
|
58
|
+
1. During `npm i -g clidesk`, the npm package includes bundled Windows binaries.
|
|
59
|
+
2. When you run `clidesk`, the wrapper copies binaries to a per-version runtime cache:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
%LOCALAPPDATA%\CliDesk\npm-runtime\<version>\
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
3. The app runs from the runtime cache, **not** directly from `node_modules`.
|
|
66
|
+
4. This helps avoid Windows file-locking issues during npm update or uninstall.
|
|
67
|
+
|
|
68
|
+
## Update
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
clidesk --update
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Or manually:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm i -g clidesk@latest
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Uninstall
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm uninstall -g clidesk
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Privacy & Security
|
|
30
87
|
|
|
31
|
-
|
|
88
|
+
- CliDesk runs **locally** — no data is sent to external servers.
|
|
89
|
+
- Terminal output is **not logged** by default.
|
|
90
|
+
- CliDesk does **not** bundle API keys.
|
|
91
|
+
- External AI CLI tools are configured separately by the user.
|
|
92
|
+
- No administrator permission is required by default.
|
|
32
93
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
94
|
+
## Links
|
|
95
|
+
|
|
96
|
+
- **GitHub**: [github.com/vykelongthuong/CliDesk](https://github.com/vykelongthuong/CliDesk)
|
|
97
|
+
- **Issues**: [github.com/vykelongthuong/CliDesk/issues](https://github.com/vykelongthuong/CliDesk/issues)
|
|
98
|
+
- **npm**: [npmjs.com/package/clidesk](https://www.npmjs.com/package/clidesk)
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Tiếng Việt
|
|
103
|
+
|
|
104
|
+
CliDesk là ứng dụng desktop local để quản lý nhiều terminal theo project, tích hợp trình quản lý file, Git, và hỗ trợ các AI coding CLI tool.
|
|
105
|
+
|
|
106
|
+
### Cài đặt
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm i -g clidesk
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Chạy
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
clidesk
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- Lệnh `clidesk` sẽ mở app và trả terminal về prompt ngay.
|
|
119
|
+
- Chọn ngôn ngữ trong app ở lần chạy đầu tiên.
|
|
120
|
+
- Có thể đổi ngôn ngữ trong **Cài đặt**.
|
|
121
|
+
|
|
122
|
+
### Cập nhật
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
clidesk --update
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Hoặc:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npm i -g clidesk@latest
|
|
132
|
+
```
|
|
36
133
|
|
|
37
|
-
|
|
134
|
+
---
|
|
38
135
|
|
|
39
136
|
## License
|
|
40
137
|
|
package/bin/clidesk.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// CliDesk npm launcher.
|
|
3
3
|
//
|
|
4
|
+
// Default flow (clidesk):
|
|
5
|
+
// - Copy binaries to runtime cache
|
|
6
|
+
// - Spawn clidesk.exe directly (detached)
|
|
7
|
+
// - Return terminal prompt immediately
|
|
8
|
+
// - No terminal menu, no launcher interactive
|
|
9
|
+
//
|
|
10
|
+
// --wait: Use native launcher with --no-menu, keep terminal attached
|
|
11
|
+
// --debug-launch: Print debug info then launch app
|
|
12
|
+
// --version: Print npm package version
|
|
13
|
+
// --update: Run npm i -g clidesk@latest
|
|
14
|
+
//
|
|
4
15
|
// The package stores signed binaries in vendor/, but it never runs them from
|
|
5
16
|
// node_modules. Each package version is copied to a runtime cache first so npm
|
|
6
17
|
// can update or uninstall the global package without Windows keeping vendor/
|
|
@@ -8,10 +19,10 @@
|
|
|
8
19
|
|
|
9
20
|
const fs = require('fs');
|
|
10
21
|
const path = require('path');
|
|
11
|
-
const { execFileSync, spawn } = require('child_process');
|
|
22
|
+
const { execFileSync, spawn, execSync } = require('child_process');
|
|
12
23
|
|
|
13
24
|
const args = process.argv.slice(2);
|
|
14
|
-
const
|
|
25
|
+
const hasFlag = (flag) => args.includes(flag);
|
|
15
26
|
|
|
16
27
|
const packageRoot = path.resolve(__dirname, '..');
|
|
17
28
|
const pkg = require(path.join(packageRoot, 'package.json'));
|
|
@@ -32,8 +43,8 @@ const vendorLauncher = path.join(vendorDir, 'clidesk-launcher.exe');
|
|
|
32
43
|
|
|
33
44
|
const runtimeApp = path.join(runtimeDir, 'clidesk.exe');
|
|
34
45
|
const runtimeLauncher = path.join(runtimeDir, 'clidesk-launcher.exe');
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
|
|
47
|
+
// ── Helpers ────────────────────────────────────────────────────
|
|
37
48
|
|
|
38
49
|
function ensureFileExists(filePath, label) {
|
|
39
50
|
if (!fs.existsSync(filePath)) {
|
|
@@ -65,16 +76,7 @@ function copyIfMissing(src, dest) {
|
|
|
65
76
|
}
|
|
66
77
|
}
|
|
67
78
|
|
|
68
|
-
|
|
69
|
-
console.log('[CliDesk] packageRoot:', packageRoot);
|
|
70
|
-
console.log('[CliDesk] vendorDir:', vendorDir);
|
|
71
|
-
console.log('[CliDesk] runtimeDir:', runtimeDir);
|
|
72
|
-
console.log('[CliDesk] launcherPath:', runtimeLauncher);
|
|
73
|
-
console.log('[CliDesk] appPath:', runtimeApp);
|
|
74
|
-
console.log('[CliDesk] version:', version);
|
|
75
|
-
console.log('[CliDesk] latestVersion:', latestVersion || '(unknown)');
|
|
76
|
-
console.log('[CliDesk] updateAvailable:', updateAvailable ? 'true' : 'false');
|
|
77
|
-
}
|
|
79
|
+
// ── Version helpers ────────────────────────────────────────────
|
|
78
80
|
|
|
79
81
|
function readLatestVersion() {
|
|
80
82
|
try {
|
|
@@ -134,22 +136,69 @@ function parseVersion(value) {
|
|
|
134
136
|
return parts;
|
|
135
137
|
}
|
|
136
138
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
// ── Actions ────────────────────────────────────────────────────
|
|
140
|
+
|
|
141
|
+
function actionVersion() {
|
|
142
|
+
console.log(version);
|
|
143
|
+
process.exit(0);
|
|
144
|
+
}
|
|
140
145
|
|
|
141
|
-
|
|
142
|
-
|
|
146
|
+
function actionUpdate() {
|
|
147
|
+
console.log('[CliDesk] Cập nhật clidesk từ npm...');
|
|
148
|
+
try {
|
|
149
|
+
execSync('npm i -g clidesk@latest', {
|
|
150
|
+
stdio: 'inherit',
|
|
151
|
+
windowsHide: true,
|
|
152
|
+
});
|
|
153
|
+
console.log('[CliDesk] Cập nhật hoàn tất. Chạy clidesk để dùng bản mới.');
|
|
154
|
+
} catch (err) {
|
|
155
|
+
console.error('[CliDesk] Cập nhật thất bại.');
|
|
156
|
+
console.error(err.message || err);
|
|
157
|
+
process.exit(1);
|
|
143
158
|
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function printDebugInfo() {
|
|
162
|
+
const latestVersion = readLatestVersion();
|
|
163
|
+
const updateAvailable = latestVersion ? isVersionNewer(latestVersion, version) : false;
|
|
164
|
+
|
|
165
|
+
console.log('[CliDesk] packageRoot:', packageRoot);
|
|
166
|
+
console.log('[CliDesk] vendorDir:', vendorDir);
|
|
167
|
+
console.log('[CliDesk] runtimeDir:', runtimeDir);
|
|
168
|
+
console.log('[CliDesk] launcherPath:', runtimeLauncher);
|
|
169
|
+
console.log('[CliDesk] appPath:', runtimeApp);
|
|
170
|
+
console.log('[CliDesk] version:', version);
|
|
171
|
+
console.log('[CliDesk] latestVersion:', latestVersion || '(unknown)');
|
|
172
|
+
console.log('[CliDesk] updateAvailable:', updateAvailable ? 'true' : 'false');
|
|
173
|
+
}
|
|
144
174
|
|
|
145
|
-
|
|
175
|
+
function actionDebugLaunch() {
|
|
176
|
+
printDebugInfo();
|
|
177
|
+
// After debug info, launch app directly (detached) so terminal is free
|
|
178
|
+
console.log('[CliDesk] Khởi động CliDesk...');
|
|
179
|
+
const child = spawn(runtimeApp, [], {
|
|
146
180
|
cwd: runtimeDir,
|
|
147
181
|
env: {
|
|
148
182
|
...process.env,
|
|
149
183
|
CLIDESK_VERSION: version,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
184
|
+
CLIDESK_LAUNCH_LANG: '',
|
|
185
|
+
},
|
|
186
|
+
detached: true,
|
|
187
|
+
stdio: 'ignore',
|
|
188
|
+
windowsHide: true,
|
|
189
|
+
});
|
|
190
|
+
child.unref();
|
|
191
|
+
process.exit(0);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function actionWait() {
|
|
195
|
+
// Use native launcher with --no-menu flag for Job Object lifecycle
|
|
196
|
+
const child = spawn(runtimeLauncher, ['--no-menu'], {
|
|
197
|
+
cwd: runtimeDir,
|
|
198
|
+
env: {
|
|
199
|
+
...process.env,
|
|
200
|
+
CLIDESK_VERSION: version,
|
|
201
|
+
CLIDESK_LAUNCH_LANG: '',
|
|
153
202
|
},
|
|
154
203
|
stdio: 'inherit',
|
|
155
204
|
windowsHide: false,
|
|
@@ -161,18 +210,68 @@ function main() {
|
|
|
161
210
|
|
|
162
211
|
child.on('error', (err) => {
|
|
163
212
|
console.error('[CliDesk] Không thể chạy launcher:', err.message);
|
|
164
|
-
console.error('[CliDesk] Path:', runtimeLauncher);
|
|
165
213
|
process.exit(1);
|
|
166
214
|
});
|
|
167
215
|
}
|
|
168
216
|
|
|
217
|
+
function actionDefault() {
|
|
218
|
+
// Copy binaries to runtime cache
|
|
219
|
+
copyIfMissing(vendorApp, runtimeApp);
|
|
220
|
+
copyIfMissing(vendorLauncher, runtimeLauncher);
|
|
221
|
+
|
|
222
|
+
// Spawn app directly (detached), no launcher, no terminal menu
|
|
223
|
+
const child = spawn(runtimeApp, [], {
|
|
224
|
+
cwd: runtimeDir,
|
|
225
|
+
env: {
|
|
226
|
+
...process.env,
|
|
227
|
+
CLIDESK_VERSION: version,
|
|
228
|
+
CLIDESK_LAUNCH_LANG: '',
|
|
229
|
+
},
|
|
230
|
+
detached: true,
|
|
231
|
+
stdio: 'ignore',
|
|
232
|
+
windowsHide: true,
|
|
233
|
+
});
|
|
234
|
+
child.unref();
|
|
235
|
+
process.exit(0);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// ── Main ───────────────────────────────────────────────────────
|
|
239
|
+
|
|
240
|
+
function main() {
|
|
241
|
+
// Handle flags that don't need binaries
|
|
242
|
+
if (hasFlag('--version') || hasFlag('-v')) {
|
|
243
|
+
actionVersion();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (hasFlag('--update')) {
|
|
247
|
+
actionUpdate();
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Ensure binaries exist in runtime cache
|
|
251
|
+
try {
|
|
252
|
+
copyIfMissing(vendorApp, runtimeApp);
|
|
253
|
+
copyIfMissing(vendorLauncher, runtimeLauncher);
|
|
254
|
+
} catch (err) {
|
|
255
|
+
console.error('[CliDesk] Không thể chuẩn bị runtime CliDesk.');
|
|
256
|
+
console.error('[CliDesk] Lỗi:', err && err.message ? err.message : err);
|
|
257
|
+
process.exit(1);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (hasFlag('--debug-launch')) {
|
|
261
|
+
actionDebugLaunch();
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (hasFlag('--wait')) {
|
|
265
|
+
actionWait();
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Default: launch app detached, return prompt immediately
|
|
269
|
+
actionDefault();
|
|
270
|
+
}
|
|
271
|
+
|
|
169
272
|
try {
|
|
170
273
|
main();
|
|
171
274
|
} catch (err) {
|
|
172
|
-
console.error('[CliDesk]
|
|
173
|
-
console.error('[CliDesk] Lỗi:', err && err.message ? err.message : err);
|
|
174
|
-
if (debug) {
|
|
175
|
-
printDebugInfo();
|
|
176
|
-
}
|
|
275
|
+
console.error('[CliDesk] Lỗi không xác định:', err && err.message ? err.message : err);
|
|
177
276
|
process.exit(1);
|
|
178
277
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clidesk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.8",
|
|
4
|
+
"description": "Local desktop dashboard for project-based terminals and AI coding CLI tools.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"homepage": "https://github.com/vykelongthuong/CliDesk#readme",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "git+https://github.com/vykelongthuong/CliDesk.git"
|
|
9
10
|
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/vykelongthuong/CliDesk/issues"
|
|
13
|
+
},
|
|
10
14
|
"bin": {
|
|
11
15
|
"clidesk": "bin/clidesk.js"
|
|
12
16
|
},
|
|
@@ -27,9 +31,14 @@
|
|
|
27
31
|
],
|
|
28
32
|
"keywords": [
|
|
29
33
|
"clidesk",
|
|
30
|
-
"desktop",
|
|
31
|
-
"dashboard",
|
|
32
34
|
"terminal",
|
|
33
|
-
"
|
|
35
|
+
"terminal-dashboard",
|
|
36
|
+
"ai-cli",
|
|
37
|
+
"coding-agent",
|
|
38
|
+
"developer-tools",
|
|
39
|
+
"tauri",
|
|
40
|
+
"xterm",
|
|
41
|
+
"git",
|
|
42
|
+
"desktop-app"
|
|
34
43
|
]
|
|
35
44
|
}
|
|
Binary file
|
package/vendor/clidesk.exe
CHANGED
|
Binary file
|