cprofile 0.4.0
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/LICENSE +21 -0
- package/README.md +56 -0
- package/bin/cprofile +3 -0
- package/bin/cprofile-cli +3267 -0
- package/docs/NAMING.zh-CN.md +24 -0
- package/docs/QUICKSTART.zh-CN.md +25 -0
- package/docs/README.zh-CN.md +39 -0
- package/docs/TROUBLESHOOTING.zh-CN.md +83 -0
- package/package.json +42 -0
- package/shell/cprofile.sh +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Wilson Liu
|
|
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,56 @@
|
|
|
1
|
+
# cprofile
|
|
2
|
+
|
|
3
|
+
本地多账号切换工具(Codex + Claude),主打终端交互式切换、账号隔离、用量可视化(进度条)。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -g cprofile
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 快速开始
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cprofile
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
默认直接进入账号选择页:
|
|
18
|
+
- `↑/↓` 选择账号
|
|
19
|
+
- `Enter` 切换并启动
|
|
20
|
+
- 输入即搜索
|
|
21
|
+
- `R` 刷新用量
|
|
22
|
+
- `A` 添加账号
|
|
23
|
+
|
|
24
|
+
## Shell 集成(推荐)
|
|
25
|
+
|
|
26
|
+
为了让 `cprofile use ...` 直接影响当前 shell 环境,请在 `~/.zshrc` 或 `~/.bashrc` 里加入:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
source ~/.cprofile/cprofile.sh
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 用量说明
|
|
33
|
+
|
|
34
|
+
- Codex:支持 5h/week 已用/剩余(带缓存)
|
|
35
|
+
- Claude:默认显示 `--`;已内置实验探测模式:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
CPROFILE_CLAUDE_USAGE_EXPERIMENTAL=1 cprofile usage --tool claude
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
可选更激进 PTY 探测:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
CPROFILE_CLAUDE_USAGE_EXPERIMENTAL=1 CPROFILE_CLAUDE_USAGE_PTY=1 cprofile usage --tool claude
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 文档
|
|
48
|
+
|
|
49
|
+
- `docs/README.zh-CN.md`
|
|
50
|
+
- `docs/QUICKSTART.zh-CN.md`
|
|
51
|
+
- `docs/TROUBLESHOOTING.zh-CN.md`
|
|
52
|
+
- `docs/NAMING.zh-CN.md`
|
|
53
|
+
|
|
54
|
+
## 许可证
|
|
55
|
+
|
|
56
|
+
MIT
|
package/bin/cprofile
ADDED