uxos 0.0.22 → 0.0.23

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.
Files changed (3) hide show
  1. package/README.md +29 -0
  2. package/cli.js +36 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,12 +4,31 @@ UXOS - 设计效率助手:一个由 AI 驱动的、具有引导式工作流的
4
4
 
5
5
  ## 安装方法
6
6
 
7
+ **⚠️ 重要提示**:首次安装或更新时,请使用以下命令清除缓存:
8
+
9
+ ```bash
10
+ # 清除 npm 缓存
11
+ npm cache clean --force
12
+
13
+ # 删除 npx 缓存
14
+ rm -rf ~/.npm/_npx
15
+ ```
16
+
17
+ **方法一:通过 AI 助手安装**
18
+
7
19
  在 CodeBuddy 的 AI 助手中输入以下指令:
8
20
 
9
21
  ```
10
22
  帮我安装 npx uxos
11
23
  ```
12
24
 
25
+ **方法二:命令行安装**
26
+
27
+ ```bash
28
+ # 强制安装最新版本
29
+ npx --yes uxos@latest
30
+ ```
31
+
13
32
  然后跟随 AI 助手的指引即可完成安装。
14
33
 
15
34
  ## 使用说明
@@ -33,6 +52,16 @@ UXOS - 设计效率助手:一个由 AI 驱动的、具有引导式工作流的
33
52
 
34
53
  ### 如何查看已安装的版本?
35
54
 
55
+ **方式一:命令行查看**
56
+
57
+ ```bash
58
+ npx uxos --version
59
+ # 或
60
+ npx uxos -v
61
+ ```
62
+
63
+ **方式二:通过 AI 助手查看**
64
+
36
65
  在 AI 助手中输入:
37
66
  ```
38
67
  查看 uxos 版本
package/cli.js CHANGED
@@ -3,6 +3,10 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
 
6
+ // Read version from package.json
7
+ const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
8
+ const VERSION = packageJson.version;
9
+
6
10
  const UXOS_SRC_DIR = path.join(__dirname, '_uxos');
7
11
 
8
12
  function createDirectory(dir) {
@@ -42,9 +46,41 @@ function copyDirectory(src, dest) {
42
46
  }
43
47
 
44
48
  function main() {
49
+ // Check for --version flag
50
+ if (process.argv.includes('--version') || process.argv.includes('-v')) {
51
+ console.log(VERSION);
52
+ return;
53
+ }
54
+
55
+ // Check for old version structure and warn user
56
+ const oldWorkflowsDir = path.join(__dirname, 'workflows');
57
+ const oldTemplatesDir = path.join(__dirname, 'templates');
58
+ if (fs.existsSync(oldWorkflowsDir) || fs.existsSync(oldTemplatesDir)) {
59
+ console.log(`
60
+ ═══════════════════════════════════════════════════════════
61
+ ⚠️ WARNING: OLD VERSION DETECTED
62
+ ═══════════════════════════════════════════════════════════
63
+
64
+ You are using an outdated version of UXOS.
65
+
66
+ To update to the latest version, run:
67
+
68
+ npm cache clean --force
69
+ rm -rf ~/.npm/_npx
70
+ npx --yes uxos@latest
71
+
72
+ Current version: OLD (0.0.21 or earlier)
73
+ Latest version: 0.0.22+
74
+
75
+ For more information, visit: https://www.npmjs.com/package/uxos
76
+ `);
77
+ process.exit(1);
78
+ }
79
+
45
80
  console.log(`
46
81
  ═══════════════════════════════════════════════════════════
47
82
  UXOS INSTALLER
83
+ Version: ${VERSION}
48
84
  ═══════════════════════════════════════════════════════════
49
85
 
50
86
  Installing UXOS workflow system...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uxos",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "UXOS - Design Efficiency Assistant: A guided workflow system for AI-powered design collaboration",
5
5
  "main": "cli.js",
6
6
  "bin": {