@tokenaut/opentoken 1.3.0 → 1.3.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 +51 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
OpenToken 一键配置 CLI,支持 Claude Code 和 Codex。
|
|
4
4
|
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @tokenaut/opentoken
|
|
9
|
+
```
|
|
10
|
+
|
|
5
11
|
## 用法
|
|
6
12
|
|
|
7
13
|
```bash
|
|
@@ -36,26 +42,63 @@ opentoken <tool> [--key <api_key>] [--model <model>] [--header <prefix>] [--url
|
|
|
36
42
|
|
|
37
43
|
## 示例
|
|
38
44
|
|
|
45
|
+
### Claude Code
|
|
46
|
+
|
|
39
47
|
```bash
|
|
40
|
-
#
|
|
48
|
+
# 一键初始化
|
|
41
49
|
opentoken cc --key sk-xxxxx
|
|
42
50
|
|
|
43
|
-
#
|
|
51
|
+
# 只改模型
|
|
44
52
|
opentoken cc --model sonnet
|
|
45
53
|
|
|
46
|
-
#
|
|
47
|
-
opentoken cc --key sk-xxxxx --model opus --header
|
|
54
|
+
# 带前缀
|
|
55
|
+
opentoken cc --key sk-xxxxx --model opus --header your_header
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Codex
|
|
48
59
|
|
|
49
|
-
|
|
60
|
+
```bash
|
|
61
|
+
# 一键初始化
|
|
50
62
|
opentoken cx --key sk-xxxxx --url https://gw.opentoken.io/v1
|
|
51
63
|
|
|
52
|
-
#
|
|
64
|
+
# 只改模型
|
|
53
65
|
opentoken cx --model 5.5
|
|
54
66
|
|
|
55
|
-
#
|
|
67
|
+
# 完整指定
|
|
56
68
|
opentoken cx --key sk-xxxxx --model gpt-5.5 --url https://gw.opentoken.io/v1
|
|
57
69
|
```
|
|
58
70
|
|
|
71
|
+
## 一键配置命令
|
|
72
|
+
|
|
73
|
+
### OpenToken 网关
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Claude Code(注意 cc 的 url 没有 /v1)
|
|
77
|
+
opentoken cc --key <your-api-key> --model claude-opus-4-7 --url https://gw.opentoken.io
|
|
78
|
+
|
|
79
|
+
# Codex
|
|
80
|
+
opentoken cx --key <your-api-key> --model gpt-5.5 --url https://gw.opentoken.io/v1
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Omni 网关
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Claude Code
|
|
87
|
+
opentoken cc --key <your-api-key> --model <前缀>/claude-opus-4-7 --url https://omniroute.goio.uk/v1
|
|
88
|
+
|
|
89
|
+
# Codex
|
|
90
|
+
opentoken cx --key <your-api-key> --model <前缀>/gpt-5.5 --url https://omniroute.goio.uk/v1
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## --header
|
|
94
|
+
|
|
95
|
+
为模型 ID 添加前缀,例如:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
opentoken cc --key sk-xxxxx --header vor
|
|
99
|
+
# 模型变为 vor/claude-opus-4-8
|
|
100
|
+
```
|
|
101
|
+
|
|
59
102
|
## 写入字段
|
|
60
103
|
|
|
61
104
|
### Claude Code(`~/.claude/settings.json`)
|
|
@@ -77,24 +120,4 @@ opentoken cx --key sk-xxxxx --model gpt-5.5 --url https://gw.opentoken.io/v1
|
|
|
77
120
|
- `tui.model_availability_nux`
|
|
78
121
|
- `OPENAI_API_KEY`(写入 auth.json)
|
|
79
122
|
|
|
80
|
-
默认 Base URL:`https://gw.opentoken.io/v1`
|
|
81
|
-
|
|
82
|
-
## --header
|
|
83
|
-
|
|
84
|
-
为模型 ID 添加前缀,例如:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
opentoken cc --key sk-xxxxx --header vor
|
|
88
|
-
# 模型变为 vor/claude-opus-4-8
|
|
89
|
-
```
|
|
90
|
-
一键配置命令示例:
|
|
91
|
-
codex和claude code直接配置
|
|
92
|
-
opentoken cx --key your api key --model gpt-5.5 --url https://gw.opentoken.io/v1
|
|
93
|
-
opentoken cc --key your api key --model claude-opus-4-7 --url https://gw.opentoken.io
|
|
94
|
-
|
|
95
|
-
注意cc 的url没有/v1
|
|
96
|
-
|
|
97
|
-
codex和claude code连omni网关配置
|
|
98
|
-
opentoken cx --key your api key --model 前缀/gpt-5.5 --url
|
|
99
|
-
https://omniroute.goio.uk/v1
|
|
100
|
-
opentoken cc --key your api key --model 前缀/claude-opus-4-7 --url https://omniroute.goio.uk/v1
|
|
123
|
+
默认 Base URL:`https://gw.opentoken.io/v1`
|