@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 CHANGED
@@ -1,356 +1,245 @@
1
- # @funnycode/myclaude
2
-
3
- **myclaude** — An open-source AI coding assistant that runs in your terminal, built on Anthropic's Claude Code with extended features including a virtual companion, achievements, and more.
4
-
5
- ![myclaude](https://raw.githubusercontent.com/thomaslwq/myclaude/main/docs/funnycode.png)
6
-
7
- ```bash
8
- npx @funnycode/myclaude
9
- ```
10
-
11
- ---
12
-
13
- ## Features
14
-
15
- - **AI Chat** — Write, refactor, debug, and explain code via natural language
16
- - **BUDDY Companion** A terminal pet that grows with you. Hatch, pet, feed, play, and evolve your ASCII companion. 18 species, 5 rarity tiers, shiny variants, XP & evolution system.
17
- - **Achievements** — Unlock 20+ achievements as you code: streaks, milestones, discoveries.
18
- - **Milestones** — Companion memory system that remembers your journey.
19
- - **Event Calendar** Seasonal easter eggs and special reactions for holidays.
20
- - **80+ Slash Commands** `/commit`, `/review`, `/plan`, `/doctor`, `/buddy`, `/achievements` and more
21
- - **File Operations** — Edit, write, create, and search files with AI guidance
22
- - **Git Integration** Automatic commit messages, branch management, diff, review
23
- - **MCP Support** Model Context Protocol for extensible tool integrations
24
- - **Plugin System** Install and manage plugins from marketplaces (including ECC ecosystem)
25
- - **Agent Mode** Multi-step autonomous task execution
26
- - **Skills System** — Extend capabilities with reusable skills
27
- - **Terminal UI** — React Ink interface with syntax highlighting, themes, and Vim mode
28
- - **Multi-Model Support** — Anthropic, AWS Bedrock, Google Vertex AI, Microsoft Foundry
29
- - **Claude Code Compatible** Reads `~/.claude/settings.json`, skills, MCPs, plugins, and hooks shared with Claude Code
30
-
31
- ---
32
-
33
- ## Quick Start
34
-
35
- ### Prerequisites
36
-
37
- - **Bun >= 1.3.5** (Node.js >= 22.17 also works)
38
- - **Git** (for some features)
39
- - **Anthropic API key** or compatible provider
40
-
41
- ### Install & Run
42
-
43
- ```bash
44
- npx @funnycode/myclaude
45
- ```
46
-
47
- Or install globally:
48
-
49
- ```bash
50
- npm install -g @funnycode/myclaude
51
- myclaude
52
- ```
53
-
54
- ### Set API Key
55
-
56
- ```bash
57
- export ANTHROPIC_API_KEY=sk-ant-...
58
- # Or use the myclaude alias:
59
- export MYCLAUDE_API_KEY=sk-ant-...
60
- ```
61
-
62
- ---
63
-
64
- ## Usage
65
-
66
- ```bash
67
- npx @funnycode/myclaude # Start interactive REPL
68
- npx @funnycode/myclaude -p "explain this project" # Run with a prompt
69
- npx @funnycode/myclaude --version # Show version
70
- npx @funnycode/myclaude --help # Show help
71
- ```
72
-
73
- ---
74
-
75
- ## Slash Commands
76
-
77
- ### Core
78
- | Command | Description |
79
- |---------|-------------|
80
- | `/help` | Show help |
81
- | `/clear` | Clear conversation |
82
- | `/exit` | Exit |
83
- | `/resume` | Resume a previous session |
84
- | `/rewind` | Rewind conversation |
85
- | `/rename` | Rename current session |
86
- | `/config` | Configure settings |
87
- | `/doctor` | Diagnose and verify installation |
88
-
89
- ### Code & Git
90
- | Command | Description |
91
- |---------|-------------|
92
- | `/commit` | Generate a git commit message |
93
- | `/diff` | Show git diff |
94
- | `/branch` | Create a conversation branch (fork) |
95
- | `/plan` | Create an implementation plan |
96
- | `/review` | Review code |
97
-
98
- ### AI & Model
99
- | Command | Description |
100
- |---------|-------------|
101
- | `/model` | Change AI model |
102
- | `/effort` | Set effort level |
103
-
104
- ### Files & Context
105
- | Command | Description |
106
- |---------|-------------|
107
- | `/add-dir` | Add directory to context |
108
- | `/context` | Show current context |
109
- | `/files` | File operations |
110
- | `/copy` | Copy content |
111
-
112
- ### MCP & Plugins
113
- | Command | Description |
114
- |---------|-------------|
115
- | `/mcp` | Manage MCP servers |
116
- | `/plugin` | Manage plugins and marketplaces |
117
- | `/reload-plugins` | Reload all plugins |
118
- | `/hooks` | Manage hooks |
119
-
120
- ### Companion & Achievements
121
- | Command | Description |
122
- |---------|-------------|
123
- | `/buddy` | Manage your terminal companion (hatch, pet, feed, play, card, mute, unmute) |
124
- | `/achievements` | View unlocked achievements and progress |
125
-
126
- ### System
127
- | Command | Description |
128
- |---------|-------------|
129
- | `/status` | Show authentication and session status |
130
- | `/stats` | Show usage statistics |
131
- | `/cost` | Show cost information |
132
- | `/color` | Set color theme |
133
- | `/theme` | Set UI theme |
134
- | `/keybindings` | Configure keybindings |
135
- | `/vim` | Toggle Vim mode |
136
- | `/terminal-setup` | Terminal setup |
137
- | `/memory` | Manage AI memory |
138
- | `/skills` | Manage skills |
139
- | `/tag` | Tag current session |
140
- | `/export` | Export session |
141
- | `/feedback` | Submit feedback (opens GitHub Issues) |
142
-
143
- ---
144
-
145
- ## BUDDY — Your Terminal Companion
146
-
147
- myclaude comes with a built-in virtual pet that lives in your terminal. Each pet is **deterministically generated** from your user ID — what you get is uniquely yours and cannot be cheated.
148
-
149
- ### Species (18 total)
150
-
151
- 🦆 Duck   🪿 Goose   🫧 Blob   🐱 Cat   🐉 Dragon
152
- 🐙 Octopus   🦉 Owl   🐧 Penguin   🐢 Turtle   🐌 Snail
153
- 👻 Ghost   🦎 Axolotl   🦫 Capybara   🌵 Cactus   🤖 Robot
154
- 🐰 Rabbit   🍄 Mushroom   🐈 Chonk
155
-
156
- ### Rarity System
157
-
158
- | Rarity | Chance | Stars |
159
- |--------|--------|-------|
160
- | Common | 60% | ★ |
161
- | Uncommon | 25% | ★★ |
162
- | Rare | 10% | ★★★ |
163
- | Epic | 4% | ★★★★ |
164
- | Legendary | 1% | ★★★★★ |
165
-
166
- There's also a **1% shiny chance** independent of rarity shiny companions sparkle
167
-
168
- ### Stats & Evolution
169
-
170
- Each companion has 5 attributes: `DEBUGGING`, `PATIENCE`, `CHAOS`, `WISDOM`, `SNARK` — with one peak stat and one dump stat.
171
-
172
- Companions gain XP through interaction and level up (max level 50). At certain levels, they evolve into new forms. Each species has multiple evolution stages with unique appearances.
173
-
174
- ### Commands
175
-
176
- | Command | Description |
177
- |---------|-------------|
178
- | `/buddy hatch` | Hatch a new companion |
179
- | `/buddy pet` | Pet your companion (+5 XP, hearts animation) |
180
- | `/buddy feed` | Feed your companion (+15 XP) |
181
- | `/buddy play` | Play with your companion (+20 XP) |
182
- | `/buddy card` | View companion card with stats, level, and milestones |
183
- | `/buddy mute` | Hide companion from terminal |
184
- | `/buddy unmute` | Show companion again |
185
-
186
- The companion reacts to your conversation and occasionally comments via speech bubbles. Each species has custom animations and pet reactions. Special events and holidays trigger unique messages and reactions.
187
-
188
- ### Milestones
189
-
190
- Your companion remembers your journey together — milestones are tracked and displayed on the companion card:
191
-
192
- 🥚 First companion hatched   📝 First AI commit   🔍 First code review
193
- Buddy reached level 5   👑 Buddy reached level 50   🔥 7/30 day streaks
194
-
195
- ---
196
-
197
- ## Achievements
198
-
199
- Unlock achievements as you use myclaude. Track your progress with `/achievements`.
200
-
201
- ### Categories
202
-
203
- | Category | Description |
204
- |----------|-------------|
205
- | 🌟 Getting Started | First hatch, first commit, first review, first plugin, first skill |
206
- | 📊 Usage | 10/100 commits, 100/1000 messages, model switching, config changes |
207
- | 🔥 Streaks | 3/7/30 consecutive days of use |
208
- | 🐾 Buddy | Hatch, pet 10/100 times, legendary or shiny companion |
209
- | ⚡ Power | Add an MCP server |
210
-
211
- ```bash
212
- /achievements # Show unlocked achievements summary
213
- /achievements list # Show all achievements with progress
214
- ```
215
-
216
- ---
217
-
218
- ## Built-in Integrations
219
-
220
- ### CodeGraph Semantic Code Intelligence
221
-
222
- [CodeGraph](https://github.com/colbymchenry/codegraph) provides surgical code context for faster, more accurate edits. myclaude auto-detects the `codegraph` CLI and enables it as a built-in plugin when available.
223
-
224
- **Setup:**
225
- ```bash
226
- # 1. Install CodeGraph CLI (one-time)
227
- npm i -g @colbymchenry/codegraph
228
-
229
- # 2. Initialize in your project
230
- cd your-project
231
- codegraph init
232
-
233
- # 3. Enable the plugin in myclaude
234
- /plugin enable codegraph
235
- ```
236
-
237
- Once enabled, CodeGraph's MCP server starts automatically and provides semantic code intelligence in every session.
238
-
239
- ### ECC — Agent Operating System
240
-
241
- [ECC](https://github.com/affaan-m/ECC) is **built-in** to myclaude. It provides a cross-harness agent ecosystem with 76+ commands and 246+ skills, all automatically registered as bundled skills at startup — no installation, no marketplace setup, no configuration needed. Just start using `/` commands immediately.
242
-
243
- ECC skills and commands are loaded synchronously from `seed/marketplaces/ecc/` at module load time and available before the CLI finishes booting.
244
-
245
- ```bash
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
+ [![npm](https://img.shields.io/npm/v/@funnycode/myclaude)](https://www.npmjs.com/package/@funnycode/myclaude)
10
+ [![License](https://img.shields.io/npm/l/@funnycode/myclaude)](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
- # @funnycode/myclaude
2
-
3
- **myclaude** 开源的 AI 编程助手,运行在你的终端中。基于 Anthropic 的 Claude Code 构建,并扩展了虚拟伙伴、成就系统等特色功能。
4
-
5
- ![myclaude](https://raw.githubusercontent.com/thomaslwq/myclaude/main/docs/funnycode.png)
6
-
7
- ```bash
8
- npx @funnycode/myclaude
9
- ```
10
-
11
- ---
12
-
13
- ## 功能特性
14
-
15
- - **AI 对话** — 通过自然语言编写、重构、调试和解释代码
16
- - **BUDDY 伙伴** 终端电子宠物,与你一同成长。孵化、抚摸、喂食、玩耍、进化。18 个物种、5 级稀有度、闪光变异、经验值与进化系统
17
- - **成就系统** — 边编码边解锁 20+ 成就:连续使用、里程碑、探索发现
18
- - **里程碑系统** 伙伴记忆系统,记录你的旅程
19
- - **事件日历** 节假日彩蛋和特殊反应
20
- - **80+ 斜杠命令** `/commit`、`/review`、`/plan`、`/doctor`、`/buddy`、`/achievements`
21
- - **文件操作** AI 指导下编辑、写入、创建和搜索文件
22
- - **Git 集成** 自动生成提交信息、管理分支、差异对比、代码审查
23
- - **MCP 支持** Model Context Protocol 可扩展工具集成
24
- - **插件系统** 安装和管理市场插件(包括 ECC 生态系统)
25
- - **Agent 模式** 多步自主任务执行
26
- - **技能系统** — 通过可复用技能扩展能力
27
- - **终端 UI** — React Ink 界面,支持语法高亮、主题和 Vim 模式
28
- - **多模型支持** — Anthropic、AWS Bedrock、Google Vertex AI、Microsoft Foundry
29
- - **Claude Code 兼容** — 可读取 `~/.claude/settings.json`、技能、MCP、插件和钩子,与 Claude Code 共享配置
30
-
31
- ---
32
-
33
- ## 快速开始
34
-
35
- ### 环境要求
36
-
37
- - **Bun >= 1.3.5**(也可以用 Node.js >= 22.17)
38
- - **Git**(部分功能需要)
39
- - **Anthropic API 密钥** 或兼容的 AI 提供商
40
-
41
- ### 安装运行
42
-
43
- ```bash
44
- npx @funnycode/myclaude
45
- ```
46
-
47
- 或全局安装:
48
-
49
- ```bash
50
- npm install -g @funnycode/myclaude
51
- myclaude
52
- ```
53
-
54
- ### 设置 API Key
55
-
56
- ```bash
57
- export ANTHROPIC_API_KEY=sk-ant-...
58
- # 或使用 myclaude 别名:
59
- export MYCLAUDE_API_KEY=sk-ant-...
60
- ```
61
-
62
- ---
63
-
64
- ## 使用方法
65
-
66
- ```bash
67
- npx @funnycode/myclaude # 启动交互式会话
68
- npx @funnycode/myclaude -p "解释这个项目" # 直接执行 prompt
69
- npx @funnycode/myclaude --version # 查看版本
70
- npx @funnycode/myclaude --help # 查看帮助
71
- ```
72
-
73
- ---
74
-
75
- ## 斜杠命令
76
-
77
- ### 核心
78
- | 命令 | 说明 |
79
- |------|------|
80
- | `/help` | 帮助 |
81
- | `/clear` | 清除对话 |
82
- | `/exit` | 退出 |
83
- | `/resume` | 恢复之前的会话 |
84
- | `/rewind` | 回退对话 |
85
- | `/rename` | 重命名当前会话 |
86
- | `/config` | 配置设置 |
87
- | `/doctor` | 诊断和验证安装 |
88
-
89
- ### 代码和 Git
90
- | 命令 | 说明 |
91
- |------|------|
92
- | `/commit` | 生成 Git 提交信息 |
93
- | `/diff` | 查看 Git 差异 |
94
- | `/branch` | 切换/创建分支 |
95
- | `/plan` | 创建实施计划 |
96
- | `/review` | 代码审查 |
97
-
98
- ### AI 和模型
99
- | 命令 | 说明 |
100
- |------|------|
101
- | `/model` | 切换 AI 模型 |
102
- | `/effort` | 设置努力级别 |
103
-
104
- ### 文件和上下文
105
- | 命令 | 说明 |
106
- |------|------|
107
- | `/add-dir` | 添加目录到上下文 |
108
- | `/context` | 显示当前上下文 |
109
- | `/files` | 文件操作 |
110
- | `/copy` | 复制内容 |
111
-
112
- ### MCP 和插件
113
- | 命令 | 说明 |
114
- |------|------|
115
- | `/mcp` | 管理 MCP 服务器 |
116
- | `/plugin` | 管理插件和市场 |
117
- | `/reload-plugins` | 重新加载所有插件 |
118
- | `/hooks` | 管理钩子 |
119
-
120
- ### 伙伴 & 成就
121
- | 命令 | 说明 |
122
- |------|------|
123
- | `/buddy` | 管理终端伙伴(孵化、抚摸、喂食、玩耍、卡片、静音、取消静音) |
124
- | `/achievements` | 查看已解锁的成就和进度 |
125
-
126
- ### 系统
127
- | 命令 | 说明 |
128
- |------|------|
129
- | `/status` | 显示认证和会话状态 |
130
- | `/stats` | 显示使用统计 |
131
- | `/cost` | 显示费用信息 |
132
- | `/color` | 设置颜色主题 |
133
- | `/theme` | 设置 UI 主题 |
134
- | `/keybindings` | 配置按键绑定 |
135
- | `/vim` | 切换 Vim 模式 |
136
- | `/terminal-setup` | 终端设置 |
137
- | `/memory` | 管理 AI 记忆 |
138
- | `/skills` | 管理技能 |
139
- | `/tag` | 标记当前会话 |
140
- | `/export` | 导出会话 |
141
- | `/feedback` | 提交反馈(跳转 GitHub Issues) |
142
-
143
- ---
144
-
145
- ## BUDDY — 终端电子伙伴
146
-
147
- myclaude 内置了一个终端电子宠物。每只宠物都根据你的用户 ID **确定性生成**——独一无二,不可作弊。
148
-
149
- ### 物种(共 18 种)
150
-
151
- 🦆 鸭子 &nbsp; 🪿 &nbsp; 🫧 果冻 &nbsp; 🐱 猫 &nbsp; 🐉 龙
152
- 🐙 章鱼 &nbsp; 🦉 猫头鹰 &nbsp; 🐧 企鹅 &nbsp; 🐢 乌龟 &nbsp; 🐌 蜗牛
153
- 👻 幽灵 &nbsp; 🦎 六角恐龙 &nbsp; 🦫 水豚 &nbsp; 🌵 仙人掌 &nbsp; 🤖 机器人
154
- 🐰 兔子 &nbsp; 🍄 蘑菇 &nbsp; 🐈 胖猫
155
-
156
- ### 稀有度系统
157
-
158
- | 稀有度 | 概率 | 星级 |
159
- |--------|------|------|
160
- | 普通 | 60% | ★ |
161
- | 非凡 | 25% | ★★ |
162
- | 稀有 | 10% | ★★★ |
163
- | 史诗 | 4% | ★★★★ |
164
- | 传说 | 1% | ★★★★★ |
165
-
166
- 还有独立于稀有度的 **1% 闪光概率**——闪光伙伴会闪闪发光
167
-
168
- ### 属性与进化
169
-
170
- 每只伙伴有 5 项属性:`DEBUGGING`(调试)、`PATIENCE`(耐心)、`CHAOS`(混乱)、`WISDOM`(智慧)、`SNARK`(毒舌)——各有一项峰值属性和一项最低属性。
171
-
172
- 伙伴通过互动获得经验值(XP)并提升等级(最高 50 级)。达到特定等级后,伙伴可以进化到新的形态。每个物种都有多个进化阶段和独特外观。
173
-
174
- ### 命令
175
-
176
- | 命令 | 说明 |
177
- |------|------|
178
- | `/buddy hatch` | 孵化一只伙伴 |
179
- | `/buddy pet` | 抚摸伙伴(+5 XP,爱心动画) |
180
- | `/buddy feed` | 喂食伙伴(+15 XP) |
181
- | `/buddy play` | 与伙伴玩耍(+20 XP) |
182
- | `/buddy card` | 查看伙伴卡片(属性、等级、里程碑) |
183
- | `/buddy mute` | 隐藏伙伴 |
184
- | `/buddy unmute` | 重新显示伙伴 |
185
-
186
- 伙伴会对你对话的内容做出反应,通过气泡说话。每种物种都有不同的动画和抚摸反应。特殊节日会触发独特的消息和反应。
187
-
188
- ### 里程碑
189
-
190
- 你的伙伴会记住你们共同的旅程——里程碑会被记录并显示在伙伴卡片上:
191
-
192
- 🥚 首次孵化 &nbsp; 📝 首次 AI 提交 &nbsp; 🔍 首次代码审查
193
- 伙伴达到 5 &nbsp; 👑 伙伴达到 50 级 &nbsp; 🔥 连续 7/30 天使用
194
-
195
- ---
196
-
197
- ## 成就系统
198
-
199
- 边使用 myclaude 边解锁成就。用 `/achievements` 查看进度。
200
-
201
- ### 分类
202
-
203
- | 类别 | 说明 |
204
- |------|------|
205
- | 🌟 入门 | 首次孵化、首次提交、首次审查、首次插件、首次技能 |
206
- | 📊 使用 | 10/100 次提交、100/1000 条消息、切换模型、修改配置 |
207
- | 🔥 连续 | 连续 3/7/30 天使用 |
208
- | 🐾 Buddy | 孵化、抚摸 10/100 次、传说或闪光伙伴 |
209
- | ⚡ 高级 | 添加 MCP 服务器 |
210
-
211
- ```bash
212
- /achievements # 查看已解锁成就摘要
213
- /achievements list # 查看全部成就及进度
214
- ```
215
-
216
- ---
217
-
218
- ## 内置集成
219
-
220
- ### CodeGraph — 语义代码智能
221
-
222
- [CodeGraph](https://github.com/colbymchenry/codegraph) 提供精确的代码上下文,让 AI 更快更准确地完成编辑。myclaude 会自动检测 `codegraph` CLI 是否已安装,并在可用时将其注册为内置插件。
223
-
224
- **配置方法:**
225
- ```bash
226
- # 1. 安装 CodeGraph CLI(一次性)
227
- npm i -g @colbymchenry/codegraph
228
-
229
- # 2. 在项目中初始化
230
- cd your-project
231
- codegraph init
232
-
233
- # 3. 在 myclaude 中启用插件
234
- /plugin enable codegraph
235
- ```
236
-
237
- 启用后,CodeGraph MCP 服务器会自动启动,在每轮会话中提供语义代码智能。
238
-
239
- ### ECC — 跨平台代理操作系统
240
-
241
- [ECC](https://github.com/affaan-m/ECC) **内置**在 myclaude 中。它提供跨 harness 的代理生态系统,包含 76+ 命令和 246+ 技能,全部在启动时自动注册为 bundled skills——无需安装、无需配置市场、无需任何设置。启动后即可直接使用 `/` 命令。
242
-
243
- ECC 技能和命令在模块加载时从 `seed/marketplaces/ecc/` 同步加载,在 CLI 完成启动前即可用。
244
-
245
- ```bash
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
+ [![npm](https://img.shields.io/npm/v/@funnycode/myclaude)](https://www.npmjs.com/package/@funnycode/myclaude)
10
+ [![License](https://img.shields.io/npm/l/@funnycode/myclaude)](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.51",
8
- BUILD_TIME: "2026-06-28T12:45:44.785Z",
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.51",
8
- BUILD_TIME: "2026-06-28T12:45:44.785Z",
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",