@funnycode/myclaude 0.1.51 → 0.1.52
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 +245 -356
- package/README.zh-CN.md +245 -356
- package/dist/myclaude.js +2 -2
- package/dist/myclaude.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,356 +1,245 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| `/
|
|
81
|
-
| `/
|
|
82
|
-
| `/
|
|
83
|
-
| `/
|
|
84
|
-
| `/
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
|
91
|
-
|
|
92
|
-
| `/
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
|
100
|
-
|
|
101
|
-
| `/
|
|
102
|
-
| `/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
/help # All commands (including ECC) appear in the help list
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## Git Flow Workflow
|
|
252
|
-
|
|
253
|
-
Built-in Git Flow commands for branch-based development workflows.
|
|
254
|
-
|
|
255
|
-
| Command | Description |
|
|
256
|
-
|---------|-------------|
|
|
257
|
-
| `/new-feature <name> [from]` | Create feature branch from `main` (default) or `[from]` |
|
|
258
|
-
| `/finish-feature [target]` | Merge current feature branch to `main` (default) or `[target]` |
|
|
259
|
-
| `/new-release <version> [from]` | Create release branch from `main` (default) or `[from]` |
|
|
260
|
-
| `/finish-release` | Merge current release branch to `main` and `develop` |
|
|
261
|
-
| `/new-hotfix <name> [from]` | Create hotfix branch from `main` (default) or `[from]` |
|
|
262
|
-
| `/finish-hotfix` | Merge current hotfix branch to `main` and `develop` |
|
|
263
|
-
|
|
264
|
-
**Examples:**
|
|
265
|
-
```bash
|
|
266
|
-
/new-feature user-auth # feature/user-auth from main
|
|
267
|
-
/new-feature api-rate-limit develop # feature/api-rate-limit from develop
|
|
268
|
-
/finish-feature # merge current feature/* to main
|
|
269
|
-
/finish-feature develop # merge current feature/* to develop
|
|
270
|
-
/new-release 1.2.0 # release/1.2.0 from main
|
|
271
|
-
/new-hotfix security-patch # hotfix/security-patch from main
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
## Environment Variables
|
|
277
|
-
|
|
278
|
-
Supports both `MYCLAUDE_*` and `CLAUDE_CODE_*` names.
|
|
279
|
-
`CLAUDE_CODE_*` takes priority if both are set.
|
|
280
|
-
|
|
281
|
-
| Variable | Description |
|
|
282
|
-
|----------|-------------|
|
|
283
|
-
| `ANTHROPIC_API_KEY` / `MYCLAUDE_API_KEY` | API key (required) |
|
|
284
|
-
| `ANTHROPIC_BASE_URL` / `MYCLAUDE_BASE_URL` | Custom API base URL |
|
|
285
|
-
| `MYCLAUDE_MODEL` | Model override |
|
|
286
|
-
| `MYCLAUDE_SIMPLE` | Simple mode (no TUI) |
|
|
287
|
-
| `MYCLAUDE_BRIEF` | Brief mode |
|
|
288
|
-
| `MYCLAUDE_DISABLE_THINKING` | Disable extended thinking |
|
|
289
|
-
| `MYCLAUDE_PROACTIVE` | Proactive mode |
|
|
290
|
-
| `MYCLAUDE_USE_BEDROCK` | Use AWS Bedrock |
|
|
291
|
-
| `MYCLAUDE_USE_VERTEX` | Use Google Vertex AI |
|
|
292
|
-
| `MYCLAUDE_USE_FOUNDRY` | Use Microsoft Foundry |
|
|
293
|
-
| `MYCLAUDE_DISABLE_AUTO_MEMORY` | Disable auto memory |
|
|
294
|
-
| `MYCLAUDE_SYNTAX_HIGHLIGHT` | Syntax highlight theme |
|
|
295
|
-
| `MYCLAUDE_IDLE_THRESHOLD_MINUTES` | Idle timeout (default: 75) |
|
|
296
|
-
| `MYCLAUDE_EFFORT_LEVEL` | Effort level |
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## Development
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
git clone https://github.com/thomaslwq/myclaude.git
|
|
304
|
-
cd myclaude
|
|
305
|
-
bun install
|
|
306
|
-
bun run dev # Development mode
|
|
307
|
-
bun run build # Build to dist/myclaude.mjs
|
|
308
|
-
bun run version # Verify CLI boots
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
### Build Output
|
|
312
|
-
|
|
313
|
-
The build script bundles `src/entrypoints/cli.tsx` into a single file `dist/myclaude.mjs`, injecting compile-time constants such as version number.
|
|
314
|
-
|
|
315
|
-
### Directory Structure
|
|
316
|
-
|
|
317
|
-
```
|
|
318
|
-
src/
|
|
319
|
-
├── achievements/ # Achievement system (types, storage, checker)
|
|
320
|
-
├── buddy/ # BUDDY companion (sprites, animations, evolution, types)
|
|
321
|
-
├── commands/ # Slash command implementations
|
|
322
|
-
├── components/ # React Ink UI components
|
|
323
|
-
├── events/ # Event calendar (seasonal easter eggs)
|
|
324
|
-
├── services/ # Backend services (API, MCP, analytics)
|
|
325
|
-
├── tools/ # Tool implementations
|
|
326
|
-
├── utils/ # Shared utilities (envCompat, config, etc.)
|
|
327
|
-
├── entrypoints/ # CLI entry points
|
|
328
|
-
└── main.tsx # TUI main entry
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## Contributing
|
|
334
|
-
|
|
335
|
-
Pull requests are welcome!
|
|
336
|
-
|
|
337
|
-
### Guidelines
|
|
338
|
-
|
|
339
|
-
- Fork the repo and create a feature branch
|
|
340
|
-
- Keep changes focused and minimal
|
|
341
|
-
- Test your changes before submitting
|
|
342
|
-
- Open a PR against the `main` branch
|
|
343
|
-
|
|
344
|
-
---
|
|
345
|
-
|
|
346
|
-
## Links
|
|
347
|
-
|
|
348
|
-
- **GitHub**: [https://github.com/thomaslwq/myclaude](https://github.com/thomaslwq/myclaude)
|
|
349
|
-
- **Gitee**: [https://gitee.com/thomaslwq/myclaude](https://gitee.com/thomaslwq/myclaude) (mirror)
|
|
350
|
-
- **npm**: [https://www.npmjs.com/package/@funnycode/myclaude](https://www.npmjs.com/package/@funnycode/myclaude)
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
## License
|
|
355
|
-
|
|
356
|
-
MIT
|
|
1
|
+
# 🎭 myclaude
|
|
2
|
+
|
|
3
|
+
> **Your AI coding sidekick in the terminal — write smarter, ship faster.**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @funnycode/myclaude
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@funnycode/myclaude)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## ✨ What Makes MyClaude Different?
|
|
15
|
+
|
|
16
|
+
| | Feature | Why You'll Love It |
|
|
17
|
+
|---|---------|-------------------|
|
|
18
|
+
| 🐾 | **BUDDY Pet** | A virtual pet grows as you code — hatch it, feed it, play with it. 18 species, legendary rarity, shiny variants. |
|
|
19
|
+
| 🏆 | **Achievements** | Unlock 20+ achievements. Streaks, milestones, discoveries — your coding journey gamified. |
|
|
20
|
+
| 🎯 | **Frontend TDD** | `/frontend-tdd` — Red-Green-Refactor workflow for frontend testing, built right in. |
|
|
21
|
+
| 🌊 | **Git Flow** | `/new-feature`, `/finish-release`, `/new-hotfix` — full Git Flow workflow as slash commands. |
|
|
22
|
+
| 🤖 | **ECC Built-in** | 76+ commands and 246+ skills loaded at startup — zero setup. |
|
|
23
|
+
| 🧠 | **AI Chat** | Write, refactor, debug, and explain code. Multi-model (Anthropic, Bedrock, Vertex, Foundry). |
|
|
24
|
+
| 🎨 | **Beautiful TUI** | React Ink terminal UI with themes, Vim mode, syntax highlighting. |
|
|
25
|
+
| 🔌 | **Plugins & MCP** | Extend with plugins, MCP servers, custom skills. |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🚀 Start in 10 Seconds
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Set your API key
|
|
33
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
34
|
+
|
|
35
|
+
# Run instantly (no install needed)
|
|
36
|
+
npx @funnycode/myclaude
|
|
37
|
+
|
|
38
|
+
# Or install globally
|
|
39
|
+
npm install -g @funnycode/myclaude
|
|
40
|
+
myclaude
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Prerequisites:** Bun ≥ 1.3.5 (or Node.js ≥ 22.17) · Git
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 🎮 Slash Commands at a Glance
|
|
48
|
+
|
|
49
|
+
### 📍 Essential
|
|
50
|
+
| Command | What it does |
|
|
51
|
+
|---------|-------------|
|
|
52
|
+
| `/help` | Show help |
|
|
53
|
+
| `/config` | Configure settings |
|
|
54
|
+
| `/doctor` | Diagnose & verify installation |
|
|
55
|
+
| `/model` | Switch AI model |
|
|
56
|
+
| `/effort` | Set effort level |
|
|
57
|
+
|
|
58
|
+
### 🧪 Testing & Quality
|
|
59
|
+
| Command | What it does |
|
|
60
|
+
|---------|-------------|
|
|
61
|
+
| **`/frontend-tdd <description>`** | **TDD Red-Green-Refactor cycle for frontend features** |
|
|
62
|
+
| `/review` | Review a pull request |
|
|
63
|
+
| `/plan` | Create an implementation plan |
|
|
64
|
+
|
|
65
|
+
### 🌊 Git Flow
|
|
66
|
+
| Command | What it does |
|
|
67
|
+
|---------|-------------|
|
|
68
|
+
| `/new-feature <name> [from]` | Create feature branch from `main` |
|
|
69
|
+
| `/finish-feature [target]` | Merge feature to `main` |
|
|
70
|
+
| `/new-release <version> [from]` | Create release branch |
|
|
71
|
+
| `/finish-release` | Merge release to `main` & `develop` |
|
|
72
|
+
| `/new-hotfix <name> [from]` | Create hotfix branch |
|
|
73
|
+
| `/finish-hotfix` | Merge hotfix to `main` & `develop` |
|
|
74
|
+
| `/commit` | Generate a git commit |
|
|
75
|
+
|
|
76
|
+
### 🐾 BUDDY & Achievements
|
|
77
|
+
| Command | What it does |
|
|
78
|
+
|---------|-------------|
|
|
79
|
+
| `/buddy hatch` | Hatch a new companion |
|
|
80
|
+
| `/buddy pet` | Pet your buddy (+5 XP ❤️) |
|
|
81
|
+
| `/buddy feed` | Feed your buddy (+15 XP) |
|
|
82
|
+
| `/buddy play` | Play with your buddy (+20 XP) |
|
|
83
|
+
| `/buddy card` | View stats & milestones |
|
|
84
|
+
| `/achievements` | Track your unlocks |
|
|
85
|
+
|
|
86
|
+
### 🔌 Integrations
|
|
87
|
+
| Command | What it does |
|
|
88
|
+
|---------|-------------|
|
|
89
|
+
| `/mcp` | Manage MCP servers |
|
|
90
|
+
| `/plugin` | Install & manage plugins |
|
|
91
|
+
| `/hooks` | Manage hooks |
|
|
92
|
+
| `/skills` | List available skills |
|
|
93
|
+
|
|
94
|
+
### ⚙️ System
|
|
95
|
+
| Command | What it does |
|
|
96
|
+
|---------|-------------|
|
|
97
|
+
| `/status` | Session & auth status |
|
|
98
|
+
| `/vim` | Toggle Vim mode |
|
|
99
|
+
| `/theme` | Change UI theme |
|
|
100
|
+
| `/keybindings` | Customize shortcuts |
|
|
101
|
+
| `/memory` | Manage AI memory |
|
|
102
|
+
| `/feedback` | Submit feedback |
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 🐾 BUDDY — Your Terminal Pet
|
|
107
|
+
|
|
108
|
+
myclaude has a virtual pet that **lives in your terminal**. It's generated from your user ID — **yours is unique, no two alike**.
|
|
109
|
+
|
|
110
|
+
### 18 Species
|
|
111
|
+
|
|
112
|
+
🦆 Duck · 🪿 Goose · 🫧 Blob · 🐱 Cat · 🐉 Dragon · 🐙 Octopus · 🦉 Owl
|
|
113
|
+
🐧 Penguin · 🐢 Turtle · 🐌 Snail · 👻 Ghost · 🦎 Axolotl · 🦫 Capybara
|
|
114
|
+
🌵 Cactus · 🤖 Robot · 🐰 Rabbit · 🍄 Mushroom · 🐈 Chonk
|
|
115
|
+
|
|
116
|
+
### Rarity & Stats
|
|
117
|
+
|
|
118
|
+
| Rarity | Odds | Stars |
|
|
119
|
+
|--------|------|-------|
|
|
120
|
+
| Common | 60% | ★ |
|
|
121
|
+
| Uncommon | 25% | ★★ |
|
|
122
|
+
| Rare | 10% | ★★★ |
|
|
123
|
+
| Epic | 4% | ★★★★ |
|
|
124
|
+
| Legendary | **1%** | ★★★★★ |
|
|
125
|
+
| ✨ Shiny | **1%** (independent) | Sparkles! |
|
|
126
|
+
|
|
127
|
+
Each companion has 5 stats: `DEBUGGING`, `PATIENCE`, `CHAOS`, `WISDOM`, `SNARK`. Gain XP, level up (max 50), and **evolve** into new forms.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 🎯 Frontend TDD
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
/frontend-tdd Create a user login form with email validation
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This command guides the AI through the **Red-Green-Refactor** cycle:
|
|
138
|
+
|
|
139
|
+
🔴 **Red** → Write a failing test first
|
|
140
|
+
🟢 **Green** → Minimum code to pass
|
|
141
|
+
🔵 **Refactor** → Clean up, keep the test green
|
|
142
|
+
|
|
143
|
+
It includes frontend-specific testing best practices: Testing Library behavior queries, `user-event` over `fireEvent`, async handling with `waitFor`/`findBy*`, MSW for API mocking, and accessibility-first selectors.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 🌊 Git Flow Workflow
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
/new-feature user-auth # feature/user-auth from main
|
|
151
|
+
/new-feature api-rate-limit develop # feature/api-rate-limit from develop
|
|
152
|
+
/finish-feature # merge to main
|
|
153
|
+
/finish-feature develop # merge to develop instead
|
|
154
|
+
/new-release 1.2.0 # release/1.2.0 from main
|
|
155
|
+
/new-hotfix security-patch # hotfix/security-patch from main
|
|
156
|
+
/finish-hotfix # merge to main & develop
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
All commands default to `main` and accept an optional `[from]` or `[target]` argument.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 🔌 Built-in Integrations
|
|
164
|
+
|
|
165
|
+
### CodeGraph — Semantic Code Intelligence
|
|
166
|
+
Auto-detects `codegraph` CLI and enables it as a built-in plugin for surgical code context.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npm i -g @colbymchenry/codegraph
|
|
170
|
+
cd your-project
|
|
171
|
+
codegraph init
|
|
172
|
+
/plugin enable codegraph
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### ECC — Agent Operating System
|
|
176
|
+
**76+ commands and 246+ skills** are loaded at startup — no install, no config. Just start typing `/`.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## ⚙️ Environment Variables
|
|
181
|
+
|
|
182
|
+
Use `MYCLAUDE_*` or `CLAUDE_CODE_*` (the latter takes priority).
|
|
183
|
+
|
|
184
|
+
| Key Variables | What it does |
|
|
185
|
+
|--------------|-------------|
|
|
186
|
+
| `ANTHROPIC_API_KEY` / `MYCLAUDE_API_KEY` | API key (required) |
|
|
187
|
+
| `ANTHROPIC_BASE_URL` | Custom API endpoint |
|
|
188
|
+
| `MYCLAUDE_MODEL` | Override model |
|
|
189
|
+
| `MYCLAUDE_SIMPLE` | Non-TUI mode |
|
|
190
|
+
| `MYCLAUDE_DISABLE_THINKING` | Skip extended thinking |
|
|
191
|
+
| `MYCLAUDE_USE_BEDROCK` | AWS Bedrock provider |
|
|
192
|
+
| `MYCLAUDE_USE_VERTEX` | Google Vertex AI provider |
|
|
193
|
+
| `MYCLAUDE_USE_FOUNDRY` | Microsoft Foundry provider |
|
|
194
|
+
| `MYCLAUDE_SYNTAX_HIGHLIGHT` | Highlight theme |
|
|
195
|
+
| `MYCLAUDE_IDLE_THRESHOLD_MINUTES` | Idle timeout (default: 75) |
|
|
196
|
+
| `MYCLAUDE_EFFORT_LEVEL` | Effort level |
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## 🛠 Dev
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
git clone https://github.com/thomaslwq/myclaude.git
|
|
204
|
+
cd myclaude
|
|
205
|
+
bun install
|
|
206
|
+
bun run dev # Dev mode
|
|
207
|
+
bun run build # Bundle to dist/myclaude.mjs
|
|
208
|
+
bun run version # Verify CLI boots
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Structure
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
src/
|
|
215
|
+
├── achievements/ # Achievement system
|
|
216
|
+
├── buddy/ # BUDDY companion (sprites, evolution)
|
|
217
|
+
├── commands/ # All slash commands
|
|
218
|
+
├── components/ # React Ink UI
|
|
219
|
+
├── events/ # Calendar & seasonal easter eggs
|
|
220
|
+
├── services/ # API, MCP, analytics
|
|
221
|
+
├── tools/ # Tool implementations
|
|
222
|
+
├── utils/ # Shared utilities
|
|
223
|
+
├── entrypoints/ # CLI entry points
|
|
224
|
+
└── main.tsx # TUI main entry
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 🤝 Contributing
|
|
230
|
+
|
|
231
|
+
PRs welcome! Fork → branch → small focused changes → test → PR.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 📎 Links
|
|
236
|
+
|
|
237
|
+
- **GitHub**: [github.com/thomaslwq/myclaude](https://github.com/thomaslwq/myclaude)
|
|
238
|
+
- **Gitee**: [gitee.com/thomaslwq/myclaude](https://gitee.com/thomaslwq/myclaude)
|
|
239
|
+
- **npm**: [npmjs.com/package/@funnycode/myclaude](https://www.npmjs.com/package/@funnycode/myclaude)
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## 📄 License
|
|
244
|
+
|
|
245
|
+
MIT
|
package/README.zh-CN.md
CHANGED
|
@@ -1,356 +1,245 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| `/
|
|
81
|
-
| `/
|
|
82
|
-
| `/
|
|
83
|
-
| `/
|
|
84
|
-
| `/
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
|
91
|
-
|
|
92
|
-
| `/
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
|
100
|
-
|
|
101
|
-
| `/
|
|
102
|
-
| `/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
/help # 所有命令(包括 ECC)都会出现在帮助列表中
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## Git Flow 工作流
|
|
252
|
-
|
|
253
|
-
内置的 Git Flow 命令,用于基于分支的开发工作流。
|
|
254
|
-
|
|
255
|
-
| 命令 | 说明 |
|
|
256
|
-
|------|------|
|
|
257
|
-
| `/new-feature <name> [来源]` | 从 `main`(默认)或指定分支创建功能分支 |
|
|
258
|
-
| `/finish-feature [目标]` | 合并当前功能分支到 `main`(默认)或指定分支 |
|
|
259
|
-
| `/new-release <version> [来源]` | 从 `main`(默认)或指定分支创建发布分支 |
|
|
260
|
-
| `/finish-release` | 合并当前发布分支到 `main` 和 `develop` |
|
|
261
|
-
| `/new-hotfix <name> [来源]` | 从 `main`(默认)或指定分支创建热修复分支 |
|
|
262
|
-
| `/finish-hotfix` | 合并当前热修复分支到 `main` 和 `develop` |
|
|
263
|
-
|
|
264
|
-
**示例:**
|
|
265
|
-
```bash
|
|
266
|
-
/new-feature user-auth # feature/user-auth 从 main 创建
|
|
267
|
-
/new-feature api-rate-limit develop # feature/api-rate-limit 从 develop 创建
|
|
268
|
-
/finish-feature # 合并当前 feature/* 到 main
|
|
269
|
-
/finish-feature develop # 合并当前 feature/* 到 develop
|
|
270
|
-
/new-release 1.2.0 # release/1.2.0 从 main 创建
|
|
271
|
-
/new-hotfix security-patch # hotfix/security-patch 从 main 创建
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
## 环境变量
|
|
277
|
-
|
|
278
|
-
支持 `MYCLAUDE_*` 和 `CLAUDE_CODE_*` 两种命名方式。
|
|
279
|
-
两者同时设置时,`CLAUDE_CODE_*` 优先。
|
|
280
|
-
|
|
281
|
-
| 变量名 | 说明 |
|
|
282
|
-
|--------|------|
|
|
283
|
-
| `ANTHROPIC_API_KEY` / `MYCLAUDE_API_KEY` | API 密钥(必填) |
|
|
284
|
-
| `ANTHROPIC_BASE_URL` / `MYCLAUDE_BASE_URL` | 自定义 API 地址 |
|
|
285
|
-
| `MYCLAUDE_MODEL` | 模型覆盖 |
|
|
286
|
-
| `MYCLAUDE_SIMPLE` | 简洁模式(无 TUI) |
|
|
287
|
-
| `MYCLAUDE_BRIEF` | 简报模式 |
|
|
288
|
-
| `MYCLAUDE_DISABLE_THINKING` | 禁用扩展思考 |
|
|
289
|
-
| `MYCLAUDE_PROACTIVE` | 主动模式 |
|
|
290
|
-
| `MYCLAUDE_USE_BEDROCK` | 使用 AWS Bedrock |
|
|
291
|
-
| `MYCLAUDE_USE_VERTEX` | 使用 Google Vertex AI |
|
|
292
|
-
| `MYCLAUDE_USE_FOUNDRY` | 使用 Microsoft Foundry |
|
|
293
|
-
| `MYCLAUDE_DISABLE_AUTO_MEMORY` | 禁用自动记忆 |
|
|
294
|
-
| `MYCLAUDE_SYNTAX_HIGHLIGHT` | 语法高亮主题 |
|
|
295
|
-
| `MYCLAUDE_IDLE_THRESHOLD_MINUTES` | 空闲超时(默认 75 分钟) |
|
|
296
|
-
| `MYCLAUDE_EFFORT_LEVEL` | 努力级别 |
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## 开发
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
git clone https://github.com/thomaslwq/myclaude.git
|
|
304
|
-
cd myclaude
|
|
305
|
-
bun install
|
|
306
|
-
bun run dev # 开发模式
|
|
307
|
-
bun run build # 构建到 dist/myclaude.mjs
|
|
308
|
-
bun run version # 验证 CLI 启动
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
### 构建产物
|
|
312
|
-
|
|
313
|
-
构建脚本会将 `src/entrypoints/cli.tsx` 打包为单文件 `dist/myclaude.mjs`,并注入版本号等编译时常量。
|
|
314
|
-
|
|
315
|
-
### 目录结构
|
|
316
|
-
|
|
317
|
-
```
|
|
318
|
-
src/
|
|
319
|
-
├── achievements/ # 成就系统(类型定义、存储、检查器)
|
|
320
|
-
├── buddy/ # BUDDY 伙伴(精灵图、动画、进化、类型)
|
|
321
|
-
├── commands/ # 斜杠命令实现
|
|
322
|
-
├── components/ # React Ink UI 组件
|
|
323
|
-
├── events/ # 事件日历(季节性彩蛋)
|
|
324
|
-
├── services/ # 后端服务(API、MCP、分析)
|
|
325
|
-
├── tools/ # 工具实现
|
|
326
|
-
├── utils/ # 共享工具函数(envCompat、配置等)
|
|
327
|
-
├── entrypoints/ # CLI 入口
|
|
328
|
-
└── main.tsx # TUI 主入口
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
## 贡献
|
|
334
|
-
|
|
335
|
-
欢迎提交 PR 参与贡献!
|
|
336
|
-
|
|
337
|
-
### 指南
|
|
338
|
-
|
|
339
|
-
- Fork 仓库并创建功能分支
|
|
340
|
-
- 保持改动聚焦且最小化
|
|
341
|
-
- 提交前测试你的改动
|
|
342
|
-
- 向 `main` 分支发起 PR
|
|
343
|
-
|
|
344
|
-
---
|
|
345
|
-
|
|
346
|
-
## 相关链接
|
|
347
|
-
|
|
348
|
-
- **GitHub**: [https://github.com/thomaslwq/myclaude](https://github.com/thomaslwq/myclaude)
|
|
349
|
-
- **Gitee**: [https://gitee.com/thomaslwq/myclaude](https://gitee.com/thomaslwq/myclaude)(镜像)
|
|
350
|
-
- **npm**: [https://www.npmjs.com/package/@funnycode/myclaude](https://www.npmjs.com/package/@funnycode/myclaude)
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
## 许可证
|
|
355
|
-
|
|
356
|
-
MIT
|
|
1
|
+
# 🎭 myclaude
|
|
2
|
+
|
|
3
|
+
> **你的终端 AI 编程搭档——更聪明地写代码,更快地交付。**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @funnycode/myclaude
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@funnycode/myclaude)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## ✨ myclaude 的独特之处
|
|
15
|
+
|
|
16
|
+
| | 功能 | 为什么你会爱上它 |
|
|
17
|
+
|---|------|----------------|
|
|
18
|
+
| 🐾 | **BUDDY 伙伴** | 终端电子宠物,随编码成长。孵化、喂食、玩耍。18 个物种、传说稀有度、闪光变异。 |
|
|
19
|
+
| 🏆 | **成就系统** | 20+ 成就,连续使用打卡、里程碑解锁——编码之旅的游戏化体验。 |
|
|
20
|
+
| 🎯 | **前端 TDD** | `/frontend-tdd` — 内置 Red-Green-Refactor 工作流,前端测试驱动开发。 |
|
|
21
|
+
| 🌊 | **Git Flow** | `/new-feature`、`/finish-release`、`/new-hotfix` — 完整的 Git Flow 斜杠命令。 |
|
|
22
|
+
| 🤖 | **ECC 内置** | 启动时自动注册 76+ 命令和 246+ 技能,零配置开箱即用。 |
|
|
23
|
+
| 🧠 | **AI 对话** | 编写、重构、调试、解释代码。多模型支持(Anthropic、Bedrock、Vertex、Foundry)。 |
|
|
24
|
+
| 🎨 | **精美 TUI** | React Ink 终端界面,支持主题切换、Vim 模式、语法高亮。 |
|
|
25
|
+
| 🔌 | **插件 & MCP** | 通过插件、MCP 服务器、自定义技能无限扩展。 |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🚀 10 秒快速开始
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# 设置 API 密钥
|
|
33
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
34
|
+
|
|
35
|
+
# 立即运行(无需安装)
|
|
36
|
+
npx @funnycode/myclaude
|
|
37
|
+
|
|
38
|
+
# 或全局安装
|
|
39
|
+
npm install -g @funnycode/myclaude
|
|
40
|
+
myclaude
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**环境要求:** Bun ≥ 1.3.5(或 Node.js ≥ 22.17)· Git
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 🎮 斜杠命令一览
|
|
48
|
+
|
|
49
|
+
### 📍 核心
|
|
50
|
+
| 命令 | 功能 |
|
|
51
|
+
|------|------|
|
|
52
|
+
| `/help` | 帮助 |
|
|
53
|
+
| `/config` | 配置设置 |
|
|
54
|
+
| `/doctor` | 诊断与验证 |
|
|
55
|
+
| `/model` | 切换 AI 模型 |
|
|
56
|
+
| `/effort` | 设置努力级别 |
|
|
57
|
+
|
|
58
|
+
### 🧪 测试与质量
|
|
59
|
+
| 命令 | 功能 |
|
|
60
|
+
|------|------|
|
|
61
|
+
| **`/frontend-tdd <描述>`** | **前端 TDD 红绿重构循环** |
|
|
62
|
+
| `/review` | 代码审查 |
|
|
63
|
+
| `/plan` | 创建实施计划 |
|
|
64
|
+
|
|
65
|
+
### 🌊 Git Flow
|
|
66
|
+
| 命令 | 功能 |
|
|
67
|
+
|------|------|
|
|
68
|
+
| `/new-feature <name> [来源]` | 从 `main` 创建功能分支 |
|
|
69
|
+
| `/finish-feature [目标]` | 合并功能到 `main` |
|
|
70
|
+
| `/new-release <version> [来源]` | 创建发布分支 |
|
|
71
|
+
| `/finish-release` | 合并发布到 `main` & `develop` |
|
|
72
|
+
| `/new-hotfix <name> [来源]` | 创建热修复分支 |
|
|
73
|
+
| `/finish-hotfix` | 合并热修复到 `main` & `develop` |
|
|
74
|
+
| `/commit` | 生成 Git 提交信息 |
|
|
75
|
+
|
|
76
|
+
### 🐾 伙伴 & 成就
|
|
77
|
+
| 命令 | 功能 |
|
|
78
|
+
|------|------|
|
|
79
|
+
| `/buddy hatch` | 孵化伙伴 |
|
|
80
|
+
| `/buddy pet` | 抚摸伙伴(+5 XP ❤️) |
|
|
81
|
+
| `/buddy feed` | 喂食伙伴(+15 XP) |
|
|
82
|
+
| `/buddy play` | 与伙伴玩耍(+20 XP) |
|
|
83
|
+
| `/buddy card` | 查看属性与里程碑 |
|
|
84
|
+
| `/achievements` | 查看成就进度 |
|
|
85
|
+
|
|
86
|
+
### 🔌 集成
|
|
87
|
+
| 命令 | 功能 |
|
|
88
|
+
|------|------|
|
|
89
|
+
| `/mcp` | 管理 MCP 服务器 |
|
|
90
|
+
| `/plugin` | 安装管理插件 |
|
|
91
|
+
| `/hooks` | 管理钩子 |
|
|
92
|
+
| `/skills` | 查看可用技能 |
|
|
93
|
+
|
|
94
|
+
### ⚙️ 系统
|
|
95
|
+
| 命令 | 功能 |
|
|
96
|
+
|------|------|
|
|
97
|
+
| `/status` | 会话与认证状态 |
|
|
98
|
+
| `/vim` | 切换 Vim 模式 |
|
|
99
|
+
| `/theme` | 切换 UI 主题 |
|
|
100
|
+
| `/keybindings` | 自定义快捷键 |
|
|
101
|
+
| `/memory` | 管理 AI 记忆 |
|
|
102
|
+
| `/feedback` | 提交反馈 |
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 🐾 BUDDY — 你的终端宠物
|
|
107
|
+
|
|
108
|
+
myclaude 有一个生活在终端里的 **电子宠物**。它根据你的用户 ID **确定性生成**——每一只都独一无二。
|
|
109
|
+
|
|
110
|
+
### 18 个物种
|
|
111
|
+
|
|
112
|
+
🦆 鸭子 · 🪿 鹅 · 🫧 果冻 · 🐱 猫 · 🐉 龙 · 🐙 章鱼 · 🦉 猫头鹰
|
|
113
|
+
🐧 企鹅 · 🐢 乌龟 · 🐌 蜗牛 · 👻 幽灵 · 🦎 六角恐龙 · 🦫 水豚
|
|
114
|
+
🌵 仙人掌 · 🤖 机器人 · 🐰 兔子 · 🍄 蘑菇 · 🐈 胖猫
|
|
115
|
+
|
|
116
|
+
### 稀有度与属性
|
|
117
|
+
|
|
118
|
+
| 稀有度 | 概率 | 星级 |
|
|
119
|
+
|--------|------|------|
|
|
120
|
+
| 普通 | 60% | ★ |
|
|
121
|
+
| 非凡 | 25% | ★★ |
|
|
122
|
+
| 稀有 | 10% | ★★★ |
|
|
123
|
+
| 史诗 | 4% | ★★★★ |
|
|
124
|
+
| 传说 | **1%** | ★★★★★ |
|
|
125
|
+
| ✨ 闪光 | **1%**(独立概率)| 闪闪发光! |
|
|
126
|
+
|
|
127
|
+
每只伙伴有 5 项属性:`DEBUGGING`(调试)、`PATIENCE`(耐心)、`CHAOS`(混乱)、`WISDOM`(智慧)、`SNARK`(毒舌)。通过互动获得经验值,最高 50 级,**进化**为全新形态。
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 🎯 前端 TDD
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
/frontend-tdd 实现一个带邮箱验证的用户登录表单
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
这个命令引导 AI 遵循 **红-绿-重构** 循环进行前端测试驱动开发:
|
|
138
|
+
|
|
139
|
+
🔴 **红** → 先写一个会失败的测试
|
|
140
|
+
🟢 **绿** → 编写最少代码让测试通过
|
|
141
|
+
🔵 **重构** → 优化代码,保持测试绿色
|
|
142
|
+
|
|
143
|
+
内置前端测试最佳实践:Testing Library 行为查询、`user-event` 替代 `fireEvent`、异步 `waitFor`/`findBy*`、MSW API 模拟、无障碍优先选择器。
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 🌊 Git Flow 工作流
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
/new-feature user-auth # feature/user-auth 从 main 创建
|
|
151
|
+
/new-feature api-rate-limit develop # feature/api-rate-limit 从 develop 创建
|
|
152
|
+
/finish-feature # 合并到 main
|
|
153
|
+
/finish-feature develop # 合并到 develop
|
|
154
|
+
/new-release 1.2.0 # release/1.2.0 从 main 创建
|
|
155
|
+
/new-hotfix security-patch # hotfix/security-patch 从 main 创建
|
|
156
|
+
/finish-hotfix # 合并到 main & develop
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
所有命令默认以 `main` 为基准,支持可选的 `[来源]` 或 `[目标]` 参数。
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 🔌 内置集成
|
|
164
|
+
|
|
165
|
+
### CodeGraph — 语义代码智能
|
|
166
|
+
自动检测 `codegraph` CLI 并注册为内置插件,提供精确的代码上下文。
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npm i -g @colbymchenry/codegraph
|
|
170
|
+
cd your-project
|
|
171
|
+
codegraph init
|
|
172
|
+
/plugin enable codegraph
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### ECC — 跨平台代理操作系统
|
|
176
|
+
**76+ 命令和 246+ 技能**在启动时自动加载——无需安装、无需配置。直接敲 `/` 即可用。
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## ⚙️ 环境变量
|
|
181
|
+
|
|
182
|
+
支持 `MYCLAUDE_*` 或 `CLAUDE_CODE_*`(后者优先级更高)。
|
|
183
|
+
|
|
184
|
+
| 关键变量 | 说明 |
|
|
185
|
+
|---------|------|
|
|
186
|
+
| `ANTHROPIC_API_KEY` / `MYCLAUDE_API_KEY` | API 密钥(必填) |
|
|
187
|
+
| `ANTHROPIC_BASE_URL` | 自定义 API 地址 |
|
|
188
|
+
| `MYCLAUDE_MODEL` | 覆盖模型 |
|
|
189
|
+
| `MYCLAUDE_SIMPLE` | 简洁模式(无 TUI) |
|
|
190
|
+
| `MYCLAUDE_DISABLE_THINKING` | 禁用扩展思考 |
|
|
191
|
+
| `MYCLAUDE_USE_BEDROCK` | AWS Bedrock 提供商 |
|
|
192
|
+
| `MYCLAUDE_USE_VERTEX` | Google Vertex AI 提供商 |
|
|
193
|
+
| `MYCLAUDE_USE_FOUNDRY` | Microsoft Foundry 提供商 |
|
|
194
|
+
| `MYCLAUDE_SYNTAX_HIGHLIGHT` | 语法高亮主题 |
|
|
195
|
+
| `MYCLAUDE_IDLE_THRESHOLD_MINUTES` | 空闲超时(默认 75 分钟) |
|
|
196
|
+
| `MYCLAUDE_EFFORT_LEVEL` | 努力级别 |
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## 🛠 开发
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
git clone https://github.com/thomaslwq/myclaude.git
|
|
204
|
+
cd myclaude
|
|
205
|
+
bun install
|
|
206
|
+
bun run dev # 开发模式
|
|
207
|
+
bun run build # 构建到 dist/myclaude.mjs
|
|
208
|
+
bun run version # 验证 CLI 启动
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### 目录结构
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
src/
|
|
215
|
+
├── achievements/ # 成就系统
|
|
216
|
+
├── buddy/ # BUDDY 伙伴(精灵图、进化)
|
|
217
|
+
├── commands/ # 所有斜杠命令
|
|
218
|
+
├── components/ # React Ink UI
|
|
219
|
+
├── events/ # 日历与节日彩蛋
|
|
220
|
+
├── services/ # API、MCP、分析
|
|
221
|
+
├── tools/ # 工具实现
|
|
222
|
+
├── utils/ # 共享工具函数
|
|
223
|
+
├── entrypoints/ # CLI 入口
|
|
224
|
+
└── main.tsx # TUI 主入口
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 🤝 贡献
|
|
230
|
+
|
|
231
|
+
欢迎 PR!Fork → 创建分支 → 保持聚焦 → 测试 → 提交 PR。
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 📎 相关链接
|
|
236
|
+
|
|
237
|
+
- **GitHub**: [github.com/thomaslwq/myclaude](https://github.com/thomaslwq/myclaude)
|
|
238
|
+
- **Gitee**: [gitee.com/thomaslwq/myclaude](https://gitee.com/thomaslwq/myclaude)
|
|
239
|
+
- **npm**: [npmjs.com/package/@funnycode/myclaude](https://www.npmjs.com/package/@funnycode/myclaude)
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## 📄 许可证
|
|
244
|
+
|
|
245
|
+
MIT
|
package/dist/myclaude.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// MACRO - build-time constants (injected by build.ts)
|
|
5
5
|
// MACRO injected by build script
|
|
6
6
|
globalThis.MACRO = {
|
|
7
|
-
VERSION: "0.1.
|
|
8
|
-
BUILD_TIME: "2026-06-28T12:
|
|
7
|
+
VERSION: "0.1.52",
|
|
8
|
+
BUILD_TIME: "2026-06-28T12:59:37.393Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|
package/dist/myclaude.mjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// MACRO - build-time constants (injected by build.ts)
|
|
5
5
|
// MACRO injected by build script
|
|
6
6
|
globalThis.MACRO = {
|
|
7
|
-
VERSION: "0.1.
|
|
8
|
-
BUILD_TIME: "2026-06-28T12:
|
|
7
|
+
VERSION: "0.1.52",
|
|
8
|
+
BUILD_TIME: "2026-06-28T12:59:37.393Z",
|
|
9
9
|
PACKAGE_URL: "@funnycode/myclaude",
|
|
10
10
|
NATIVE_PACKAGE_URL: "@funnycode/myclaude",
|
|
11
11
|
VERSION_CHANGELOG: '',
|