@luxkit/cli 1.0.8 → 1.1.1

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 CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  ### What is lux?
20
20
 
21
- `lux` is a CLI tool that initializes project formatting configs and VSCode workspace settings with a single command. It generates ESLint, Prettier, Stylelint, CSpell, EditorConfig files and VSCode settings from battle-tested presets — with smart merge and conflict resolution.
21
+ `lux` is a CLI tool that initializes project formatting configs and VSCode workspace settings with a single command. It generates ESLint, Prettier, CSpell, EditorConfig files and VSCode settings from battle-tested presets — with smart merge and conflict resolution.
22
22
 
23
23
  <div align="center">
24
24
  <img src="https://github.com/TTT1231/lux/blob/main/demo.gif?raw=true" alt="lux demo" width="640" />
@@ -26,19 +26,19 @@
26
26
 
27
27
  ### ✨ Key Highlights
28
28
 
29
- | Feature | Description |
30
- | :------------------------- | :----------------------------------------------------------------------------- |
31
- | 🎯 **One Command Setup** | `lux fmt web-vue` generates all linting & formatting configs instantly |
32
- | 🔧 **5 Fmt Presets** | `web-vue` · `electron-vue` · `uniapp` · `node` · `nest` — each with curated rules |
33
- | 🖥️ **6 VSCode Presets** | `web-vue` · `electron-vue` · `uniapp` · `node` · `nest` · `go` — settings + extensions |
34
- | 🔀 **Smart Merge** | Preset wins for linting keys; user wins for personal preferences |
35
- | 🛡️ **Conflict Resolution** | `neverOverwrite` / `forceOverwrite` lists + `--force` flag |
36
- | 📦 **Auto Install** | Detects bun / pnpm / yarn / npm and installs devDependencies |
37
- | 🔍 **Fuzzy Matching** | Typo a preset name? Levenshtein distance finds the closest match |
38
- | 🧪 **Dry Run** | Preview all changes with `--dry-run` before writing anything |
39
- | 🔗 **Script Injection** | Auto-injects `<pm> lint` / `<pm> format` scripts into package.json |
40
- | 🌐 **Proxy Management** | Persistent proxy config with `set` / `unset` — copy to CMD / PowerShell / Bash |
41
- | 🔄 **Self-Update** | `lux update` checks and installs the latest version automatically |
29
+ | Feature | Description |
30
+ | :------------------------- | :--------------------------------------------------------------------------------------------------- |
31
+ | 🎯 **One Command Setup** | `lux fmt web-vue` generates all linting & formatting configs instantly |
32
+ | 🔧 **6 Fmt Presets** | `web-vue` · `web-react` · `electron-vue` · `uniapp` · `node` · `nest` — each with curated rules |
33
+ | 🖥️ **7 VSCode Presets** | `web-vue` · `web-react` · `electron-vue` · `uniapp` · `node` · `nest` · `go` — settings + extensions |
34
+ | 🔀 **Smart Merge** | Preset wins for linting keys; user wins for personal preferences |
35
+ | 🛡️ **Conflict Resolution** | `neverOverwrite` / `forceOverwrite` lists + `--force` flag |
36
+ | 📦 **Auto Install** | Detects bun / pnpm / yarn / npm and installs devDependencies |
37
+ | 🔍 **Fuzzy Matching** | Typo a preset name? Levenshtein distance finds the closest match |
38
+ | 🧪 **Dry Run** | Preview all changes with `--dry-run` before writing anything |
39
+ | 🔗 **Script Injection** | Auto-injects `<pm> lint` / `<pm> format` scripts into package.json |
40
+ | 🌐 **Proxy Management** | Persistent proxy config with `set` / `unset` — copy to CMD / PowerShell / Bash |
41
+ | 🔄 **Self-Update** | `lux update` checks and installs the latest version automatically |
42
42
 
43
43
  <br />
44
44
 
@@ -51,11 +51,16 @@ npm install -g @luxkit/cli
51
51
  bun add -g @luxkit/cli
52
52
 
53
53
  # Initialize formatting configs
54
- lux fmt web-vue # Generate ESLint, Prettier, Stylelint, CSpell, EditorConfig
54
+ lux fmt web-vue # Generate ESLint, Prettier, CSpell
55
+ lux fmt web-vue --stylelint # Also include Stylelint
56
+ lux fmt web-vue --editorconfig # Also include EditorConfig
55
57
 
56
58
  # Initialize VSCode settings
57
59
  lux vscode web-vue # Generate .vscode/settings.json + extensions.json
58
60
 
61
+ # Initialize AI coding tool skills
62
+ lux init # Select tool interactively, copy skills to project
63
+
59
64
  # List available presets
60
65
  lux fmt list
61
66
  lux vscode list
@@ -65,33 +70,34 @@ lux vscode list
65
70
 
66
71
  ### CLI Commands
67
72
 
