my-open-cc 1.0.0 → 1.0.2
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 +20 -13
- package/dist/cli.mjs +51 -51
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# my-open-cc
|
|
2
2
|
|
|
3
3
|
一个开源的终端 AI 编程助手,基于 OpenRouter API。
|
|
4
4
|
|
|
@@ -18,25 +18,22 @@
|
|
|
18
18
|
- 默认使用 [OpenRouter](https://openrouter.ai/) 作为 API 提供方
|
|
19
19
|
- 默认模型:`z-ai/glm-5-turbo`
|
|
20
20
|
- 配置目录与官方 Claude Code 兼容(`~/.claude/`)
|
|
21
|
-
-
|
|
21
|
+
- 通过 npm 全局安装,纯 Node.js 运行
|
|
22
|
+
- 内置跨平台 ripgrep 二进制,无需单独安装
|
|
22
23
|
- 完整工具支持:Bash、文件编辑/读取/写入、glob、grep、web 抓取/搜索(基于 DuckDuckGo HTML,本地实现)、MCP、agents、tasks 等
|
|
23
24
|
|
|
24
25
|
## 环境要求
|
|
25
26
|
|
|
26
|
-
- [
|
|
27
|
+
- [Node.js](https://nodejs.org/) >= 18.0.0
|
|
27
28
|
- 一个 [OpenRouter](https://openrouter.ai/) API key(或跳过,继承环境变量 / `settings.json` 中的已有配置)
|
|
28
29
|
|
|
29
|
-
##
|
|
30
|
-
|
|
31
|
-
### 编译
|
|
30
|
+
## 安装
|
|
32
31
|
|
|
33
32
|
```bash
|
|
34
|
-
|
|
35
|
-
bun run compile
|
|
36
|
-
bun run install-bin # 复制 dist/cli 到 ~/.local/bin/openclaude
|
|
33
|
+
npm install -g my-open-cc
|
|
37
34
|
```
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
安装后会提供全局命令 `oc`。
|
|
40
37
|
|
|
41
38
|
## 使用方法
|
|
42
39
|
|
|
@@ -46,6 +43,9 @@ oc
|
|
|
46
43
|
|
|
47
44
|
# 单次提问
|
|
48
45
|
oc -p "你的问题"
|
|
46
|
+
|
|
47
|
+
# 查看版本
|
|
48
|
+
oc --version
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
首次启动会引导你完成:
|
|
@@ -65,16 +65,23 @@ oc -p "你的问题"
|
|
|
65
65
|
| `ANTHROPIC_API_KEY` | (通过引导设置) | 你的 OpenRouter API key |
|
|
66
66
|
| `CLAUDE_CONFIG_DIR` | `~/.claude` | 配置目录 |
|
|
67
67
|
|
|
68
|
-
##
|
|
68
|
+
## 开发构建
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm install
|
|
72
|
+
npm run build # 生产构建 → dist/cli.mjs
|
|
73
|
+
npm run build:dev # 开发构建
|
|
74
|
+
npm run dev # 直接从源码运行
|
|
75
|
+
```
|
|
69
76
|
|
|
70
77
|
### `@ant/*` 桥接模块
|
|
71
78
|
|
|
72
|
-
项目包含多个桥接模块(`shims/ant-*.ts`),用于替代 Anthropic 内部的 `@ant/*` 包(不可公开获取)。`
|
|
79
|
+
项目包含多个桥接模块(`shims/ant-*.ts`),用于替代 Anthropic 内部的 `@ant/*` 包(不可公开获取)。`scripts/setup-ant-shims.mjs` 会创建这些包的 `node_modules/@ant/` 目录结构,无需手动配置。
|
|
73
80
|
|
|
74
81
|
如果遇到 "Could not resolve" 错误,运行:
|
|
75
82
|
|
|
76
83
|
```bash
|
|
77
|
-
|
|
84
|
+
node scripts/setup-ant-shims.mjs
|
|
78
85
|
```
|
|
79
86
|
|
|
80
87
|
## License
|