@funnycode/myclaude 0.1.3
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/CHANGELOG.md +8 -0
- package/LICENSE +21 -0
- package/README.md +104 -0
- package/README.zh-CN.md +98 -0
- package/bin/myclaude.cjs +2 -0
- package/dist/myclaude.js +570378 -0
- package/package.json +119 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 myclaude contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# myclaude
|
|
2
|
+
|
|
3
|
+
An open-source AI coding assistant in your terminal — powered by Claude.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @funnycode/myclaude
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Or install globally:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @thomaslwq/myclaude
|
|
13
|
+
npx @thomaslwq/myclaude
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- **Natural Language Coding** — Write, refactor, debug, and explain code by chatting with AI
|
|
21
|
+
- **Slash Commands** — 80+ built-in commands: `/commit`, `/review`, `/test`, `/doc`, and more
|
|
22
|
+
- **Git Integration** — Automatic commit messages, PR creation, branch management
|
|
23
|
+
- **MCP Support** — Extensible tool integrations via Model Context Protocol
|
|
24
|
+
- **Plugin System** — Extend with community plugins
|
|
25
|
+
- **Terminal UI** — Beautiful React Ink-based interface with syntax highlighting
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
### 1. Install
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install -g @thomaslwq/myclaude
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Set your API key
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
41
|
+
# Or use the myclaude alias:
|
|
42
|
+
export MYCLAUDE_API_KEY=sk-ant-...
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 3. Run
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
myclaude
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
myclaude # Start interactive REPL
|
|
57
|
+
myclaude -p "explain this project" # Run with a prompt
|
|
58
|
+
myclaude --version # Show version
|
|
59
|
+
myclaude --help # Show help
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Common Commands
|
|
63
|
+
|
|
64
|
+
| Command | Description |
|
|
65
|
+
|---------|-------------|
|
|
66
|
+
| `/commit` | Generate a git commit message |
|
|
67
|
+
| `/review` | Review code changes |
|
|
68
|
+
| `/test` | Generate and run tests |
|
|
69
|
+
| `/doc` | Generate documentation |
|
|
70
|
+
| `/config` | Configure settings |
|
|
71
|
+
| `/doctor` | Diagnose installation |
|
|
72
|
+
| `/model` | Change AI model |
|
|
73
|
+
| `/clear` | Clear conversation |
|
|
74
|
+
| `/cost` | Show usage statistics |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Environment Variables
|
|
79
|
+
|
|
80
|
+
You can use either `MYCLAUDE_*` or `CLAUDE_CODE_*` names.
|
|
81
|
+
`CLAUDE_CODE_*` takes priority if both are set.
|
|
82
|
+
|
|
83
|
+
| Variable | Description |
|
|
84
|
+
|----------|-------------|
|
|
85
|
+
| `ANTHROPIC_API_KEY` / `MYCLAUDE_API_KEY` | API key (required) |
|
|
86
|
+
| `ANTHROPIC_BASE_URL` / `MYCLAUDE_BASE_URL` | Custom API base URL |
|
|
87
|
+
| `MYCLAUDE_MODEL` | Model override |
|
|
88
|
+
| `MYCLAUDE_SIMPLE` | Simple mode (no TUI) |
|
|
89
|
+
| `MYCLAUDE_BRIEF` | Brief mode (shorter output) |
|
|
90
|
+
| `MYCLAUDE_DISABLE_THINKING` | Disable thinking |
|
|
91
|
+
| `MYCLAUDE_PROACTIVE` | Proactive mode |
|
|
92
|
+
| `MYCLAUDE_USE_BEDROCK` | Use AWS Bedrock |
|
|
93
|
+
| `MYCLAUDE_USE_VERTEX` | Use Google Vertex AI |
|
|
94
|
+
| `MYCLAUDE_USE_FOUNDRY` | Use Microsoft Foundry |
|
|
95
|
+
| `MYCLAUDE_DISABLE_AUTO_MEMORY` | Disable auto memory |
|
|
96
|
+
| `MYCLAUDE_SYNTAX_HIGHLIGHT` | Syntax highlight theme |
|
|
97
|
+
| `MYCLAUDE_IDLE_THRESHOLD_MINUTES` | Idle timeout (default: 75) |
|
|
98
|
+
| `MYCLAUDE_EFFORT_LEVEL` | Effort level |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
MIT
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# myclaude
|
|
2
|
+
|
|
3
|
+
开源的 AI 编码助手,运行在你的终端中——由 Claude 驱动。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g @funnycode/myclaude
|
|
7
|
+
myclaude
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 功能特性
|
|
13
|
+
|
|
14
|
+
- **自然语言编程** — 通过对话编写、重构、调试和解释代码
|
|
15
|
+
- **斜杠命令** — 80+ 内置命令:`/commit`、`/review`、`/test`、`/doc` 等
|
|
16
|
+
- **Git 集成** — 自动生成提交信息、创建 PR、管理分支
|
|
17
|
+
- **MCP 支持** — 通过 Model Context Protocol 扩展工具集成
|
|
18
|
+
- **插件系统** — 社区插件扩展
|
|
19
|
+
- **终端 UI** — 基于 React Ink 的界面,支持语法高亮
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 快速开始
|
|
24
|
+
|
|
25
|
+
### 1. 安装
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g @funnycode/myclaude
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. 设置 API Key
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
35
|
+
# 或使用 myclaude 别名:
|
|
36
|
+
export MYCLAUDE_API_KEY=sk-ant-...
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 3. 运行
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
myclaude
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 使用方法
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
myclaude # 启动交互式会话
|
|
51
|
+
myclaude -p "解释这个项目" # 直接执行 prompt
|
|
52
|
+
myclaude --version # 查看版本
|
|
53
|
+
myclaude --help # 查看帮助
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 常用命令
|
|
57
|
+
|
|
58
|
+
| 命令 | 说明 |
|
|
59
|
+
|------|------|
|
|
60
|
+
| `/commit` | 生成 Git 提交信息 |
|
|
61
|
+
| `/review` | 代码审查 |
|
|
62
|
+
| `/test` | 生成和运行测试 |
|
|
63
|
+
| `/doc` | 生成文档 |
|
|
64
|
+
| `/config` | 配置设置 |
|
|
65
|
+
| `/doctor` | 诊断安装 |
|
|
66
|
+
| `/model` | 切换 AI 模型 |
|
|
67
|
+
| `/clear` | 清除对话 |
|
|
68
|
+
| `/cost` | 查看使用统计 |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 环境变量
|
|
73
|
+
|
|
74
|
+
支持 `MYCLAUDE_*` 和 `CLAUDE_CODE_*` 两种命名方式。
|
|
75
|
+
两者同时设置时,`CLAUDE_CODE_*` 优先。
|
|
76
|
+
|
|
77
|
+
| 变量名 | 说明 |
|
|
78
|
+
|--------|------|
|
|
79
|
+
| `ANTHROPIC_API_KEY` / `MYCLAUDE_API_KEY` | API 密钥(必填) |
|
|
80
|
+
| `ANTHROPIC_BASE_URL` / `MYCLAUDE_BASE_URL` | 自定义 API 地址 |
|
|
81
|
+
| `MYCLAUDE_MODEL` | 模型覆盖 |
|
|
82
|
+
| `MYCLAUDE_SIMPLE` | 简洁模式(无 TUI) |
|
|
83
|
+
| `MYCLAUDE_BRIEF` | 简报模式 |
|
|
84
|
+
| `MYCLAUDE_DISABLE_THINKING` | 禁用思考 |
|
|
85
|
+
| `MYCLAUDE_PROACTIVE` | 主动模式 |
|
|
86
|
+
| `MYCLAUDE_USE_BEDROCK` | 使用 AWS Bedrock |
|
|
87
|
+
| `MYCLAUDE_USE_VERTEX` | 使用 Google Vertex AI |
|
|
88
|
+
| `MYCLAUDE_USE_FOUNDRY` | 使用 Microsoft Foundry |
|
|
89
|
+
| `MYCLAUDE_DISABLE_AUTO_MEMORY` | 禁用自动记忆 |
|
|
90
|
+
| `MYCLAUDE_SYNTAX_HIGHLIGHT` | 语法高亮主题 |
|
|
91
|
+
| `MYCLAUDE_IDLE_THRESHOLD_MINUTES` | 空闲超时(默认 75 分钟) |
|
|
92
|
+
| `MYCLAUDE_EFFORT_LEVEL` | 努力级别 |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 许可证
|
|
97
|
+
|
|
98
|
+
MIT
|
package/bin/myclaude.cjs
ADDED