68
- | Command | Description |
69
- | :-------------------------- | :------------------------------------------------- |
70
- | `lux fmt <preset>` | Initialize formatting config files |
71
- | `lux fmt list` | List available fmt presets |
72
- | `lux vscode <preset>` | Initialize VSCode workspace settings |
73
- | `lux vscode list` | List available VSCode presets |
73
+ | Command | Description |
74
+ | :-------------------------- | :---------------------------------------------------------------- |
75
+ | `lux fmt <preset>` | Initialize formatting config files |
76
+ | `lux fmt list` | List available fmt presets |
77
+ | `lux vscode <preset>` | Initialize VSCode workspace settings |
78
+ | `lux vscode list` | List available VSCode presets |
79
+ | `lux init` | Initialize AI coding tool skills in current project |
74
80
  | `lux set <key=value> [...]` | Persist proxy env vars (e.g. `https_proxy=http://127.0.0.1:7890`) |
75
- | `lux unset` | Clear all stored proxy configuration |
76
- | `lux show env` | Display stored proxy environment variables |
77
- | `lux vpn cmd` | Copy CMD proxy commands to clipboard |
78
- | `lux vpn pw` | Copy PowerShell proxy commands to clipboard |
79
- | `lux vpn bash` | Copy Bash proxy commands to clipboard |
80
- | `lux update` | Update `@luxkit/cli` to the latest version |
81
- | `lux update --check` | Check for available updates without installing |
81
+ | `lux unset` | Clear all stored proxy configuration |
82
+ | `lux show env` | Display stored proxy environment variables |
83
+ | `lux vpn cmd` | Copy CMD proxy commands to clipboard |
84
+ | `lux vpn pw` | Copy PowerShell proxy commands to clipboard |
85
+ | `lux vpn bash` | Copy Bash proxy commands to clipboard |
86
+ | `lux update` | Update `@luxkit/cli` to the latest version |
87
+ | `lux update --check` | Check for available updates without installing |
82
88
 
83
89
  <br />
84
90
 
85
91
  ### Available Presets
86
92
 
87
- | Preset | Fmt | VSCode | Stack |
88
- | :--------- | :-: | :----: | :--------------------------- |
89
- | `web-vue` | ✅ | ✅ | Vue / React / TS / CSS |
90
- | `electron-vue` | ✅ | ✅ | Electron + Web stack |
91
- | `uniapp` | ✅ | ✅ | UniApp / WeChat Mini Program |
92
- | `node` | ✅ | ✅ | Node.js backend |
93
- | `nest` | ✅ | ✅ | NestJS backend |
94
- | `go` | — | ✅ | Go backend |
93
+ | Preset | Fmt | VSCode | Stack |
94
+ | :------------- | :-: | :----: | :------------------------- |
95
+ | `web-vue` | ✅ | ✅ | Vue 3 / Vite / TS / CSS |
96
+ | `web-react` | ✅ | ✅ | React / Vite / TS / CSS |
97
+ | `electron-vue` | ✅ | ✅ | Electron + Vue / Web stack |
98
+ | `node` | ✅ | ✅ | Node.js backend |
99
+ | `nest` | ✅ | ✅ | NestJS backend |
100
+ | `go` | — | ✅ | Go backend |
95
101
 
96
102
  <br />
97
103
 
@@ -100,9 +106,12 @@ lux vscode list
100
106
  ```bash
101
107
  lux fmt <preset> [options]
102
108
 
103
- --force Force overwrite existing files
104
- --no-install Skip dependency installation
105
- --dry-run Preview without writing files
109
+ --force Force overwrite existing files
110
+ --no-install Skip dependency installation
111
+ --dry-run Preview without writing files
112
+ --stylelint Include Stylelint config generation (opt-in)
113
+ --editorconfig Include EditorConfig config generation (opt-in)
114
+ --reset Reset local preset and re-create from built-in defaults
106
115
  ```
107
116
 
108
117
  <br />
@@ -116,6 +125,12 @@ lux fmt web-vue
116
125
  Parse CLI args ──► Resolve preset (fuzzy match on typo)
117
126
 
118
127
 
128
+ Local preset exists in ~/.lux/preset/?
129
+
130
+ ├── Yes ──► Copy files from local preset (editable, survives updates)
131
+ └── No ──► Generate from built-in ──► Save to ~/.lux/preset/ for reuse
132
+
133
+
119
134
  For each config file:
120
135
 
121
136
  ├── File not found? ──► Create
@@ -142,7 +157,7 @@ lux fmt web-vue
142
157
  | Test | Vitest (unit + acceptance) |
143
158
  | CLI | Commander.js |
144
159
  | Output | Chalk |
145
- | Bundle | Zero runtime deps (chalk + commander only) |
160
+ | Bundle | Minimal runtime deps (chalk + commander + @clack/prompts) |
146
161
 
147
162
  <br />
148
163