mochiapi-statusline 0.1.1 → 0.1.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Matthew Breedlove (https://github.com/sirmalloc)
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
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Matthew Breedlove (https://github.com/sirmalloc)
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
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,385 +1,175 @@
1
- <div align="center">
2
-
3
- <pre>
4
- _ _ _ _
5
- ___ ___ ___| |_ __ _| |_ _ _ ___| (_)_ __ ___
6
- / __/ __/ __| __/ _` | __| | | / __| | | '_ \ / _ \
7
- | (_| (__\__ \ || (_| | |_| |_| \__ \ | | | | | __/
8
- \___\___|___/\__\__,_|\__|\__,_|___/_|_|_| |_|\___|
9
-
10
- </pre>
11
-
12
- # ccstatusline
13
-
14
- **🎹 A highly customizable status line formatter for Claude Code CLI**
15
- *Display model info, git branch, token usage, and other metrics in your terminal*
16
-
17
- [![npm version](https://img.shields.io/npm/v/ccstatusline.svg)](https://www.npmjs.com/package/ccstatusline)
18
- [![npm downloads](https://img.shields.io/npm/dm/ccstatusline.svg)](https://www.npmjs.com/package/ccstatusline)
19
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sirmalloc/ccstatusline/blob/main/LICENSE)
20
- [![Node.js Version](https://img.shields.io/node/v/ccstatusline.svg)](https://nodejs.org)
21
- [![install size](https://packagephobia.com/badge?p=ccstatusline)](https://packagephobia.com/result?p=ccstatusline)
22
- [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/sirmalloc/ccstatusline/graphs/commit-activity)
23
-
24
- [![Mentioned in Awesome Claude Code](https://awesome.re/mentioned-badge.svg)](https://github.com/hesreallyhim/awesome-claude-code)
25
- [![ClaudeLog - A comprehensive knowledge base for Claude](https://claudelog.com/img/claude_log_badge.svg)](https://claudelog.com/)
26
-
27
-
28
- ![Demo](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/demo.gif)
29
-
30
- </div>
31
- <br />
32
-
33
- > [!IMPORTANT]
34
- > **This is the `mochiapi-statusline` fork** — a customized build of upstream [sirmalloc/ccstatusline](https://github.com/sirmalloc/ccstatusline) with a built-in **MochiAPI balance widget** plus a one-shot setup that wires Claude Code and the recommended Mochi three-line layout for you.
35
- >
36
- > **If you came here to use this fork, follow [MOCHIAPI.md](MOCHIAPI.md) — not the upstream instructions below.** The one command you need (macOS / Linux / Windows):
37
- >
38
- > ```bash
39
- > npm install -g mochiapi-statusline && mochiapi-statusline --mochiapi-setup
40
- > ```
41
- >
42
- > The rest of this README is upstream documentation and applies as-is to the underlying ccstatusline engine (widgets, TUI, themes, etc.) — keep reading if you want to customize beyond the defaults.
43
-
44
- <br />
45
-
46
- ## 📚 Table of Contents
47
-
48
- - [Recent Updates](#-recent-updates)
49
- - [Features](#-features)
50
- - [Localizations](#-localizations)
51
- - [Quick Start](#-quick-start)
52
- - [Windows Support](docs/WINDOWS.md)
53
- - [Usage](docs/USAGE.md)
54
- - [Development](docs/DEVELOPMENT.md)
55
- - [Contributing](#-contributing)
56
- - [License](#-license)
57
- - [Related Projects](#-related-projects)
58
-
59
- <br />
60
-
61
- ## 🆕 Recent Updates
62
-
63
- ### v2.2.13 - Weekly model usage, voice status, hooks, and docs
64
-
65
- - **📊 Weekly Sonnet/Opus usage widgets** - Added separate weekly usage widgets for Sonnet and Opus API buckets, matching Claude Code's `/usage` model split.
66
- - **đŸŽ€ Voice Status widget** - Added a widget that shows whether Claude Code voice input is enabled, with icon, text, word, and optional Nerd Font display modes.
67
- - **📉 Timer short bars** - Block Timer, Block Reset Timer, and Weekly Reset Timer now support compact short-bar progress displays.
68
- - **🔕 Quieter hook output** - Hook handling now suppresses no-op JSON output so non-status updates stay silent.
69
-
70
- ### v2.2.9 - v2.2.12 - GitLab support, reset timers, context, compaction, and git widgets
71
-
72
- - **🩊 GitLab PR/MR support** - `Git Branch` and `Git PR/MR` now support GitHub, GitLab, and compatible self-hosted remotes, using `gh` or `glab` as appropriate.
73
- - **🔄 Status line refresh interval** - Installed configs can set Claude Code's `statusLine.refreshInterval` from the TUI when Claude Code >=2.1.97 supports it.
74
- - **🧭 Wrap-around TUI navigation** - Menu/list navigation and move/reorder modes now wrap at the first and last items.
75
- - **📋 Clone widget shortcut** - Press `k` in the item editor to duplicate the selected widget, with fresh Powerline background color for cloned Powerline items.
76
- - **📊 Short bar display modes** - Context percentage, Context Bar, Session Usage, Weekly Usage, Block Timer, and reset timer widgets can use compact bar variants.
77
- - **⏱ Usage time cursor** - Session Usage and Weekly Usage progress bars can show the elapsed time position within the current usage window.
78
- - **🕒 Reset timer timestamps** - Block and Weekly Reset Timer widgets can show exact reset timestamps with compact formatting, 12/24-hour display, IANA time zones, and locale selection.
79
- - **đŸȘŸ Context Window widget** - Added a `Context Window` widget for total model window size, keeping `Context Length` focused on current context usage.
80
- - **🔁 Compaction Counter widget** - Added a `Compaction Counter` widget that tracks session context compactions, with icon/text/number formats, optional Nerd Font icon, and hide-when-zero behavior.
81
- - **🧼 Git file status widgets** - Added `Git Staged Files`, `Git Unstaged Files`, `Git Untracked Files`, and `Git Clean Status` for file counts and clean/dirty state.
82
- - **đŸ·ïž Clear context percentage labels** - `Context %` and `Context % (usable)` now label rendered values as used or left when toggling used/remaining mode.
83
- - **⚡ More Powerline caps** - The Powerline separator editor now supports more than three start/end caps.
84
- - **🧠 Thinking Effort updates** - Added `xhigh`, show `default` when no effort is set, mark unknown future effort levels with `?`, and track live status JSON plus `/effort` command changes.
85
- - **🧼 More accurate token counts** - Streaming duplicate JSONL entries are deduped so token widgets do not overcount live Claude Code output.
86
- - **đŸ·ïž Cleaner model display** - The Model widget strips trailing context suffixes like `(1M context)`; use `Context Window` when you want the total window size shown.
87
- - **đŸ§č Cleaner empty-widget separators** - Manual separators now collapse around widgets that render empty, avoiding dangling separators when hide-when-empty widgets disappear.
88
- - **đŸ§± More resilient Git helpers** - Git widgets handle missing or unusual git command output more defensively.
89
-
90
- ### v2.2.8 - Git widgets, smarter picker search, and minimalist mode
91
-
92
- - **🔀 New Git PR widget** - Added a `Git PR` widget with clickable PR links plus optional status and title display for the current branch.
93
- - **🧰 Major Git widget expansion** - Added `Git Status`, `Git Staged`, `Git Unstaged`, `Git Untracked`, `Git Ahead/Behind`, `Git Conflicts`, `Git SHA`, `Git Origin Owner`, `Git Origin Repo`, `Git Origin Owner/Repo`, `Git Upstream Owner`, `Git Upstream Repo`, `Git Upstream Owner/Repo`, `Git Is Fork`, `Git Worktree Mode`, `Git Worktree Name`, `Git Worktree Branch`, `Git Worktree Original Branch`, and `Custom Symbol`.
94
- - **đŸ‘€ Claude Account Email widget** - Added a session widget that reads the signed-in Claude account email from `~/.claude.json` while respecting `CLAUDE_CONFIG_DIR`.
95
- - **đŸ§Œ Global Minimalist Mode** - Added a global toggle in `Global Overrides` that forces widgets into raw-value mode for a cleaner, label-free status line.
96
- - **🔎 Smarter widget picker search** - The add/change widget picker now supports substring, initialism, and fuzzy matching, with ranked results and live match highlighting.
97
- - **📏 Better terminal width detection** - Flex separators and right-alignment now work more reliably when ccstatusline is launched through wrapper processes or nested PTYs.
98
- - **🎹 Powerline theme continuity** - Built-in Powerline themes can now continue colors cleanly across multiple status lines instead of restarting each line.
99
-
100
- ### v2.2.0 - v2.2.6 - Speed, widgets, links, and reliability updates
101
-
102
- - **🚀 New Token Speed widgets** - Added three widgets: **Input Speed**, **Output Speed**, and **Total Speed**.
103
- - Each speed widget supports a configurable window of `0-120` seconds in the widget editor (`w` key).
104
- - `0` disables window mode and uses a full-session average speed.
105
- - `1-120` calculates recent speed over the selected rolling window.
106
- - **đŸ§© New Skills widget controls (v2.2.1)** - Added configurable Skills modes (last/count/list), optional hide-when-empty behavior, and list-size limiting with most-recent-first ordering.
107
- - **🌐 Usage API proxy support (v2.2.2)** - Usage widgets honor the uppercase `HTTPS_PROXY` environment variable for their direct API call to Anthropic.
108
- - **🧠 New Thinking Effort widget (v2.2.4)** - Added a widget that shows the current Claude Code thinking effort level.
109
- - **🍎 Better macOS usage lookup reliability (v2.2.5)** - Improved reliability when loading usage API tokens on macOS.
110
- - **⌚ New Vim Mode widget (v2.2.5)** - Added a widget that shows the current vim mode, with ASCII and optional Nerd Font icon display.
111
- - **🔗 Git widget link modes (v2.2.6)** - `Git Branch` can render clickable GitHub branch links, and `Git Root Dir` can render clickable IDE links for VS Code and Cursor.
112
- - **đŸ€ Better subagent-aware speed reporting** - Token speed calculations continue to include referenced subagent activity so displayed speeds better reflect actual concurrent work.
113
-
114
- <br />
115
- <details>
116
- <summary><b>Older updates (v2.1.10 and earlier)</b></summary>
117
-
118
- ### v2.1.0 - v2.1.10 - Usage widgets, links, new git insertions / deletions widgets, and reliability fixes
119
-
120
- - **đŸ§© New Usage widgets (v2.1.0)** - Added **Session Usage**, **Weekly Usage**, **Block Reset Timer**, and **Context Bar** widgets.
121
- - **📊 More accurate counts (v2.1.0)** - Usage/context widgets now use new statusline JSON metrics when available for more accurate token and context counts.
122
- - **đŸȘŸ Windows empty file bug fix (v2.1.1)** - Fixed a Windows issue that could create an empty `c:\dev\null` file.
123
- - **🔗 New Link widget (v2.1.3)** - Added a new **Link** widget with clickable OSC8 rendering, preview parity, and raw mode support.
124
- - **➕ New Git Insertions widget (v2.1.4)** - Added a dedicated Git widget that shows only uncommitted insertions (e.g., `+42`).
125
- - **➖ New Git Deletions widget (v2.1.4)** - Added a dedicated Git widget that shows only uncommitted deletions (e.g., `-10`).
126
- - **🧠 Context format fallback fix (v2.1.6)** - When `context_window_size` is missing, context widgets now infer 1M models from long-context labels such as `[1m]` and `1M context` in model identifiers.
127
- - **⏳ Weekly reset timer split (v2.1.7)** - Added a separate `Weekly Reset Timer` widget.
128
- - **⚙ Custom config file flag (v2.1.8)** - Added `--config <path>` support so ccstatusline can load/save settings from a custom file location.
129
- - **🔣 Unicode separator hex input upgrade (v2.1.9)** - Powerline separator hex input now supports 4-6 digits (full Unicode code points up to `U+10FFFF`).
130
- - **🌳 Bare repo worktree detection fix (v2.1.10)** - `Git Worktree` now correctly detects linked worktrees created from bare repositories.
131
-
132
- ### v2.0.26 - v2.0.29 - Performance, git internals, and workflow improvements
133
-
134
- - **🧠 Memory Usage widget (v2.0.29)** - Added a new widget that shows current system memory usage (`Mem: used/total`).
135
- - **⚡ Block timer cache (v2.0.28)** - Cache block timer metrics to reduce JSONL parsing on every render, with per-config hashed cache files and automatic 5-hour block invalidation.
136
- - **đŸ§± Git widget command refactor (v2.0.28)** - Refactored git widgets to use shared git command helpers and expanded coverage for failure and edge-case tests.
137
- - **đŸȘŸ Windows UTF-8 piped output fix (v2.0.28)** - Sets the Windows UTF-8 code page for piped status line rendering.
138
- - **📁 Git Root Dir widget (v2.0.27)** - Added a new Git widget that shows the repository root directory name.
139
- - **đŸ·ïž Session Name widget (v2.0.26)** - Added a new widget that shows the current Claude Code session name from `/rename`.
140
- - **🏠 Current Working Directory home abbreviation (v2.0.26)** - Added a `~` abbreviation option for CWD display in both preview and live rendering.
141
- - **🧠 Context model suffix fix (v2.0.26)** - Context widgets now recognize the `[1m]` suffix across models, not just a single model path.
142
- - **🧭 Widget picker UX updates (v2.0.26)** - Improved widget discovery/navigation and added clearer, safer clear-line behavior.
143
- - **⌚ TUI editor input fix (v2.0.26)** - Prevented shortcut/input leakage into widget editor flows.
144
- - **📄 Repo docs update (v2.0.26)** - Migrated guidance from `CLAUDE.md` to `AGENTS.md` (with symlink compatibility).
145
-
146
- ### v2.0.16 - Add fish style path abbreviation toggle to Current Working Directory widget
147
-
148
- ### v2.0.15 - Block Timer calculation fixes
149
-
150
- - Fix miscalculation in the block timer
151
-
152
- ### v2.0.14 - Add remaining mode toggle to Context Percentage widgets
153
-
154
- - **Remaining Mode** - You can now toggle the Context Percentage widgets between usage percentage and remaining percentage when configuring them in the TUI by pressing the 'u' key.
155
-
156
- ### v2.0.12 - Custom Text widget now supports emojis
157
-
158
- - **đŸ‘Ÿ Emoji Support** - You can now paste emoji into the custom text widget. You can also turn on the merge option to get emoji labels for your widgets like this:
159
-
160
- ![Emoji Support](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/emojiSupport.png)
161
-
162
- ### v2.0.11 - Unlimited Status Lines
163
-
164
- - **🚀 No Line Limit** - Configure as many status lines as you need - the 3-line limitation has been removed
165
-
166
- ### v2.0.10 - Git Updates
167
-
168
- - **🌳 Git Worktree widget** - Shows the active worktree name when working with git worktrees
169
- - **đŸ‘» Hide 'no git' message toggle** - Git widgets now support hiding the 'no git' message when not in a repository (toggle with 'h' key while editing the widget)
170
-
171
- ### v2.0.8 - Powerline Auto-Alignment
172
-
173
- ![Powerline Auto-Alignment](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/autoAlign.png)
174
-
175
- - **🎯 Widget Alignment** - Auto-align widgets across multiple status lines in Powerline mode for a clean, columnar layout (toggle with 'a' in Powerline Setup)
176
-
177
- ### v2.0.7 - Current Working Directory & Session Cost
178
-
179
- ![Current Working Directory and Session Cost](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/cwdAndSessionCost.png)
180
-
181
- - **📁 Current Working Directory** - Display the current working directory with configurable segment display
182
- - Set the number of path segments to show (e.g., show only last 2 segments: `.../Personal/ccstatusline`)
183
- - Supports raw value mode for compact display
184
- - Automatically truncates long paths with ellipsis
185
- - **💰 Session Cost Widget** - Track your Claude Code session costs (requires Claude Code 1.0.85+)
186
- - Displays total session cost in USD
187
- - Supports raw value mode (shows just `$X.YZ` vs `Cost: $X.YZ`)
188
- - Real-time cost tracking from Claude Code session data
189
- - Note: Cost may not update properly when using `/resume` (Claude Code limitation)
190
- - **🐛 Bug Fixes**
191
- - Fixed Block Timer calculations for accurate time tracking across block boundaries
192
- - Improved widget editor stability with proper Ctrl+S handling
193
- - Enhanced cursor display in numeric input fields
194
-
195
- ### v2.0.2 - Block Timer Widget
196
-
197
- ![Block Timer](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/blockTimerSmall.png)
198
-
199
- - **⏱ Block Timer** - Track your progress through 5-hour Claude Code blocks
200
- - Displays time elapsed in current block as hours/minutes (e.g., "3hr 45m")
201
- - Progress bar mode shows visual completion percentage
202
- - Two progress bar styles: full width (32 chars) or compact (16 chars)
203
- - Automatically detects block boundaries from transcript timestamps
204
-
205
- ### v2.0.0 - Powerline Support & Enhanced Themes
206
- - **⚡ Powerline Mode** - Beautiful Powerline-style status lines with arrow separators and customizable caps
207
- - **🎹 Built-in Themes** - Multiple pre-configured themes that you can copy and customize
208
- - **🌈 Advanced Color Support** - Basic (16), 256-color (with custom ANSI codes), and truecolor (with hex codes) modes
209
- - **🔗 Widget Merging** - Merge multiple widgets together with or without padding for seamless designs
210
- - **📩 Easy Installation** - Install directly with `npx` or `bunx` - no global package needed
211
- - **đŸ”€ Custom Separators** - Add multiple Powerline separators with custom hex codes for font support
212
- - **🚀 Auto Font Install** - Automatic Powerline font installation with user consent
213
-
214
- </details>
215
-
216
- <br />
217
-
218
- ## ✹ Features
219
-
220
- - **📊 Real-time Metrics** - Display model name, git branch, token usage, per-model weekly usage, voice input state, session duration, compaction count, block timer, and more
221
- - **🎹 Fully Customizable** - Choose what to display and customize colors for each element
222
- - **⚡ Powerline Support** - Beautiful Powerline-style rendering with arrow separators, caps, and custom fonts
223
- - **📐 Multi-line Support** - Configure multiple independent status lines
224
- - **đŸ–„ïž Interactive TUI** - Built-in configuration interface using React/Ink
225
- - **🔎 Fast Widget Picker** - Add/change widgets by category with search and ranked matching
226
- - **⚙ Global Options** - Apply consistent formatting across all widgets (padding, separators, bold, minimalist mode, and color overrides)
227
- - **🚀 Cross-platform** - Works seamlessly with both Bun and Node.js
228
- - **🔧 Flexible Configuration** - Supports custom Claude Code config directory via `CLAUDE_CONFIG_DIR` environment variable
229
- - **📏 Smart Width Detection** - Automatically adapts to terminal width with flex separators
230
- - **⚡ Zero Config** - Sensible defaults that work out of the box
231
-
232
- <br />
233
-
234
- ## 🌐 Localizations
235
-
236
- The localizations in this section are third-party forks maintained outside this repository. They are not maintained, reviewed, or endorsed by this repository, so review their code and releases before using them.
237
-
238
- - 🌏 **䞭文版 (Chinese):** [ccstatusline-zh](https://github.com/huangguang1999/ccstatusline-zh)
239
-
240
- <br />
241
-
242
- ## 🚀 Quick Start
243
-
244
- ### No installation needed! Use directly with npx or bunx:
245
-
246
- ```bash
247
- # Run the configuration TUI with npm
248
- npx -y ccstatusline@latest
249
-
250
- # Or with Bun (faster)
251
- bunx -y ccstatusline@latest
252
- ```
253
-
254
- <br />
255
- <details>
256
- <summary><b>Configure ccstatusline</b></summary>
257
-
258
- The interactive configuration tool provides a terminal UI where you can:
259
- - Configure multiple separate status lines
260
- - Add/remove/reorder status line widgets
261
- - Customize colors for each widget
262
- - Configure flex separator behavior
263
- - Configure Claude Code status line refresh interval when supported
264
- - Edit custom text widgets
265
- - Install/uninstall to Claude Code settings
266
- - Preview your status line in real-time
267
-
268
- > 💡 **Tip:** Your settings are automatically saved to `~/.config/ccstatusline/settings.json`
269
-
270
- > 🔧 **Custom Claude Config:** If your Claude Code configuration is in a non-standard location, set the `CLAUDE_CONFIG_DIR` environment variable:
271
- > ```bash
272
- > # Linux/macOS
273
- > export CLAUDE_CONFIG_DIR=/custom/path/to/.claude
274
- > ```
275
-
276
- > 🌐 **Usage API proxy:** Usage widgets honor the uppercase `HTTPS_PROXY` environment variable for their direct API call to Anthropic.
277
-
278
- > đŸȘŸ **Windows Support:** PowerShell examples, installation notes, fonts, troubleshooting, WSL, and Windows Terminal configuration are in [docs/WINDOWS.md](docs/WINDOWS.md).
279
-
280
- </details>
281
-
282
- <details>
283
- <summary><b>Claude Code settings.json format</b></summary>
284
-
285
- When you install from the TUI, ccstatusline writes a `statusLine` command object to your Claude Code settings:
286
-
287
- ```json
288
- {
289
- "statusLine": {
290
- "type": "command",
291
- "command": "npx -y ccstatusline@latest",
292
- "padding": 0,
293
- "refreshInterval": 10
294
- }
295
- }
296
- ```
297
-
298
- `refreshInterval` is written only when your Claude Code version supports it (>=2.1.97). The TUI can set it to `1-60` seconds, or remove it by leaving the input empty.
299
-
300
- Other supported command values are:
301
- - `bunx -y ccstatusline@latest`
302
- - `ccstatusline` (for self-managed/global installs)
303
-
304
- </details>
305
-
306
- ## đŸ€ Contributing
307
-
308
- Contributions are welcome! Please feel free to submit a Pull Request.
309
-
310
- 1. Fork the repository
311
- 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
312
- 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
313
- 4. Push to the branch (`git push origin feature/amazing-feature`)
314
- 5. Open a Pull Request
315
-
316
-
317
- ## Support
318
-
319
- If ccstatusline is useful to you, consider buying me a coffee:
320
-
321
- <a href="https://www.buymeacoffee.com/sirmalloc" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
322
-
323
-
324
- ## 📄 License
325
-
326
- [MIT](LICENSE) © Matthew Breedlove
327
-
328
-
329
- ## đŸ‘€ Author
330
-
331
- **Matthew Breedlove**
332
-
333
- - GitHub: [@sirmalloc](https://github.com/sirmalloc)
334
-
335
-
336
- ## 🔗 Related Projects
337
-
338
- - [tweakcc](https://github.com/Piebald-AI/tweakcc) - Customize Claude Code themes, thinking verbs, and more.
339
- - [ccusage](https://github.com/ryoppippi/ccusage) - Track and display Claude Code usage metrics.
340
- - [codachi](https://github.com/vincent-k2026/codachi) - A tamagotchi-style statusline pet that grows with your context window.
341
- - [AIWatch](https://ai-watch.dev) - Live status monitor for 30+ AI APIs and apps; pairs with a Custom Command widget to surface provider outages in your status line.
342
-
343
-
344
- ## 🙏 Acknowledgments
345
-
346
- - Built for use with [Claude Code CLI](https://claude.ai/code) by Anthropic
347
- - Powered by [Ink](https://github.com/vadimdemedes/ink) for the terminal UI
348
- - Made with ❀ for the Claude Code community
349
-
350
- <br />
351
-
352
- ## Star History
353
-
354
- <a href="https://www.star-history.com/#sirmalloc/ccstatusline&Timeline">
355
- <picture>
356
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=sirmalloc/ccstatusline&type=Timeline&theme=dark" />
357
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=sirmalloc/ccstatusline&type=Timeline" />
358
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=sirmalloc/ccstatusline&type=Timeline" />
359
- </picture>
360
- </a>
361
-
362
- <div align="center">
363
-
364
- ### 🌟 Show Your Support
365
-
366
- Give a ⭐ if this project helped you!
367
-
368
- [![GitHub stars](https://img.shields.io/github/stars/sirmalloc/ccstatusline?style=social)](https://github.com/sirmalloc/ccstatusline/stargazers)
369
- [![GitHub forks](https://img.shields.io/github/forks/sirmalloc/ccstatusline?style=social)](https://github.com/sirmalloc/ccstatusline/network/members)
370
- [![GitHub watchers](https://img.shields.io/github/watchers/sirmalloc/ccstatusline?style=social)](https://github.com/sirmalloc/ccstatusline/watchers)
371
-
372
- [![npm version](https://img.shields.io/npm/v/ccstatusline.svg)](https://www.npmjs.com/package/ccstatusline)
373
- [![npm downloads](https://img.shields.io/npm/dm/ccstatusline.svg)](https://www.npmjs.com/package/ccstatusline)
374
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sirmalloc/ccstatusline/blob/main/LICENSE)
375
- [![Made with Bun](https://img.shields.io/badge/Made%20with-Bun-000000.svg?logo=bun)](https://bun.sh)
376
-
377
- [![Issues](https://img.shields.io/github/issues/sirmalloc/ccstatusline)](https://github.com/sirmalloc/ccstatusline/issues)
378
- [![Pull Requests](https://img.shields.io/github/issues-pr/sirmalloc/ccstatusline)](https://github.com/sirmalloc/ccstatusline/pulls)
379
- [![Contributors](https://img.shields.io/github/contributors/sirmalloc/ccstatusline)](https://github.com/sirmalloc/ccstatusline/graphs/contributors)
380
-
381
- ### 💬 Connect
382
-
383
- [Report Bug](https://github.com/sirmalloc/ccstatusline/issues) · [Request Feature](https://github.com/sirmalloc/ccstatusline/issues) · [Discussions](https://github.com/sirmalloc/ccstatusline/discussions)
384
-
385
- </div>
1
+ <div align="center">
2
+
3
+ # mochiapi-statusline
4
+
5
+ **[MochiAPI](https://mochiapi.com) 甚户的 Claude Code çŠ¶æ€æ ă€‚**
6
+ äž€æĄć‘œä»€èŁ…ć„œă€‚ç»ˆç«Żé‡Œçœ‹æšĄćž‹ă€äžŠäž‹æ–‡ă€èŽŠæˆ·äœ™éąă€ä»Šæ—„èŠ±èŽč。
7
+
8
+ [![npm version](https://img.shields.io/npm/v/mochiapi-statusline.svg)](https://www.npmjs.com/package/mochiapi-statusline)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10
+ [![Node.js Version](https://img.shields.io/badge/node-%E2%89%A514-brightgreen.svg)](https://nodejs.org)
11
+
12
+ ![状态栏效果](assets/statusline-demo.png)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## ćź‰èŁ…
19
+
20
+ 芁 **Node.js ≄ 14**ă€‚äž€æĄć‘œä»€èŁ…ćŒ… + 跑äș€äș’ćŒ setup
21
+
22
+ ```bash
23
+ npm install -g mochiapi-statusline && mochiapi-statusline --mochiapi-setup
24
+ ```
25
+
26
+ bash / zsh / fish / PowerShell 7+ / cmd.exe 郜胜跑`&&` æŠŠèŁ…ćŒ…ć’Œ setup äžČè”·æ„ă€‚
27
+
28
+ > **Windows PowerShell 5.1**Win10 é»˜èź€ïŒ‰äžæ”ŻæŒ `&&`ïŒŒćˆ†äž€æ­„ïŒš
29
+ > ```powershell
30
+ > npm install -g mochiapi-statusline
31
+ > mochiapi-statusline --mochiapi-setup
32
+ > ```
33
+
34
+ ć…ˆćŽ» <https://mochiapi.com/dashboard> ć€ćˆ¶ tokensetup äŒšèź©äœ çČ˜èŽŽă€‚`--mochiapi-setup` 恚曛件äș‹ïŒš
35
+
36
+ 1. token + base URL → `~/.config/mochiapi-statusline/config.json`Windows æ˜Ż `%APPDATA%\mochiapi-statusline\config.json`
37
+ 2. æŽąæ”‹äž€æŹĄ balance æŽ„ćŁïŒŒçĄźèź€ token 有效
38
+ 3. 把掚荐的 **Mochi äž€èĄŒ Powerline ćžƒć±€**憙慄 `~/.config/ccstatusline/settings.json`ć·Čæœ‰ćžƒć±€äŒšæŠŠ Mochi èźĄèŽčèĄŒèżœćŠ èż›ćŽ»ïŒ‰
39
+ 4. 把 Claude Code 的 `~/.claude/settings.json` 里 `statusLine.command` æŒ‡ć‘ `mochiapi-statusline`
40
+
41
+ ćŒ€äž€äžȘ新的 Claude Code äŒšèŻïŒŒçŠ¶æ€æ ć°±æœ‰äș†ă€‚
42
+
43
+ > **Windows + Powerline**ïŒšé»˜èź€ćžƒć±€ç”š Nerd Font ć­—ćœąćšćˆ†éš”çŹŠïŒŒæČĄèŁ…äŒšçœ‹ćˆ° `?` æ–čć—ă€‚èŁ…äž€äžȘćč¶èźŸäžșç»ˆç«Żć­—äœ“ïŒš
44
+ >
45
+ > ```powershell
46
+ > winget install DEVCOM.JetBrainsMonoNerdFont
47
+ > ```
48
+
49
+ `dist/ccstatusline.js` éą„æž„ć»șäș§ç‰©ç›ŽæŽ„æ‰“èż› npm tarballïŒŒćŒ…äžćŁ°æ˜Ž `prepare` / `postinstall`ïŒŒćź‰èŁ…æ—¶äžäŒšè·‘æœŹćœ°æž„ć»șbundle ć„œçš„ binary ç›ŽæŽ„èœćœ°ă€‚
50
+
51
+ ### ć€‡ç”šćź‰èŁ…æș
52
+
53
+ ćȘ朹 npm registry èą«ćą™ă€æˆ–è€…æƒłè·Ÿ `main` HEAD è€Œäžæ˜Ż tag ć‘ćžƒæ—¶ç”šïŒš
54
+
55
+ ```bash
56
+ # 跟èžȘ main HEADïŒˆæ»šćŠšïŒŒæ— ç‰ˆæœŹé”ćźšïŒ‰
57
+ npm install -g github:Subaru486desuwa/mochiapi-statusline
58
+
59
+ # 锁戰ç‰č漚 git tag
60
+ npm install -g github:Subaru486desuwa/mochiapi-statusline#v0.1.1
61
+
62
+ # Tarball ç›ŽèŁ…ïŒˆäž‹èœœæœ€ć°ïŒŒç­‰ä»·äșŽ github: çź€ć†™ïŒ‰
63
+ npm install -g https://github.com/Subaru486desuwa/mochiapi-statusline/archive/refs/heads/main.tar.gz
64
+ ```
65
+
66
+ ## é»˜èź€ćžƒć±€é•żèż™æ ·
67
+
68
+ äž€èĄŒ PowerlineMochi 配è‰ČïŒˆć›Ÿäž­æ˜Żćźžé™…æ•ˆæžœïŒ‰ïŒš
69
+
70
+ - **çŹŹäž€èĄŒ** — `æšĄćž‹ / Opus 4.7 (1M context) / 䞊䞋文 / 50.7k`仓ćș“ć†…èżœćŠ  `<ćˆ†æ”Ż> / <æ”č抹>`仓ćș“怖è‡ȘćŠšéšè—
71
+ - **珏äșŒèĄŒ** — `ç”šæˆ·äœ™éą / $98.43 / 今旄消耗 / $11.66 / TPS / 6.4 t/s`MochiAPI èŽŠæˆ·äœ™éą + 今旄花èŽč + token 蟓ć‡ș速率
72
+
73
+ æ•°ć€ŒćŽéąćžŠ `*` èĄšç€șçŒ“ć­˜ć€ŒæŻ” `2 × refreshIntervalSec`ïŒˆé»˜èź€ 60 ç§’ïŒ‰æ—§ïŒŒé€šćžžæ˜ŻçžŹæ—¶çœ‘ç»œæŠ–ćŠšïŒŒćŽć° refresher ćœšé‡èŻ•ă€‚widget 继续星ç€șäžŠäž€æŹĄæˆćŠŸć€Œă€‚
74
+
75
+ `mochiapi-subscription` widgetïŒˆäž‰ćˆäž€ïŒš`äœ™éą $X.XX · 今旄 $Y.YY · èźąé˜… $Z.ZZ/∞`ïŒ‰ä»ç„¶ćŻç”šïŒŒćȘæ˜Żäžćœšé»˜èź€ćžƒć±€â€”â€”ć€§ć€šæ•° MochiAPI äž­èœŹç”šæˆ·èźąé˜…æ˜Ż `∞`æČĄæ„äč‰ă€‚éœ€èŠçš„èŻ TUI é‡Œæ‰‹ćŠšćŠ ă€‚
76
+
77
+ ## MochiAPI è‡Ș澩的 widget
78
+
79
+ 侉äžȘ widget ć…±ç”šäž€æŹĄ `/api/user/dashboard/balance` èŻ·æ±‚çš„çŒ“ć­˜ïŒš
80
+
81
+ | Widget 类枋 | æžČ染 | é»˜èź€è‰Č |
82
+ |---|---|---|
83
+ | `mochiapi-balance` | èŽŠæˆ·ć‰©äœ™äœ™éą — `$X.XX` 或 `∞`无限莊户 | cyan |
84
+ | `mochiapi-daily-spend` | 今旄花èŽč — `$X.XX` | magenta |
85
+ | `mochiapi-subscription` | `äœ™éą $X.XX · 今旄 $Y.YY · èźąé˜… $Z.ZZ/∞`ïŒˆäžćœšé»˜èź€ćžƒć±€ïŒ‰ | cyan |
86
+
87
+ çŒ“ć­˜é€šèż‡ detached ć­èż›çš‹æŻ `refreshIntervalSec`ïŒˆé»˜èź€ 30 ç§’ïŒ‰ćˆ·æ–°äž€æŹĄă€‚
88
+
89
+ ## CLI
90
+
91
+ ```bash
92
+ # ć†è·‘äž€æŹĄäș€äș’ćŒ setup
93
+ mochiapi-statusline --mochiapi-setup
94
+
95
+ # 非äș€äș’CI / è„šæœŹïŒ‰
96
+ MOCHIAPI_TOKEN=sk-xxxx MOCHIAPI_BASE_URL=https://mochiapi.com \
97
+ mochiapi-statusline --mochiapi-setup
98
+
99
+ # ćȘ憙 mochi é…çœźïŒŒäžćŠš ccstatusline / Claude Code èźŸçœź
100
+ mochiapi-statusline --mochiapi-setup --skip-statusline --skip-claude-wire
101
+
102
+ # æ‰‹ćŠšćˆ·äž€æŹĄäœ™éąçŒ“ć­˜ïŒˆćŽć°æŻ 30 秒äčŸäŒšè‡ȘćŠšćˆ·ïŒ‰
103
+ mochiapi-statusline --mochiapi-refresh
104
+
105
+ # 搯抹 TUI 调敎 widget / 鱜è‰Č / ćžƒć±€ / Powerline
106
+ mochiapi-statusline
107
+ ```
108
+
109
+ ## 捇çș§ / ćžèœœ
110
+
111
+ ```bash
112
+ # 捇çș§ćˆ°æœ€æ–°ć‘ćžƒç‰ˆæœŹ
113
+ npm install -g mochiapi-statusline@latest
114
+
115
+ # ćžèœœ
116
+ npm uninstall -g mochiapi-statusline
117
+ ```
118
+
119
+ ## æ–‡ä»¶äœçœź
120
+
121
+ | | macOS / Linux | Windows |
122
+ |---|---|---|
123
+ | MochiAPI token + baseUrl | `~/.config/mochiapi-statusline/config.json` | `%APPDATA%\mochiapi-statusline\config.json` |
124
+ | äœ™éąçŒ“ć­˜ | `~/.cache/mochiapi-statusline/balance.json` | `%LOCALAPPDATA%\mochiapi-statusline\cache\balance.json` |
125
+ | çŠ¶æ€æ ćžƒć±€ | `~/.config/ccstatusline/settings.json` | `%USERPROFILE%\.config\ccstatusline\settings.json` |
126
+ | Claude Code | `~/.claude/settings.json` | `%USERPROFILE%\.claude\settings.json` |
127
+
128
+ token é…çœźć’Œćžƒć±€é…çœźæ˜Ż**䞀äžȘäžćŒçš„æ–‡ä»¶**æ”čé‰ŽæƒćŠšçŹŹäž€äžȘæ”č星ç€șć“Șäș› widget 抹第äșŒäžȘ或者跑 TUIïŒ‰ă€‚
129
+
130
+ ## 排错
131
+
132
+ | 状态栏星ç€ș | 搫äč‰ | 怄理 |
133
+ |---|---|---|
134
+ | `Mochi: cfg?` | æ‰Ÿäžćˆ° `config.json` | 重新跑 `mochiapi-statusline --mochiapi-setup` |
135
+ | `Mochi: ...` | çŒ“ć­˜èż˜æČĄćĄ« | 跑 `mochiapi-statusline --mochiapi-refresh`或等 30 秒 |
136
+ | `$X.XX*`ïŒˆæœ«ć°Ÿ `*` | çŒ“ć­˜é™ˆæ—§ | é€šćžžçžŹæ—¶äžŠæžžé—źéą˜ïŒŒćŽć° refresher 䌚è‡ȘćŠšé‡èŻ• |
137
+ | ćˆ†éš”çŹŠæ˜Ÿç€ș成 `?` | 终端æČĄç”š Nerd Font | èŁ… Nerd Font ćč¶èźŸäžșç»ˆç«Żć­—äœ“ |
138
+
139
+ 侍搯抹 Claude Code äčŸèƒœæžČæŸ“äž€æŹĄçœ‹çœ‹æ•ˆæžœïŒš
140
+
141
+ ```bash
142
+ echo '{"session_id":"test","model":{"id":"claude-sonnet-4-6","display_name":"Sonnet 4.6 (1M context)"},"workspace":{"current_dir":".","project_dir":"."},"cost":{"total_cost_usd":0},"transcript_path":"/tmp/nonexistent","output_style":{"name":"default"}}' \
143
+ | mochiapi-statusline
144
+ ```
145
+
146
+ ## æŽ„ćŁć„‘çșŠ
147
+
148
+ | è·ŻćŸ„ | èż”ć›ž |
149
+ |---|---|
150
+ | `GET ${baseUrl}/api/user/dashboard/balance` | èŽŠæˆ·ć­—æź” + 今旄花èŽčïŒˆäž€æŹĄèŻ·æ±‚ć–‚äž‰äžȘ widget |
151
+
152
+ Bearer 鉎权`Authorization: Bearer sk-...`䞍甚 cookie䞍甚 session。
153
+
154
+ ä»Žć“ćș”é‡ŒèŻ»çš„ć­—æź”ïŒš
155
+
156
+ | API ć­—æź” | 甹途 |
157
+ |---|---|
158
+ | ç›ŽæŽ„äœ™éąć­—æź”ïŒˆ`user_balance_usd` / `user_remain_quota_usd` / `balance_usd` ç­‰ïŒŒć­˜ćœšæ—¶ïŒ‰ | äœ™éą widgetïŒˆéŠ–é€‰è·ŻćŸ„ïŒ‰ |
159
+ | `data.user_quota_usd` − `data.user_used_quota_usd` | äœ™éą widgetïŒˆç›ŽæŽ„ć­—æź”çŒșć€±æ—¶çš„ć›žé€€ïŒ‰ |
160
+ | `data.today_used_quota_usd` | 今旄花èŽč widget |
161
+ | `data.token_remain_quota_usd` + `data.token_unlimited` | èźąé˜… widget |
162
+
163
+ ## è‡Žè°ą
164
+
165
+ ćș•ć±‚çŠ¶æ€æ ćŒ•æ“Ž fork è‡Ș [sirmalloc/ccstatusline](https://github.com/sirmalloc/ccstatusline)MIT© Matthew BreedloveïŒ‰ă€‚MochiAPI 郹戆的汞量ćȘ有
166
+
167
+ - `mochiapi-balance` / `mochiapi-daily-spend` / `mochiapi-subscription` 侉äžȘ widget
168
+ - `--mochiapi-setup` / `--mochiapi-refresh` 䞀äžȘ CLI flag
169
+ - 侀锼 setupïŒˆć†™ config + ć†™ćžƒć±€ + 掄 Claude Code `statusLine.command`
170
+
171
+ ć…¶äœ™çš„ TUIă€äž»éą˜ă€ćžƒć±€ă€Powerline æžČæŸ“ă€20 〚äžȘć…¶ćźƒ widget ć…šéƒšæ˜ŻäžŠæžžä»Łç ïŒŒæ·±ćșŠè‡Ș漚äč‰ç…§æ ·é€‚甚䞊枞的 TUI。
172
+
173
+ ## License
174
+
175
+ MIT — 见 [LICENSE](LICENSE) 撌 [NOTICE](NOTICE)。
@@ -1362,8 +1362,9 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
1362
1362
 
1363
1363
  // node_modules/react/index.js
1364
1364
  var require_react = __commonJS((exports, module) => {
1365
+ var react_development = __toESM(require_react_development());
1365
1366
  if (false) {} else {
1366
- module.exports = require_react_development();
1367
+ module.exports = react_development;
1367
1368
  }
1368
1369
  });
1369
1370
 
@@ -3848,8 +3849,9 @@ var require_scheduler_development = __commonJS((exports) => {
3848
3849
 
3849
3850
  // node_modules/react-reconciler/node_modules/scheduler/index.js
3850
3851
  var require_scheduler = __commonJS((exports, module) => {
3852
+ var scheduler_development = __toESM(require_scheduler_development());
3851
3853
  if (false) {} else {
3852
- module.exports = require_scheduler_development();
3854
+ module.exports = scheduler_development;
3853
3855
  }
3854
3856
  });
3855
3857
 
@@ -37056,8 +37058,9 @@ React keys must be passed directly to JSX without using spread:
37056
37058
 
37057
37059
  // node_modules/react/jsx-runtime.js
37058
37060
  var require_jsx_runtime = __commonJS((exports, module) => {
37061
+ var react_jsx_runtime_development = __toESM(require_react_jsx_runtime_development());
37059
37062
  if (false) {} else {
37060
- module.exports = require_react_jsx_runtime_development();
37063
+ module.exports = react_jsx_runtime_development;
37061
37064
  }
37062
37065
  });
37063
37066
 
@@ -55891,6 +55894,15 @@ function getModelContextIdentifier(model) {
55891
55894
  }
55892
55895
  return id ?? displayName;
55893
55896
  }
55897
+ function lookupKnownModelWindow(modelIdentifier) {
55898
+ const id = modelIdentifier.toLowerCase();
55899
+ for (const { pattern, windowSize } of KNOWN_MODEL_CONTEXT_WINDOWS) {
55900
+ if (id.includes(pattern)) {
55901
+ return windowSize;
55902
+ }
55903
+ }
55904
+ return null;
55905
+ }
55894
55906
  function getContextConfig(modelIdentifier, contextWindowSize) {
55895
55907
  const statusWindowSize = toValidWindowSize(contextWindowSize);
55896
55908
  if (statusWindowSize !== null) {
@@ -55913,9 +55925,26 @@ function getContextConfig(modelIdentifier, contextWindowSize) {
55913
55925
  usableTokens: Math.floor(inferredWindowSize * USABLE_CONTEXT_RATIO)
55914
55926
  };
55915
55927
  }
55928
+ const knownWindowSize = lookupKnownModelWindow(modelIdentifier);
55929
+ if (knownWindowSize !== null) {
55930
+ return {
55931
+ maxTokens: knownWindowSize,
55932
+ usableTokens: Math.floor(knownWindowSize * USABLE_CONTEXT_RATIO)
55933
+ };
55934
+ }
55916
55935
  return defaultConfig;
55917
55936
  }
55918
- var DEFAULT_CONTEXT_WINDOW_SIZE = 200000, USABLE_CONTEXT_RATIO = 0.8;
55937
+ var DEFAULT_CONTEXT_WINDOW_SIZE = 200000, USABLE_CONTEXT_RATIO = 0.8, KNOWN_MODEL_CONTEXT_WINDOWS;
55938
+ var init_model_context = __esm(() => {
55939
+ KNOWN_MODEL_CONTEXT_WINDOWS = [
55940
+ { pattern: "glm-4.6", windowSize: 200000 },
55941
+ { pattern: "glm-4.5", windowSize: 128000 },
55942
+ { pattern: "glm-4", windowSize: 128000 },
55943
+ { pattern: "kimi-k2", windowSize: 256000 },
55944
+ { pattern: "qwen3-coder", windowSize: 256000 },
55945
+ { pattern: "deepseek", windowSize: 128000 }
55946
+ ];
55947
+ });
55919
55948
 
55920
55949
  // src/utils/context-percentage.ts
55921
55950
  function calculateContextPercentageMetrics(context) {
@@ -55939,7 +55968,9 @@ function calculateContextPercentageMetrics(context) {
55939
55968
  function calculateContextPercentage(context) {
55940
55969
  return calculateContextPercentageMetrics(context)?.usedPercentage ?? 0;
55941
55970
  }
55942
- var init_context_percentage = () => {};
55971
+ var init_context_percentage = __esm(() => {
55972
+ init_model_context();
55973
+ });
55943
55974
 
55944
55975
  // src/utils/terminal.ts
55945
55976
  import { execSync } from "child_process";
@@ -56044,7 +56075,7 @@ function getTerminalWidth() {
56044
56075
  function canDetectTerminalWidth() {
56045
56076
  return probeTerminalWidth() !== null;
56046
56077
  }
56047
- var __dirname = "C:\\Users\\slh\\mochiapi-statusline\\src\\utils", PACKAGE_VERSION = "0.1.1";
56078
+ var __dirname = "/Volumes/ExtremeSSD/Developer/mochiapi/statusline/src/utils", PACKAGE_VERSION = "0.1.2";
56048
56079
  var init_terminal = () => {};
56049
56080
 
56050
56081
  // src/utils/renderer.ts
@@ -56870,6 +56901,7 @@ class ContextWindowWidget {
56870
56901
  }
56871
56902
  }
56872
56903
  var init_ContextWindow = __esm(async () => {
56904
+ init_model_context();
56873
56905
  await init_renderer2();
56874
56906
  });
56875
56907
 
@@ -57425,6 +57457,7 @@ class ContextPercentageUsableWidget {
57425
57457
  }
57426
57458
  }
57427
57459
  var init_ContextPercentageUsable = __esm(() => {
57460
+ init_model_context();
57428
57461
  init_context_inverse();
57429
57462
  init_context_slider();
57430
57463
  });
@@ -57820,8 +57853,9 @@ React keys must be passed directly to JSX without using spread:
57820
57853
 
57821
57854
  // node_modules/react/jsx-dev-runtime.js
57822
57855
  var require_jsx_dev_runtime = __commonJS((exports, module) => {
57856
+ var react_jsx_dev_runtime_development = __toESM(require_react_jsx_dev_runtime_development());
57823
57857
  if (false) {} else {
57824
- module.exports = require_react_jsx_dev_runtime_development();
57858
+ module.exports = react_jsx_dev_runtime_development;
57825
57859
  }
57826
57860
  });
57827
57861
 
@@ -65958,6 +65992,7 @@ class ContextBarWidget {
65958
65992
  }
65959
65993
  }
65960
65994
  var init_ContextBar = __esm(async () => {
65995
+ init_model_context();
65961
65996
  init_usage_display();
65962
65997
  await init_usage();
65963
65998
  });
package/package.json CHANGED
@@ -1,74 +1,72 @@
1
- {
2
- "name": "mochiapi-statusline",
3
- "version": "0.1.1",
4
- "description": "ccstatusline fork with a MochiAPI balance widget (Claude Code status line for MochiAPI users)",
5
- "module": "src/ccstatusline.ts",
6
- "type": "module",
7
- "bin": {
8
- "mochiapi-statusline": "dist/ccstatusline.js"
9
- },
10
- "files": [
11
- "dist/"
12
- ],
13
- "scripts": {
14
- "start": "bun run src/ccstatusline.ts",
15
- "build": "rm -rf dist/* ; bun build src/ccstatusline.ts --target=node --outfile=dist/ccstatusline.js --target-version=14",
16
- "postbuild": "bun run scripts/replace-version.ts",
17
- "example": "cat scripts/payload.example.json | bun start",
18
- "lint": "bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0",
19
- "lint:fix": "bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0 --fix",
20
- "docs": "typedoc",
21
- "docs:clean": "rm -rf typedoc"
22
- },
23
- "devDependencies": {
24
- "@eslint/js": "^10.0.1",
25
- "@stylistic/eslint-plugin": "^5.2.3",
26
- "@types/bun": "latest",
27
- "@types/pluralize": "^0.0.33",
28
- "@types/react": "^19.1.10",
29
- "chalk": "^5.5.0",
30
- "eslint": "^10.0.0",
31
- "eslint-import-resolver-typescript": "^4.4.4",
32
- "eslint-plugin-import-newlines": "^2.0.0",
33
- "eslint-plugin-import-x": "^4.16.2",
34
- "eslint-plugin-react": "^7.37.5",
35
- "eslint-plugin-react-hooks": "^7.0.1",
36
- "globals": "^17.3.0",
37
- "https-proxy-agent": "^8.0.0",
38
- "ink": "6.2.0",
39
- "ink-gradient": "^4.0.0",
40
- "ink-select-input": "^6.2.0",
41
- "pluralize": "^8.0.0",
42
- "react": "^19.1.1",
43
- "react-devtools-core": "^7.0.1",
44
- "strip-ansi": "^7.1.0",
45
- "tinyglobby": "^0.2.14",
46
- "typedoc": "^0.28.12",
47
- "typescript": "^6.0.2",
48
- "typescript-eslint": "^8.39.1",
49
- "vitest": "^4.0.18",
50
- "zod": "^4.0.17"
51
- },
52
- "keywords": [
53
- "claude",
54
- "claude-code",
55
- "cli",
56
- "status-line",
57
- "terminal"
58
- ],
59
- "author": "",
60
- "license": "MIT",
61
- "repository": {
62
- "type": "git",
63
- "url": "git+https://github.com/Subaru486desuwa/mochiapi-statusline.git"
64
- },
65
- "engines": {
66
- "node": ">=14.0.0"
67
- },
68
- "trustedDependencies": [
69
- "unrs-resolver"
70
- ],
71
- "patchedDependencies": {
72
- "ink@6.2.0": "patches/ink@6.2.0.patch"
73
- }
74
- }
1
+ {
2
+ "name": "mochiapi-statusline",
3
+ "version": "0.1.2",
4
+ "description": "Claude Code status line for MochiAPI users — account balance, today's spend, model, context, and git in your terminal",
5
+ "module": "src/ccstatusline.ts",
6
+ "type": "module",
7
+ "bin": {
8
+ "mochiapi-statusline": "dist/ccstatusline.js"
9
+ },
10
+ "files": [
11
+ "dist/"
12
+ ],
13
+ "scripts": {
14
+ "start": "bun run src/ccstatusline.ts",
15
+ "build": "rm -rf dist/* ; bun build src/ccstatusline.ts --target=node --outfile=dist/ccstatusline.js --target-version=14",
16
+ "postbuild": "bun run scripts/replace-version.ts",
17
+ "example": "cat scripts/payload.example.json | bun start",
18
+ "lint": "bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0",
19
+ "lint:fix": "bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0 --fix"
20
+ },
21
+ "devDependencies": {
22
+ "@eslint/js": "^10.0.1",
23
+ "@stylistic/eslint-plugin": "^5.2.3",
24
+ "@types/bun": "latest",
25
+ "@types/pluralize": "^0.0.33",
26
+ "@types/react": "^19.1.10",
27
+ "chalk": "^5.5.0",
28
+ "eslint": "^10.0.0",
29
+ "eslint-import-resolver-typescript": "^4.4.4",
30
+ "eslint-plugin-import-newlines": "^2.0.0",
31
+ "eslint-plugin-import-x": "^4.16.2",
32
+ "eslint-plugin-react": "^7.37.5",
33
+ "eslint-plugin-react-hooks": "^7.0.1",
34
+ "globals": "^17.3.0",
35
+ "https-proxy-agent": "^8.0.0",
36
+ "ink": "6.2.0",
37
+ "ink-gradient": "^4.0.0",
38
+ "ink-select-input": "^6.2.0",
39
+ "pluralize": "^8.0.0",
40
+ "react": "^19.1.1",
41
+ "react-devtools-core": "^7.0.1",
42
+ "strip-ansi": "^7.1.0",
43
+ "tinyglobby": "^0.2.14",
44
+ "typedoc": "^0.28.12",
45
+ "typescript": "^6.0.2",
46
+ "typescript-eslint": "^8.39.1",
47
+ "vitest": "^4.0.18",
48
+ "zod": "^4.0.17"
49
+ },
50
+ "keywords": [
51
+ "claude",
52
+ "claude-code",
53
+ "cli",
54
+ "status-line",
55
+ "terminal"
56
+ ],
57
+ "author": "",
58
+ "license": "MIT",
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "git+https://github.com/Subaru486desuwa/mochiapi-statusline.git"
62
+ },
63
+ "engines": {
64
+ "node": ">=14.0.0"
65
+ },
66
+ "trustedDependencies": [
67
+ "unrs-resolver"
68
+ ],
69
+ "patchedDependencies": {
70
+ "ink@6.2.0": "patches/ink@6.2.0.patch"
71
+ }
72
+ }