kimi-code-usage 0.1.0__tar.gz → 0.1.2__tar.gz
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.
- kimi_code_usage-0.1.2/.claude/settings.local.json +23 -0
- kimi_code_usage-0.1.2/.gitignore +46 -0
- kimi_code_usage-0.1.2/PKG-INFO +190 -0
- kimi_code_usage-0.1.2/README.md +172 -0
- kimi_code_usage-0.1.2/README.zh.md +172 -0
- kimi_code_usage-0.1.2/docs/kimi-code-usage.md +54 -0
- kimi_code_usage-0.1.2/docs/superpowers/plans/2026-05-09-pace-indicator.md +220 -0
- kimi_code_usage-0.1.2/docs/superpowers/plans/2026-05-14-pace-theme-thresholds.md +501 -0
- kimi_code_usage-0.1.2/docs/superpowers/plans/2026-06-10-multi-llm-quota.md +108 -0
- kimi_code_usage-0.1.2/docs/superpowers/plans/2026-06-10-vscode-extension-ts-strictness.md +679 -0
- kimi_code_usage-0.1.2/docs/superpowers/specs/2026-05-09-pace-indicator-design.md +189 -0
- kimi_code_usage-0.1.2/docs/superpowers/specs/2026-05-14-pace-theme-thresholds-design.md +106 -0
- kimi_code_usage-0.1.2/docs/superpowers/specs/2026-06-10-multi-llm-quota-design.md +307 -0
- kimi_code_usage-0.1.2/docs/superpowers/specs/2026-06-10-vscode-extension-multi-provider-design.md +394 -0
- kimi_code_usage-0.1.2/docs/superpowers/specs/2026-06-10-vscode-extension-ts-refactor-design.md +115 -0
- kimi_code_usage-0.1.2/kimi_usage.code-workspace +42 -0
- {kimi_code_usage-0.1.0 → kimi_code_usage-0.1.2}/pyproject.toml +2 -1
- kimi_code_usage-0.1.2/src/kimi_code_usage/config.py +167 -0
- kimi_code_usage-0.1.2/src/kimi_code_usage/main.py +700 -0
- kimi_code_usage-0.1.2/src/kimi_code_usage/mcp.py +106 -0
- kimi_code_usage-0.1.2/src/kimi_code_usage/providers/__init__.py +73 -0
- kimi_code_usage-0.1.2/src/kimi_code_usage/providers/anthropic.py +69 -0
- kimi_code_usage-0.1.2/src/kimi_code_usage/providers/kimi.py +155 -0
- kimi_code_usage-0.1.2/src/kimi_code_usage/providers/openai.py +74 -0
- kimi_code_usage-0.1.2/src/kimi_code_usage/providers/openrouter.py +259 -0
- kimi_code_usage-0.1.2/tests/__init__.py +0 -0
- kimi_code_usage-0.1.2/tests/conftest.py +3 -0
- kimi_code_usage-0.1.2/tests/test_config.py +229 -0
- kimi_code_usage-0.1.2/tests/test_main.py +861 -0
- kimi_code_usage-0.1.2/tests/test_mcp.py +134 -0
- kimi_code_usage-0.1.2/tests/test_provider_anthropic.py +82 -0
- kimi_code_usage-0.1.2/tests/test_provider_kimi.py +247 -0
- kimi_code_usage-0.1.2/tests/test_provider_openai.py +187 -0
- kimi_code_usage-0.1.2/tests/test_provider_openrouter.py +442 -0
- kimi_code_usage-0.1.2/tests/test_providers_init.py +94 -0
- {kimi_code_usage-0.1.0 → kimi_code_usage-0.1.2}/uv.lock +17 -1
- kimi_code_usage-0.1.2/vscode-extension/.claude/settings.local.json +8 -0
- kimi_code_usage-0.1.2/vscode-extension/.github/workflows/ci.yml +34 -0
- kimi_code_usage-0.1.2/vscode-extension/.prettierignore +10 -0
- kimi_code_usage-0.1.2/vscode-extension/.prettierrc.json +9 -0
- kimi_code_usage-0.1.2/vscode-extension/.vscodeignore +19 -0
- kimi_code_usage-0.1.2/vscode-extension/README.md +236 -0
- kimi_code_usage-0.1.2/vscode-extension/assets/icon.png +0 -0
- kimi_code_usage-0.1.2/vscode-extension/assets/moon.svg +3 -0
- kimi_code_usage-0.1.2/vscode-extension/eslint.config.mjs +48 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.de.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.en.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.es.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.fr.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.it.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.ja.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.ko.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.pt.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.ru.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/l10n/bundle.l10n.zh-cn.json +151 -0
- kimi_code_usage-0.1.2/vscode-extension/package.json +277 -0
- kimi_code_usage-0.1.2/vscode-extension/scripts/copy-assets.ts +24 -0
- kimi_code_usage-0.1.2/vscode-extension/src/__mocks__/vscode.ts +125 -0
- kimi_code_usage-0.1.2/vscode-extension/src/api.test.ts +641 -0
- kimi_code_usage-0.1.2/vscode-extension/src/api.ts +339 -0
- kimi_code_usage-0.1.2/vscode-extension/src/apiCache.test.ts +123 -0
- kimi_code_usage-0.1.2/vscode-extension/src/apiCache.ts +62 -0
- kimi_code_usage-0.1.2/vscode-extension/src/config.test.ts +298 -0
- kimi_code_usage-0.1.2/vscode-extension/src/config.ts +113 -0
- kimi_code_usage-0.1.2/vscode-extension/src/extension.test.ts +581 -0
- kimi_code_usage-0.1.2/vscode-extension/src/extension.ts +147 -0
- kimi_code_usage-0.1.2/vscode-extension/src/historyPanel.test.ts +359 -0
- kimi_code_usage-0.1.2/vscode-extension/src/historyPanel.ts +641 -0
- kimi_code_usage-0.1.2/vscode-extension/src/i18n.test.ts +247 -0
- kimi_code_usage-0.1.2/vscode-extension/src/i18n.ts +124 -0
- kimi_code_usage-0.1.2/vscode-extension/src/notifier.test.ts +213 -0
- kimi_code_usage-0.1.2/vscode-extension/src/notifier.ts +101 -0
- kimi_code_usage-0.1.2/vscode-extension/src/pace.test.ts +246 -0
- kimi_code_usage-0.1.2/vscode-extension/src/pace.ts +141 -0
- kimi_code_usage-0.1.2/vscode-extension/src/predict.test.ts +578 -0
- kimi_code_usage-0.1.2/vscode-extension/src/predict.ts +180 -0
- kimi_code_usage-0.1.2/vscode-extension/src/statusBar.test.ts +947 -0
- kimi_code_usage-0.1.2/vscode-extension/src/statusBar.ts +423 -0
- kimi_code_usage-0.1.2/vscode-extension/src/storage-unlink.test.ts +36 -0
- kimi_code_usage-0.1.2/vscode-extension/src/storage.test.ts +233 -0
- kimi_code_usage-0.1.2/vscode-extension/src/storage.ts +137 -0
- kimi_code_usage-0.1.2/vscode-extension/src/types.ts +102 -0
- kimi_code_usage-0.1.2/vscode-extension/src/vscode-mock.test.ts +106 -0
- kimi_code_usage-0.1.2/vscode-extension/tsconfig.eslint.json +10 -0
- kimi_code_usage-0.1.2/vscode-extension/tsconfig.json +20 -0
- kimi_code_usage-0.1.2/vscode-extension/vitest.config.ts +16 -0
- kimi_code_usage-0.1.0/.gitignore +0 -29
- kimi_code_usage-0.1.0/PKG-INFO +0 -121
- kimi_code_usage-0.1.0/README.md +0 -104
- kimi_code_usage-0.1.0/src/kimi_code_usage/main.py +0 -229
- kimi_code_usage-0.1.0/src/kimi_code_usage/mcp.py +0 -51
- kimi_code_usage-0.1.0/vscode-extension/.vscodeignore +0 -9
- kimi_code_usage-0.1.0/vscode-extension/README.md +0 -89
- kimi_code_usage-0.1.0/vscode-extension/assets/banner.png +0 -0
- kimi_code_usage-0.1.0/vscode-extension/assets/icon.png +0 -0
- kimi_code_usage-0.1.0/vscode-extension/assets/screenshot.png +0 -0
- kimi_code_usage-0.1.0/vscode-extension/l10n/bundle.l10n.json +0 -12
- kimi_code_usage-0.1.0/vscode-extension/l10n/bundle.l10n.zh-cn.json +0 -12
- kimi_code_usage-0.1.0/vscode-extension/package.json +0 -80
- kimi_code_usage-0.1.0/vscode-extension/package.nls.json +0 -11
- kimi_code_usage-0.1.0/vscode-extension/package.nls.zh-cn.json +0 -11
- kimi_code_usage-0.1.0/vscode-extension/src/extension.ts +0 -273
- kimi_code_usage-0.1.0/vscode-extension/tsconfig.json +0 -15
- {kimi_code_usage-0.1.0 → kimi_code_usage-0.1.2}/.env.example +0 -0
- {kimi_code_usage-0.1.0 → kimi_code_usage-0.1.2}/requirements.txt +0 -0
- {kimi_code_usage-0.1.0 → kimi_code_usage-0.1.2}/src/kimi_code_usage/__init__.py +0 -0
- {kimi_code_usage-0.1.0 → kimi_code_usage-0.1.2}/vscode-extension/LICENSE +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Skill(superpowers:subagent-driven-development)",
|
|
5
|
+
"Bash(node -e \"JSON.parse\\(require\\('fs'\\).readFileSync\\('package.json'\\)\\); console.log\\('JSON valid'\\)\")",
|
|
6
|
+
"Bash(rtk grep *)",
|
|
7
|
+
"Bash(rtk npm *)",
|
|
8
|
+
"Bash(python3 *)",
|
|
9
|
+
"Bash(rtk ls *)",
|
|
10
|
+
"Bash(uv run *)",
|
|
11
|
+
"Bash(rtk read *)",
|
|
12
|
+
"WebFetch(domain:github.com)",
|
|
13
|
+
"WebSearch",
|
|
14
|
+
"WebFetch(domain:www.sensenova.cn)",
|
|
15
|
+
"WebFetch(domain:www.opencode.ai)",
|
|
16
|
+
"WebFetch(domain:platform.sensenova.cn)",
|
|
17
|
+
"Bash(curl -s -X POST http://127.0.0.1:10086/command -H 'Content-Type: application/json' -d '{\"action\":\"evaluate\",\"args\":{\"code\":\"\\(\\(\\)=>{let p=performance.getEntriesByType\\(\\\\\"resource\\\\\"\\)||[];return JSON.stringify\\(p.slice\\(0,20\\).map\\(e=>e.name.split\\(\\\\\"?\\\\\"\\)[0]\\).filter\\(u=>u.includes\\(\\\\\"sensenova\\\\\"\\)||u.includes\\(\\\\\"api\\\\\"\\)||u.includes\\(\\\\\"cs\\\\\"\\)||u.includes\\(\\\\\"nova\\\\\"\\)\\)\\).slice\\(0,5000\\)}\\)\\(\\)\"},\"session\":\"sensenova2\"}')",
|
|
18
|
+
"Bash(curl -s -X POST http://127.0.0.1:10086/command -H 'Content-Type: application/json' -d '{\"action\":\"evaluate\",\"args\":{\"code\":\"\\(async\\(\\)=>{let scriptUrls=Array.from\\(document.querySelectorAll\\(\\\\\"script[src]\\\\\"\\),s=>s.src\\).filter\\(s=>s.endsWith\\(\\\\\".js\\\\\"\\)\\);let apiMatches={};for\\(let url of scriptUrls.slice\\(0,30\\)\\){try{let r=await fetch\\(url\\);let t=await r.text\\(\\);let m=t.match\\(/[\\\\\"\\\\\\\\x27]\\(https?:\\\\\\\\/\\\\\\\\/[^\\\\\"\\\\\\\\x27]{10,}\\)[\\\\\"\\\\\\\\x27]/g\\);if\\(m\\){m.forEach\\(x=>{let u=x.replace\\(/[\\\\\"\\\\\\\\x27]/g,\\\\\"\\\\\"\\);if\\(u.includes\\(\\\\\".cn\\\\\"\\)||u.includes\\(\\\\\"api\\\\\"\\)||u.includes\\(\\\\\"nova\\\\\"\\)\\)apiMatches[u]=true}\\)}}catch\\(e\\){}}return JSON.stringify\\(Object.keys\\(apiMatches\\).slice\\(0,30\\)\\)}\\)\\(\\)\"},\"session\":\"sensenova2\"}')",
|
|
19
|
+
"Bash(curl -s -X POST http://127.0.0.1:10086/command -H 'Content-Type: application/json' -d '{\"action\":\"evaluate\",\"args\":{\"code\":\"\\(async\\(\\)=>{var tries=[\\\\\"5750\\\\\",\\\\\"1408\\\\\",\\\\\"5346\\\\\",\\\\\"4682\\\\\",\\\\\"9493\\\\\",\\\\\"3099\\\\\",\\\\\"4582\\\\\"];var out=[];for\\(let id of tries\\){try{var r=await fetch\\(\\\\\"/_next/static/chunks/\\\\\"+id+\\\\\"-acc76ae5e1746a4d.js\\\\\"\\);var t=await r.text\\(\\);var m=t.match\\(/[\\\\\"\\\\\\\\x27]\\(https?:\\\\\\\\/\\\\\\\\/[^\\\\\\\\\\\\\"\\\\\\\\x27]{10,}\\)[\\\\\"\\\\\\\\x27]/g\\);if\\(m\\){let u=[...new Set\\(m.map\\(x=>x.replace\\(/[\\\\\"\\\\\\\\x27]/g,\\\\\"\\\\\"\\)\\).filter\\(x=>x.includes\\(\\\\\".\\\\\"\\)&&!x.includes\\(\\\\\"_next\\\\\"\\)\\)\\)];if\\(u.length>0\\)out.push\\(id+\\\\\": \\\\\"+JSON.stringify\\(u.slice\\(0,10\\)\\)\\)}}catch\\(e\\){try{r=await fetch\\(\\\\\"/_next/static/chunks/\\\\\"+id+\\\\\"-9bebaa28b82e0188.js\\\\\"\\);t=await r.text\\(\\);m=t.match\\(/[\\\\\"\\\\\\\\x27]\\(https?:\\\\\\\\/\\\\\\\\/[^\\\\\"\\\\\\\\x27]{10,}\\)[\\\\\"\\\\\\\\x27]/g\\);if\\(m\\){let u=[...new Set\\(m.map\\(x=>x.replace\\(/[\\\\\"\\\\\\\\x27]/g,\\\\\"\\\\\"\\)\\).filter\\(x=>x.includes\\(\\\\\".\\\\\"\\)&&!x.includes\\(\\\\\"_next\\\\\"\\)\\)\\)];if\\(u.length>0\\)out.push\\(id+\\\\\": \\\\\"+JSON.stringify\\(u.slice\\(0,10\\)\\)\\)}}catch\\(e2\\){}}}return out.join\\(\\\\\"; \\\\\"\\)||\\\\\"none\\\\\"}\\)\\(\\)\"},\"session\":\"sensenova2\"}')",
|
|
20
|
+
"Bash(curl -s -X POST http://127.0.0.1:10086/command -H 'Content-Type: application/json' -d '{\"action\":\"evaluate\",\"args\":{\"code\":\"\\(async\\(\\)=>{var tries=[\\\\\"/console?_rsc=z1g34\\\\\",\\\\\"/console?_rsc=1p5nq\\\\\"];var out=[];for\\(let u of tries\\){try{var r=await fetch\\(u\\);var t=await r.text\\(\\);out.push\\(u+\\\\\" -> \\\\\"+r.status+\\\\\" \\\\\"+r.headers.get\\(\\\\\"content-type\\\\\"\\)+\\\\\" \\\\\"+t.slice\\(0,200\\)\\)}catch\\(e\\){out.push\\(u+\\\\\" ERROR\\\\\"\\)}}return out.join\\(\\\\\"|||\\\\\"\\)}\\)\\(\\)\"},\"session\":\"sensenova2\"}')"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Environment / Secrets
|
|
2
|
+
.env
|
|
3
|
+
*.env
|
|
4
|
+
|
|
5
|
+
# Python
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
*.egg-info/
|
|
10
|
+
dist/
|
|
11
|
+
build/
|
|
12
|
+
|
|
13
|
+
# Node.js
|
|
14
|
+
node_modules/
|
|
15
|
+
package-lock.json
|
|
16
|
+
|
|
17
|
+
# VSCode Extension artifacts
|
|
18
|
+
*.vsix
|
|
19
|
+
vscode-extension/out/
|
|
20
|
+
vscode-extension/archive/
|
|
21
|
+
|
|
22
|
+
# IDE
|
|
23
|
+
.vscode/
|
|
24
|
+
.idea/
|
|
25
|
+
*.swp
|
|
26
|
+
*.swo
|
|
27
|
+
|
|
28
|
+
# OS
|
|
29
|
+
.DS_Store
|
|
30
|
+
Thumbs.db
|
|
31
|
+
# Skill-generated analysis artifacts
|
|
32
|
+
.understand-anything/
|
|
33
|
+
.codegraph/
|
|
34
|
+
|
|
35
|
+
# Python test artifacts
|
|
36
|
+
.pytest_cache/
|
|
37
|
+
.coverage
|
|
38
|
+
.coverage.*
|
|
39
|
+
|
|
40
|
+
# Node / Vitest coverage
|
|
41
|
+
vscode-extension/coverage/
|
|
42
|
+
|
|
43
|
+
# VS Code extension test runner
|
|
44
|
+
.vscode-test/
|
|
45
|
+
**/*.js.map
|
|
46
|
+
tokscale-export-*.json
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kimi-code-usage
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: A curated Kimi Coding Plan usage monitor with aesthetic CLI and MCP server.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Golden0Voyager/kimi-code-usage
|
|
6
|
+
Project-URL: Repository, https://github.com/Golden0Voyager/kimi-code-usage
|
|
7
|
+
Project-URL: Issues, https://github.com/Golden0Voyager/kimi-code-usage/issues
|
|
8
|
+
Author-email: Haining Yu <hainingyu@gmail.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
Keywords: curated,kimi,mcp,monitor,moonshot,usage
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
13
|
+
Requires-Dist: fastmcp>=0.1.0
|
|
14
|
+
Requires-Dist: httpx[socks]>=0.20.0
|
|
15
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
16
|
+
Requires-Dist: rich>=12.0.0
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
<pre align="center">
|
|
20
|
+
██╗ ██╗ ██╗ ███╗ ███╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗
|
|
21
|
+
██║ ██╔╝ ██║ ████╗ ████║ ██║ ██╔════╝ ██╔═══██╗ ██╔══██╗ ██╔════╝
|
|
22
|
+
█████╔╝ ██║ ██╔████╔██║ ██║ ██║ ██║ ██║ ██║ ██║ █████╗
|
|
23
|
+
██╔═██╗ ██║ ██║╚██╔╝██║ ██║ ██║ ██║ ██║ ██║ ██║ ██╔══╝
|
|
24
|
+
██║ ██╗ ██║ ██║ ╚═╝ ██║ ██║ ╚██████╗ ╚██████╔╝ ██████╔╝ ███████╗
|
|
25
|
+
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
|
|
26
|
+
</pre>
|
|
27
|
+
|
|
28
|
+
> **English** · [中文](README.zh.md)
|
|
29
|
+
|
|
30
|
+
# Kimi Code Usage: The Curated Toolchain
|
|
31
|
+
|
|
32
|
+
**Manifesting your AI quota with aesthetic precision across CLI, MCP, and VS Code.**
|
|
33
|
+
|
|
34
|
+
-100%25%20coverage-brightgreen)
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### 🌟 Project Vision
|
|
40
|
+
|
|
41
|
+
In the era of "Vibecoding," transparency of resources is a prerequisite for flow. **Kimi Code Usage** is a meticulously crafted toolchain — three components, one soul.
|
|
42
|
+
|
|
43
|
+
**Prerequisite:** A [Kimi Coding Plan](https://api.kimi.com/coding/v1) API Key, set as `KIMI_API_KEY` in your environment or `.env` file.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### ⚡ CLI Reporter
|
|
48
|
+
|
|
49
|
+
> A Rich-rendered panel in your terminal. Zero noise, pure signal.
|
|
50
|
+
|
|
51
|
+
**Install & Run:**
|
|
52
|
+
```bash
|
|
53
|
+
pip install kimi-code-usage
|
|
54
|
+
kimi-usage # Aesthetic Rich panel
|
|
55
|
+
kimi-usage --json # Machine-readable JSON
|
|
56
|
+
kimi-usage --plain # Plain text output
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Or run instantly without installing:
|
|
60
|
+
```bash
|
|
61
|
+
uvx kimi-code-usage
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### 🔍 MCP Server
|
|
67
|
+
|
|
68
|
+
> Exposes `get_kimi_usage` to any MCP-compatible AI Agent.
|
|
69
|
+
|
|
70
|
+
Compatible with **Claude Code, Cursor, Windsurf, Hermes**, and any MCP-enabled agent.
|
|
71
|
+
|
|
72
|
+
**Add to your MCP config** (e.g., `~/.claude/settings.json`):
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"kimi-code-usage": {
|
|
77
|
+
"command": "uvx",
|
|
78
|
+
"args": ["--from", "kimi-code-usage", "kimi-mcp"],
|
|
79
|
+
"env": {
|
|
80
|
+
"KIMI_API_KEY": "YOUR_KEY"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
> **Note:** The MCP server still needs `--from` because `kimi-mcp` is a separate command from the default `kimi-code-usage` entry point.
|
|
88
|
+
|
|
89
|
+
Then simply ask your AI: *"Check my Kimi quota."*
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### 💎 VS Code Extension
|
|
94
|
+
|
|
95
|
+
> A sleek status bar indicator with sensory color alerting.
|
|
96
|
+
|
|
97
|
+
**Install:** Search `Kimi Code Usage` in the VS Code Marketplace, or:
|
|
98
|
+
```bash
|
|
99
|
+
code --install-extension HainingYu.kimi-code-usage
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Configure** (`Settings > Kimi Code Usage`):
|
|
103
|
+
|
|
104
|
+
| Setting | Description | Default |
|
|
105
|
+
| :--- | :--- | :--- |
|
|
106
|
+
| `kimiCodeUsage.apiKey` | API key (or reads `KIMI_CODING_API_KEY`/`KIMI_API_KEY` env) | `""` |
|
|
107
|
+
| `kimiCodeUsage.baseUrl` | API Base URL | `"https://api.kimi.com/coding/v1"` |
|
|
108
|
+
| `kimiCodeUsage.refreshIntervalMinutes` | Auto-refresh interval in minutes | `5` |
|
|
109
|
+
| `kimiCodeUsage.weeklyLowThresholdPercent` | Weekly low quota warning threshold (%) | `30` |
|
|
110
|
+
| `kimiCodeUsage.fiveHourLowThresholdPercent` | 5-hour low quota warning threshold (%) | `15` |
|
|
111
|
+
| `kimiCodeUsage.showPaceIndicator` | Show pace indicator (Fast/Normal/Slow) | `true` |
|
|
112
|
+
| `kimiCodeUsage.showPaceBar` | Show pace bar in status bar | `true` |
|
|
113
|
+
|
|
114
|
+
**Usage:** Status bar shows `🌕 [===] Wee:96% 5Ho:99%`. Hover for details. `Cmd+Shift+P → Kimi: Refresh`.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 📊 Real-World Analysis
|
|
119
|
+
|
|
120
|
+
> *How much does a ¥199/mo Coding Plan actually cover? Real data from 5 months of heavy vibe coding, with a cost comparison against standard API pricing.*
|
|
121
|
+
|
|
122
|
+
**Full data → [`docs/kimi-code-usage.md`](docs/kimi-code-usage.md)**
|
|
123
|
+
|
|
124
|
+
### 1. Profile
|
|
125
|
+
|
|
126
|
+
| Item | Detail |
|
|
127
|
+
|:---|:---|
|
|
128
|
+
| Plan | Tier 3 Allegretto ($31/mo) → **¥199/mo** |
|
|
129
|
+
| Workflow | Claude Code + kimi-for-coding, heavy vibe coding |
|
|
130
|
+
| Data Period | 2026-01 ~ 2026-05 full records (~3,152M tokens) |
|
|
131
|
+
|
|
132
|
+
### 2. Token Composition
|
|
133
|
+
|
|
134
|
+
| Component | 5-Month Total | Share |
|
|
135
|
+
|:---|:---|---:|
|
|
136
|
+
| Input (Cache Miss) | ~154M | 4.9% |
|
|
137
|
+
| Cache Created | ~89M | 2.8% |
|
|
138
|
+
| Output | ~12M | 0.4% |
|
|
139
|
+
| **Cache Read (Cache Hit)** | **~2,896M** | **91.9%** |
|
|
140
|
+
| **Total** | **~3,152M** | **100%** |
|
|
141
|
+
|
|
142
|
+
A **91.9% cache hit rate** is the signature of vibe coding — long sessions where each turn carries full conversation history, and only the latest exchange is fresh.
|
|
143
|
+
|
|
144
|
+
### 3. Actual Monthly Burn
|
|
145
|
+
|
|
146
|
+
Based on continuous weekly sampling (3 days = 30% of weekly quota):
|
|
147
|
+
|
|
148
|
+
| Metric | Value |
|
|
149
|
+
|:---|:---:|
|
|
150
|
+
| Weekly Burn | ~320M tokens |
|
|
151
|
+
| **Monthly Burn** | **≈ 1.37 ~ 1.5 billion tokens** |
|
|
152
|
+
| Plan Cost | ¥199/mo |
|
|
153
|
+
| **Effective Rate** | **≈ ¥0.14 / million tokens** |
|
|
154
|
+
|
|
155
|
+
### 4. Cost Comparison
|
|
156
|
+
|
|
157
|
+
Priced against **Kimi K2.6 standard API rates** (input ¥6.50 / cache ¥1.10 / output ¥27.00 per million tokens):
|
|
158
|
+
|
|
159
|
+
| Scenario | Cost/Month | Multiple |
|
|
160
|
+
|:---|:---:|:---:|
|
|
161
|
+
| **Kimi Coding Plan (¥199)** | **¥199** | **1×** |
|
|
162
|
+
| Pay-as-you-go (K2.6 standard) | **≈ ¥2,420** | **12.2×** |
|
|
163
|
+
|
|
164
|
+
| Pay-as-you-go Breakdown | Volume/Month | Rate | Cost |
|
|
165
|
+
|:---|---:|:---:|---:|
|
|
166
|
+
| Input (Cache Miss) | 73.5M | ¥6.50/MTok | ¥478 |
|
|
167
|
+
| Cache Read (Hit) | 1,378.5M | ¥1.10/MTok | ¥1,516 |
|
|
168
|
+
| Output | 5.55M | ¥27.00/MTok | ¥150 |
|
|
169
|
+
| Cache Created | 42.5M | ¥6.50/MTok | ¥276 |
|
|
170
|
+
| **Total** | **1.5B** | | **¥2,420** |
|
|
171
|
+
|
|
172
|
+
### 5. Bottom Line
|
|
173
|
+
|
|
174
|
+
> **The Coding Plan saves heavy users ≈ ¥2,221/month (~92%).** Cache reads account for 92% of total tokens; the plan bundles both cache and input into the subscription fee. Under pay-as-you-go, cache alone makes up 63% of the bill.
|
|
175
|
+
|
|
176
|
+
### ⚠️ Disclaimer
|
|
177
|
+
|
|
178
|
+
> This analysis reflects one user's actual usage from 2026-01 to 2026-05 via `ccusage`. Token ratios and cost estimates are for **reference only** — actual results vary by session pattern, model choice, caching behavior, and API pricing. Rates sourced from [platform.kimi.com](https://platform.kimi.com) as of 2026-05-24.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### 🎨 About the Curator
|
|
183
|
+
|
|
184
|
+
Crafted with ❤️ by **Haining Yu**, an Art Curator and Vibecoder. This toolchain is part of a curated collection designed to bridge the gap between aesthetic curation and intuitive, AI-powered coding.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
<p align="center">
|
|
189
|
+
<strong>Enjoy the flow. Stay in the vibe.</strong>
|
|
190
|
+
</p>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<pre align="center">
|
|
2
|
+
██╗ ██╗ ██╗ ███╗ ███╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗
|
|
3
|
+
██║ ██╔╝ ██║ ████╗ ████║ ██║ ██╔════╝ ██╔═══██╗ ██╔══██╗ ██╔════╝
|
|
4
|
+
█████╔╝ ██║ ██╔████╔██║ ██║ ██║ ██║ ██║ ██║ ██║ █████╗
|
|
5
|
+
██╔═██╗ ██║ ██║╚██╔╝██║ ██║ ██║ ██║ ██║ ██║ ██║ ██╔══╝
|
|
6
|
+
██║ ██╗ ██║ ██║ ╚═╝ ██║ ██║ ╚██████╗ ╚██████╔╝ ██████╔╝ ███████╗
|
|
7
|
+
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
|
|
8
|
+
</pre>
|
|
9
|
+
|
|
10
|
+
> **English** · [中文](README.zh.md)
|
|
11
|
+
|
|
12
|
+
# Kimi Code Usage: The Curated Toolchain
|
|
13
|
+
|
|
14
|
+
**Manifesting your AI quota with aesthetic precision across CLI, MCP, and VS Code.**
|
|
15
|
+
|
|
16
|
+
-100%25%20coverage-brightgreen)
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### 🌟 Project Vision
|
|
22
|
+
|
|
23
|
+
In the era of "Vibecoding," transparency of resources is a prerequisite for flow. **Kimi Code Usage** is a meticulously crafted toolchain — three components, one soul.
|
|
24
|
+
|
|
25
|
+
**Prerequisite:** A [Kimi Coding Plan](https://api.kimi.com/coding/v1) API Key, set as `KIMI_API_KEY` in your environment or `.env` file.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### ⚡ CLI Reporter
|
|
30
|
+
|
|
31
|
+
> A Rich-rendered panel in your terminal. Zero noise, pure signal.
|
|
32
|
+
|
|
33
|
+
**Install & Run:**
|
|
34
|
+
```bash
|
|
35
|
+
pip install kimi-code-usage
|
|
36
|
+
kimi-usage # Aesthetic Rich panel
|
|
37
|
+
kimi-usage --json # Machine-readable JSON
|
|
38
|
+
kimi-usage --plain # Plain text output
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Or run instantly without installing:
|
|
42
|
+
```bash
|
|
43
|
+
uvx kimi-code-usage
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### 🔍 MCP Server
|
|
49
|
+
|
|
50
|
+
> Exposes `get_kimi_usage` to any MCP-compatible AI Agent.
|
|
51
|
+
|
|
52
|
+
Compatible with **Claude Code, Cursor, Windsurf, Hermes**, and any MCP-enabled agent.
|
|
53
|
+
|
|
54
|
+
**Add to your MCP config** (e.g., `~/.claude/settings.json`):
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"mcpServers": {
|
|
58
|
+
"kimi-code-usage": {
|
|
59
|
+
"command": "uvx",
|
|
60
|
+
"args": ["--from", "kimi-code-usage", "kimi-mcp"],
|
|
61
|
+
"env": {
|
|
62
|
+
"KIMI_API_KEY": "YOUR_KEY"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
> **Note:** The MCP server still needs `--from` because `kimi-mcp` is a separate command from the default `kimi-code-usage` entry point.
|
|
70
|
+
|
|
71
|
+
Then simply ask your AI: *"Check my Kimi quota."*
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### 💎 VS Code Extension
|
|
76
|
+
|
|
77
|
+
> A sleek status bar indicator with sensory color alerting.
|
|
78
|
+
|
|
79
|
+
**Install:** Search `Kimi Code Usage` in the VS Code Marketplace, or:
|
|
80
|
+
```bash
|
|
81
|
+
code --install-extension HainingYu.kimi-code-usage
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Configure** (`Settings > Kimi Code Usage`):
|
|
85
|
+
|
|
86
|
+
| Setting | Description | Default |
|
|
87
|
+
| :--- | :--- | :--- |
|
|
88
|
+
| `kimiCodeUsage.apiKey` | API key (or reads `KIMI_CODING_API_KEY`/`KIMI_API_KEY` env) | `""` |
|
|
89
|
+
| `kimiCodeUsage.baseUrl` | API Base URL | `"https://api.kimi.com/coding/v1"` |
|
|
90
|
+
| `kimiCodeUsage.refreshIntervalMinutes` | Auto-refresh interval in minutes | `5` |
|
|
91
|
+
| `kimiCodeUsage.weeklyLowThresholdPercent` | Weekly low quota warning threshold (%) | `30` |
|
|
92
|
+
| `kimiCodeUsage.fiveHourLowThresholdPercent` | 5-hour low quota warning threshold (%) | `15` |
|
|
93
|
+
| `kimiCodeUsage.showPaceIndicator` | Show pace indicator (Fast/Normal/Slow) | `true` |
|
|
94
|
+
| `kimiCodeUsage.showPaceBar` | Show pace bar in status bar | `true` |
|
|
95
|
+
|
|
96
|
+
**Usage:** Status bar shows `🌕 [===] Wee:96% 5Ho:99%`. Hover for details. `Cmd+Shift+P → Kimi: Refresh`.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 📊 Real-World Analysis
|
|
101
|
+
|
|
102
|
+
> *How much does a ¥199/mo Coding Plan actually cover? Real data from 5 months of heavy vibe coding, with a cost comparison against standard API pricing.*
|
|
103
|
+
|
|
104
|
+
**Full data → [`docs/kimi-code-usage.md`](docs/kimi-code-usage.md)**
|
|
105
|
+
|
|
106
|
+
### 1. Profile
|
|
107
|
+
|
|
108
|
+
| Item | Detail |
|
|
109
|
+
|:---|:---|
|
|
110
|
+
| Plan | Tier 3 Allegretto ($31/mo) → **¥199/mo** |
|
|
111
|
+
| Workflow | Claude Code + kimi-for-coding, heavy vibe coding |
|
|
112
|
+
| Data Period | 2026-01 ~ 2026-05 full records (~3,152M tokens) |
|
|
113
|
+
|
|
114
|
+
### 2. Token Composition
|
|
115
|
+
|
|
116
|
+
| Component | 5-Month Total | Share |
|
|
117
|
+
|:---|:---|---:|
|
|
118
|
+
| Input (Cache Miss) | ~154M | 4.9% |
|
|
119
|
+
| Cache Created | ~89M | 2.8% |
|
|
120
|
+
| Output | ~12M | 0.4% |
|
|
121
|
+
| **Cache Read (Cache Hit)** | **~2,896M** | **91.9%** |
|
|
122
|
+
| **Total** | **~3,152M** | **100%** |
|
|
123
|
+
|
|
124
|
+
A **91.9% cache hit rate** is the signature of vibe coding — long sessions where each turn carries full conversation history, and only the latest exchange is fresh.
|
|
125
|
+
|
|
126
|
+
### 3. Actual Monthly Burn
|
|
127
|
+
|
|
128
|
+
Based on continuous weekly sampling (3 days = 30% of weekly quota):
|
|
129
|
+
|
|
130
|
+
| Metric | Value |
|
|
131
|
+
|:---|:---:|
|
|
132
|
+
| Weekly Burn | ~320M tokens |
|
|
133
|
+
| **Monthly Burn** | **≈ 1.37 ~ 1.5 billion tokens** |
|
|
134
|
+
| Plan Cost | ¥199/mo |
|
|
135
|
+
| **Effective Rate** | **≈ ¥0.14 / million tokens** |
|
|
136
|
+
|
|
137
|
+
### 4. Cost Comparison
|
|
138
|
+
|
|
139
|
+
Priced against **Kimi K2.6 standard API rates** (input ¥6.50 / cache ¥1.10 / output ¥27.00 per million tokens):
|
|
140
|
+
|
|
141
|
+
| Scenario | Cost/Month | Multiple |
|
|
142
|
+
|:---|:---:|:---:|
|
|
143
|
+
| **Kimi Coding Plan (¥199)** | **¥199** | **1×** |
|
|
144
|
+
| Pay-as-you-go (K2.6 standard) | **≈ ¥2,420** | **12.2×** |
|
|
145
|
+
|
|
146
|
+
| Pay-as-you-go Breakdown | Volume/Month | Rate | Cost |
|
|
147
|
+
|:---|---:|:---:|---:|
|
|
148
|
+
| Input (Cache Miss) | 73.5M | ¥6.50/MTok | ¥478 |
|
|
149
|
+
| Cache Read (Hit) | 1,378.5M | ¥1.10/MTok | ¥1,516 |
|
|
150
|
+
| Output | 5.55M | ¥27.00/MTok | ¥150 |
|
|
151
|
+
| Cache Created | 42.5M | ¥6.50/MTok | ¥276 |
|
|
152
|
+
| **Total** | **1.5B** | | **¥2,420** |
|
|
153
|
+
|
|
154
|
+
### 5. Bottom Line
|
|
155
|
+
|
|
156
|
+
> **The Coding Plan saves heavy users ≈ ¥2,221/month (~92%).** Cache reads account for 92% of total tokens; the plan bundles both cache and input into the subscription fee. Under pay-as-you-go, cache alone makes up 63% of the bill.
|
|
157
|
+
|
|
158
|
+
### ⚠️ Disclaimer
|
|
159
|
+
|
|
160
|
+
> This analysis reflects one user's actual usage from 2026-01 to 2026-05 via `ccusage`. Token ratios and cost estimates are for **reference only** — actual results vary by session pattern, model choice, caching behavior, and API pricing. Rates sourced from [platform.kimi.com](https://platform.kimi.com) as of 2026-05-24.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
### 🎨 About the Curator
|
|
165
|
+
|
|
166
|
+
Crafted with ❤️ by **Haining Yu**, an Art Curator and Vibecoder. This toolchain is part of a curated collection designed to bridge the gap between aesthetic curation and intuitive, AI-powered coding.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
<p align="center">
|
|
171
|
+
<strong>Enjoy the flow. Stay in the vibe.</strong>
|
|
172
|
+
</p>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<pre align="center">
|
|
2
|
+
██╗ ██╗ ██╗ ███╗ ███╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗
|
|
3
|
+
██║ ██╔╝ ██║ ████╗ ████║ ██║ ██╔════╝ ██╔═══██╗ ██╔══██╗ ██╔════╝
|
|
4
|
+
█████╔╝ ██║ ██╔████╔██║ ██║ ██║ ██║ ██║ ██║ ██║ █████╗
|
|
5
|
+
██╔═██╗ ██║ ██║╚██╔╝██║ ██║ ██║ ██║ ██║ ██║ ██║ ██╔══╝
|
|
6
|
+
██║ ██╗ ██║ ██║ ╚═╝ ██║ ██║ ╚██████╗ ╚██████╔╝ ██████╔╝ ███████╗
|
|
7
|
+
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
|
|
8
|
+
</pre>
|
|
9
|
+
|
|
10
|
+
> [English](README.md) · **中文**
|
|
11
|
+
|
|
12
|
+
# Kimi Code Usage:三端工具链
|
|
13
|
+
|
|
14
|
+
**以优雅的姿态,在终端、AI 助手与编辑器中感知你的 AI 额度。**
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### 🌟 项目愿景
|
|
22
|
+
|
|
23
|
+
在"直觉编程"时代,资源的透明度是进入心流状态的前提。**Kimi Code Usage** 是一套精心打磨的工具链 — 三种形态,一个灵魂。
|
|
24
|
+
|
|
25
|
+
**统一前提:** 在环境变量或 `.env` 文件中设置 `KIMI_API_KEY`([Kimi Coding Plan](https://api.kimi.com/coding/v1) API Key)。
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### ⚡ CLI 终端报告器
|
|
30
|
+
|
|
31
|
+
> 在你的终端中渲染出带有工业美感的配额面板。
|
|
32
|
+
|
|
33
|
+
**安装与运行:**
|
|
34
|
+
```bash
|
|
35
|
+
pip install kimi-code-usage
|
|
36
|
+
kimi-usage # 美观的 Rich 面板
|
|
37
|
+
kimi-usage --json # 机器可读的 JSON
|
|
38
|
+
kimi-usage --plain # 纯文本输出
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
或免安装直接运行:
|
|
42
|
+
```bash
|
|
43
|
+
uvx kimi-code-usage
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### 🔍 MCP 智能体接口
|
|
49
|
+
|
|
50
|
+
> 让你的 AI 助手能够主动感知你的额度状态。
|
|
51
|
+
|
|
52
|
+
兼容 **Claude Code、Cursor、Windsurf、Hermes** 及所有支持 MCP 的 AI 工具。
|
|
53
|
+
|
|
54
|
+
**添加到 MCP 配置**(如 `~/.claude/settings.json`):
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"mcpServers": {
|
|
58
|
+
"kimi-code-usage": {
|
|
59
|
+
"command": "uvx",
|
|
60
|
+
"args": ["--from", "kimi-code-usage", "kimi-mcp"],
|
|
61
|
+
"env": {
|
|
62
|
+
"KIMI_API_KEY": "YOUR_KEY"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
> **注意:** MCP 服务器需要 `--from` 参数,因为 `kimi-mcp` 是独立于默认入口点的子命令。
|
|
70
|
+
|
|
71
|
+
配置后直接对 AI 说:*"帮我查一下 Kimi 用量。"*
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### 💎 VS Code 编辑器插件
|
|
76
|
+
|
|
77
|
+
> 状态栏实时显示剩余百分比,颜色随额度变化而呼吸。
|
|
78
|
+
|
|
79
|
+
**安装:** 在 VS Code 插件市场搜索 `Kimi Code Usage`,或运行:
|
|
80
|
+
```bash
|
|
81
|
+
code --install-extension HainingYu.kimi-code-usage
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**配置**(`设置 > Kimi Code Usage`):
|
|
85
|
+
|
|
86
|
+
| 设置项 | 说明 | 默认值 |
|
|
87
|
+
| :--- | :--- | :--- |
|
|
88
|
+
| `kimiCodeUsage.apiKey` | API 密钥(或读取 `KIMI_CODING_API_KEY`/`KIMI_API_KEY` 环境变量) | `""` |
|
|
89
|
+
| `kimiCodeUsage.baseUrl` | API 基础地址 | `"https://api.kimi.com/coding/v1"` |
|
|
90
|
+
| `kimiCodeUsage.refreshIntervalMinutes` | 自动刷新间隔(分钟) | `5` |
|
|
91
|
+
| `kimiCodeUsage.weeklyLowThresholdPercent` | 每周低余量告警阈值 (%) | `30` |
|
|
92
|
+
| `kimiCodeUsage.fiveHourLowThresholdPercent` | 5小时低余量告警阈值 (%) | `15` |
|
|
93
|
+
| `kimiCodeUsage.showPaceIndicator` | 显示速度指针(快/正常/慢) | `true` |
|
|
94
|
+
| `kimiCodeUsage.showPaceBar` | 在状态栏显示速度进度条 | `true` |
|
|
95
|
+
|
|
96
|
+
**使用:** 状态栏显示 `🌕 [===] Wee:96% 5Ho:99%`。悬停查看详情。`Cmd+Shift+P → Kimi: Refresh`。
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 📊 真实用量参考
|
|
101
|
+
|
|
102
|
+
> *¥199/月 Coding Plan 的实际用量是多少?对比按量付费能省多少?来自 5 个月的真实数据。*
|
|
103
|
+
|
|
104
|
+
**详细数据 → [`docs/kimi-code-usage.md`](docs/kimi-code-usage.md)**
|
|
105
|
+
|
|
106
|
+
### 1. 用户画像
|
|
107
|
+
|
|
108
|
+
| 项目 | 详情 |
|
|
109
|
+
|:---|:---|
|
|
110
|
+
| 方案 | 第三档 Allegretto($31/月)→ **¥199/月** |
|
|
111
|
+
| 工作流 | Claude Code + kimi-for-coding,重度 vibe coding |
|
|
112
|
+
| 数据周期 | 2026-01 ~ 2026-05 全量记录(约 31.5 亿 tokens) |
|
|
113
|
+
|
|
114
|
+
### 2. 消耗结构
|
|
115
|
+
|
|
116
|
+
| 项目 | 5 个月累计 | 占比 |
|
|
117
|
+
|:---|:---|---:|
|
|
118
|
+
| 输入(Cache Miss) | ~1.54 亿 | 4.9% |
|
|
119
|
+
| 缓存创建 | ~0.89 亿 | 2.8% |
|
|
120
|
+
| 输出 | ~0.12 亿 | 0.4% |
|
|
121
|
+
| **缓存读取(Cache Hit)** | **~28.96 亿** | **91.9%** |
|
|
122
|
+
| **总计** | **~31.52 亿** | **100%** |
|
|
123
|
+
|
|
124
|
+
缓存命中率 **91.9%** 是 vibe coding 的典型特征——长会话中每轮携带完整历史,仅最新一轮为 cache miss。
|
|
125
|
+
|
|
126
|
+
### 3. 实际月消耗
|
|
127
|
+
|
|
128
|
+
基于近一周连续采样(3 天占周额度 30%)推得:
|
|
129
|
+
|
|
130
|
+
| 指标 | 数值 |
|
|
131
|
+
|:---|:---:|
|
|
132
|
+
| 周消耗 | ~3.2 亿 tokens |
|
|
133
|
+
| **月消耗** | **≈ 13.7 ~ 15 亿 tokens** |
|
|
134
|
+
| 方案费用 | ¥199/月 |
|
|
135
|
+
| **折算有效费率** | **≈ ¥0.14 / 百万 tokens** |
|
|
136
|
+
|
|
137
|
+
### 4. 费用对比
|
|
138
|
+
|
|
139
|
+
按 **Kimi K2.6 标准 API 定价**(输入 ¥6.50 / 缓存 ¥1.10 / 输出 ¥27.00 每百万 tokens)计算等量消耗的费用:
|
|
140
|
+
|
|
141
|
+
| 场景 | 月费用 | 倍数 |
|
|
142
|
+
|:---|:---:|:---:|
|
|
143
|
+
| **Kimi Coding Plan(¥199)** | **¥199** | **1×** |
|
|
144
|
+
| 按量付费(K2.6 标准价) | **≈ ¥2,420** | **12.2×** |
|
|
145
|
+
|
|
146
|
+
| 按量付费明细 | 月用量 | 单价 | 费用 |
|
|
147
|
+
|:---|---:|:---:|---:|
|
|
148
|
+
| 输入(Cache Miss) | 7,350 万 | ¥6.50/百万 | ¥478 |
|
|
149
|
+
| 缓存读取(Cache Hit) | 13.79 亿 | ¥1.10/百万 | ¥1,516 |
|
|
150
|
+
| 输出 | 555 万 | ¥27.00/百万 | ¥150 |
|
|
151
|
+
| 缓存创建 | 4,250 万 | ¥6.50/百万 | ¥276 |
|
|
152
|
+
| **合计** | **15 亿** | | **¥2,420** |
|
|
153
|
+
|
|
154
|
+
### 5. 结论
|
|
155
|
+
|
|
156
|
+
> **Coding Plan 每月为重度用户节省约 ¥2,221(约 92%)。** 核心原因:缓存读取占总 tokens 92%,而 Plan 将其和输入都包在订阅费内;按量付费下这部分占账单 63%。
|
|
157
|
+
|
|
158
|
+
### ⚠️ 免责声明
|
|
159
|
+
|
|
160
|
+
> 本分析基于单用户 2026-01~05 期间的实际用量数据(`ccusage` 采集),各项比例和费用估算**仅供参考**。实际结果因会话模式、模型选择、缓存策略和 API 定价变化而异。定价截至 2026-05-24,引用自 [platform.kimi.com](https://platform.kimi.com)。
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
### 🎨 关于策展人
|
|
165
|
+
|
|
166
|
+
由 **Haining Yu** 精心打磨。作为一名艺术策展人与 Vibecoder,我将代码视作展览,力求在审美策展与直觉化 AI 编程之间寻找完美的平衡。
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
<p align="center">
|
|
171
|
+
<strong>Enjoy the flow. Stay in the vibe.</strong>
|
|
172
|
+
</p>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Kimi Code 用量分析
|
|
2
|
+
|
|
3
|
+
分析日期:2026-05-24
|
|
4
|
+
数据来源:`bunx ccusage`(全量记录 2026-01 ~ 2026-05)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Token 比例(全量累积)
|
|
9
|
+
|
|
10
|
+
| 项目 | 全量累积 | 占比 |
|
|
11
|
+
|------|---------|:---:|
|
|
12
|
+
| 输入(Cache Miss) | ~154M | 4.9% |
|
|
13
|
+
| 缓存创建 | ~89M | 2.8% |
|
|
14
|
+
| 输出 | ~12M | 0.4% |
|
|
15
|
+
| 缓存读取(Cache Hit) | ~2,896M | 91.9% |
|
|
16
|
+
| **总计** | **~3,152M** | **100%** |
|
|
17
|
+
|
|
18
|
+
## 背后原因
|
|
19
|
+
|
|
20
|
+
缓存 91.9% 是 **vibe coding 长 session** 的典型特征:
|
|
21
|
+
|
|
22
|
+
- Claude Code + kimi-for-coding 模式下,每轮对话都携带完整历史
|
|
23
|
+
- 只有最后一次提问和回复是 cache miss,前面 N-1 轮全部命中缓存
|
|
24
|
+
- 单 session 50-100 轮对话下,缓存占比自然逼近 92-98%
|
|
25
|
+
|
|
26
|
+
## 月度费用估算(按 1.5B tokens/月)
|
|
27
|
+
|
|
28
|
+
### Kimi K2.6 标准 API 定价(无 Coding Plan)
|
|
29
|
+
|
|
30
|
+
| 项目 | 单价 | 月用量 | 月费用 |
|
|
31
|
+
|------|:---:|:------:|:-----:|
|
|
32
|
+
| 输入(Cache Miss) | ¥6.50/MTok | 73.5M | ¥478 |
|
|
33
|
+
| 缓存读取(Cache Hit) | ¥1.10/MTok | 1,378.5M | ¥1,516 |
|
|
34
|
+
| 输出 | ¥27.00/MTok | 5.55M | ¥150 |
|
|
35
|
+
| 缓存创建(按输入计) | ¥6.50/MTok | 42.5M | ¥276 |
|
|
36
|
+
| **合计** | | **1.5B** | **≈ ¥2,420/月** |
|
|
37
|
+
|
|
38
|
+
费用占比:缓存读取 63% > 输入 31% > 输出 6%
|
|
39
|
+
|
|
40
|
+
### 与 Coding Plan 对比
|
|
41
|
+
|
|
42
|
+
| 方案 | 月费用 |
|
|
43
|
+
|-----|:-----:|
|
|
44
|
+
| **Kimi K2.6 按量付费** | **≈ ¥2,420** |
|
|
45
|
+
| Coding Plan(会员) | ¥39~¥199 |
|
|
46
|
+
| **差价** | **12~60 倍** |
|
|
47
|
+
|
|
48
|
+
Coding Plan 的核心价值:把缓存读取和大量输入都包进订阅费。
|
|
49
|
+
|
|
50
|
+
## 优化建议
|
|
51
|
+
|
|
52
|
+
- 善用 `/clear` 或 `/compress` 指令切断历史
|
|
53
|
+
- 新话题主动开新 session
|
|
54
|
+
- 可从缓存占比 92% 降至 70-80%,费用减半以上
|