Haleclipse/CCometixLine
Claude Code statusline tool written in Rust
Missing license — unclear to depend on
weakest axisno license — legally unclear; no tests detected
no license — can't legally use code; no tests detected
Documented and popular — useful reference codebase to read through.
no license — can't legally use code
- ✓Last commit 8w ago
- ✓8 active contributors
- ✓CI configured
Show all 6 evidence items →Show less
- ⚠Single-maintainer risk — top contributor 88% of recent commits
- ⚠No license — legally unclear to depend on
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Concerns → Mixed if: publish a permissive license (MIT, Apache-2.0, etc.)
- →Fork & modify Concerns → Mixed if: add a LICENSE file
- →Deploy as-is Concerns → Mixed if: add a LICENSE file
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Great to learn from" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/haleclipse/ccometixline)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/haleclipse/ccometixline on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: Haleclipse/CCometixLine
Generated by RepoPilot · 2026-05-09 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/Haleclipse/CCometixLine shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
WAIT — Missing license — unclear to depend on
- Last commit 8w ago
- 8 active contributors
- CI configured
- ⚠ Single-maintainer risk — top contributor 88% of recent commits
- ⚠ No license — legally unclear to depend on
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live Haleclipse/CCometixLine
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/Haleclipse/CCometixLine.
What it runs against: a local clone of Haleclipse/CCometixLine — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in Haleclipse/CCometixLine | Confirms the artifact applies here, not a fork |
| 2 | Default branch master exists | Catches branch renames |
| 3 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 4 | Last commit ≤ 84 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of Haleclipse/CCometixLine. If you don't
# have one yet, run these first:
#
# git clone https://github.com/Haleclipse/CCometixLine.git
# cd CCometixLine
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of Haleclipse/CCometixLine and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "Haleclipse/CCometixLine(\\.git)?\\b" \\
&& ok "origin remote is Haleclipse/CCometixLine" \\
|| miss "origin remote is not Haleclipse/CCometixLine (artifact may be from a fork)"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "src/main.rs" \\
&& ok "src/main.rs" \\
|| miss "missing critical file: src/main.rs"
test -f "src/core/statusline.rs" \\
&& ok "src/core/statusline.rs" \\
|| miss "missing critical file: src/core/statusline.rs"
test -f "src/config/mod.rs" \\
&& ok "src/config/mod.rs" \\
|| miss "missing critical file: src/config/mod.rs"
test -f "src/ui/app.rs" \\
&& ok "src/ui/app.rs" \\
|| miss "missing critical file: src/ui/app.rs"
test -f "src/core/segments/mod.rs" \\
&& ok "src/core/segments/mod.rs" \\
|| miss "missing critical file: src/core/segments/mod.rs"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 84 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~54d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/Haleclipse/CCometixLine"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
CCometixLine is a high-performance Rust statusline tool for Claude Code that displays model name, directory, Git branch status, and context window info as a formatted string. It integrates with Claude Code's settings.json via a command-type statusline, providing real-time usage tracking based on transcript analysis and includes utilities to patch Claude Code (disable context warnings, enable verbose mode) with automatic backups. Monorepo-style: src/core/segments/ contains modular segment implementations (git.rs, cost.rs, context_window.rs, etc.), src/config/ handles configuration loading and TUI state (loader.rs, models.rs, types.rs), src/cli.rs is the CLI entrypoint, and npm/ contains cross-platform npm package wrappers that bundle pre-built Rust binaries for each platform.
👥Who it's for
Claude Code users and Claude Code extension developers who want enhanced editor statuslines with Git integration, usage analytics, and the ability to customize their Claude Code environment without manual patching between version updates.
🌱Maturity & risk
Actively maintained: v1.1.2 released, CI/CD pipelines present (ci.yml, release.yml), multi-platform npm distribution (darwin-arm64, linux-x64, win32-x64, etc.). No public issue/PR backlog visible, but single-author repo (Haleclipse). Production-ready for statusline display; Claude Code patching features are more niche.
Single maintainer (Haleclipse) is a concentration risk. Dependency on tree-sitter and tree-sitter-javascript for parsing adds surface area; these are external projects. The patching functionality that modifies Claude Code binaries is inherently fragile across Claude Code version updates despite 'robust patcher' claims. No visible test suite in the file list.
Active areas of work
Based on file structure: active multi-platform binary distribution (7 npm platform packages maintained), TUI configuration interface is implemented (ratatui integration visible), and changelog exists (CHANGELOG.md). No recent commit dates visible in provided data, but CI/release workflows suggest ongoing maintenance.
🚀Get running
git clone https://github.com/Haleclipse/CCometixLine.git
cd CCometixLine
cargo build --release
./target/release/ccometixline --help
Or to use globally: npm install -g @cometix/ccline then ccline -c to configure.
Daily commands:
Build & run locally: cargo build --release && ./target/release/ccometixline outputs statusline. Development mode: cargo run -- --help for CLI commands. Interactive config: cargo run -- -c launches TUI. Install for Claude Code: Follow npm install, then add "statusLine": {"type": "command", "command": "~/.claude/ccline/ccline"} to Claude Code settings.json.
🗺️Map of the codebase
src/main.rs— Entry point orchestrating CLI argument parsing, mode routing (statusline vs TUI), and application initialization.src/core/statusline.rs— Core statusline generation logic that assembles segments and formats output for Claude Code integration.src/config/mod.rs— Configuration system managing initialization, loading, validation, and persistence of user settings across runs.src/ui/app.rs— TUI application state machine and event loop; essential for understanding interactive configuration interface.src/core/segments/mod.rs— Segment trait definition and factory; all statusline content plugs through this abstraction.src/cli.rs— CLI argument parser and command dispatcher; defines all user-facing commands and their routing.src/lib.rs— Library root exposing public API; necessary for understanding module organization and public interfaces.
🛠️How to make changes
Add a new statusline segment
- Create new segment module file in src/core/segments/ following the pattern of existing segments (e.g., git.rs, model.rs) (
src/core/segments/my_segment.rs) - Implement the Segment trait with render() method returning formatted string and optional icon (
src/core/segments/mod.rs) - Register segment in the segment factory/enum in src/core/segments/mod.rs (
src/core/segments/mod.rs) - Add segment name to config schema in src/config/models.rs so users can enable/disable it (
src/config/models.rs) - Update statusline composition logic in src/core/statusline.rs to include the new segment in output (
src/core/statusline.rs)
Add a new theme preset
- Create new theme file in src/ui/themes/ (e.g., theme_mycolors.rs) defining color palette (
src/ui/themes/theme_mycolors.rs) - Implement theme structure with foreground/background colors for all segment types (
src/ui/themes/theme_mycolors.rs) - Register theme in src/ui/themes/presets.rs by adding to the presets list and theme selector logic (
src/ui/themes/presets.rs) - Update theme module exports in src/ui/themes/mod.rs to make theme publicly available (
src/ui/themes/mod.rs)
Add a new TUI configuration component
- Create new component file in src/ui/components/ (e.g., component_myfeature.rs) with Draw and HandleEvent traits (
src/ui/components/my_feature.rs) - Implement Draw for rendering and HandleEvent for input handling (
src/ui/components/my_feature.rs) - Register component in src/ui/components/mod.rs module exports (
src/ui/components/mod.rs) - Integrate component into UI state machine in src/ui/app.rs, adding event routing and state updates (
src/ui/app.rs) - Update layout calculations in src/ui/layout.rs to allocate screen space for new component (
src/ui/layout.rs)
🔧Why these technologies
- Rust + cargo — High performance, single compiled binary, minimal runtime overhead critical for shell statusline; excellent cross-platform compilation.
- Ratatui + crossterm — Modern TUI framework for interactive configuration UI; crossterm provides cross-platform terminal control without external dependencies.
- Serde + TOML — Lightweight, human-readable config format; serde provides zero-cost serialization for type-safe configuration structs.
- Clap for CLI — Declarative argument parsing with derive macros; generates help/completions automatically with minimal boilerplate.
- Ansi-term + ansi-to-tui — Terminal color and styling; ansi-to-tui bridges between ANSI escape sequences and Ratatui style primitives.
- Semver + ureq for updates — Version comparison and HTTP-based update checking; ureq avoids async complexity for simple version polling.
⚖️Trade-offs already made
-
Segment-based architecture with trait dispatch
- Why: Allows modular addition of new segment types without recompiling core statusline logic.
- Consequence: Slight runtime overhead from trait objects; worth it for extensibility and code organization.
-
Interactive TUI uses blocking event loop (crossterm + ratatui)
- Why: Simpler than async; TUI interaction is inherently synchronous user-driven.
- Consequence: TUI cannot handle background updates; acceptable since config changes only happen on user input.
-
Statusline generation is synchronous and runs at display time
- Why: Must complete quickly (~100–150ms) to avoid blocking shell prompt rendering.
- Consequence: No caching across invocations; each run fetches fresh git status. Mitigated by parallel segment rendering.
-
Single-binary distribution via Rust compilation
- Why: Eliminates runtime dependency management and ensures consistent behavior across environments.
- Consequence: Build complexity increases; but npm wrappers and GitHub Actions handle this transparently for users.
🚫Non-goals (don't propose these)
- Real-time monitoring or daemon mode—statusline is generated on-demand per shell prompt.
- SSH remote execution—tool runs locally on user's machine; no server component.
- Authentication/account management—reads credentials from environment or local files; no OAuth flow.
- Large language model inference—only consumes Claude API usage data; does not call LLM endpoints.
- Cross-editor support—tightly integrated with Claude Code editor; not a general-purpose statusline tool.
🪤Traps & gotchas
Platform-specific binary paths: The npm postinstall (npm/main/scripts/postinstall.js) downloads binaries to a platform-specific subdirectory; if a platform is missing, silent failures occur. Claude Code version fragility: Patching modifies Claude Code internals; no version pinning means patches may break on minor Claude Code updates. Transcript parsing: Context window calculation depends on Claude Code transcript file format—if Claude Code changes JSON structure, parsing silently fails. Nerd Font assumption: Icons assume Nerd Font is installed in Claude Code; without it, renders as mojibake. Git dependency: Git status commands require git CLI in PATH; no fallback to libgit2 binding visible.
🏗️Architecture
💡Concepts to learn
- Abstract Syntax Tree (AST) parsing with Tree-Sitter — CCometixLine uses tree-sitter-javascript to parse Claude Code transcripts for cost/usage extraction; understanding AST traversal is essential for extending context window calculation logic.
- Terminal User Interface (TUI) patterns with Ratatui — The interactive configuration panel (
-cflag) is built with Ratatui; learning event-driven TUI architecture is needed to modify the config UI or add new interactive features. - Serde serialization/deserialization — Configuration is loaded from TOML via Serde derive macros (src/config/models.rs); understanding Serde traits is required to add new config fields or change serialization behavior.
- Cross-platform binary distribution via npm — CCometixLine distributes pre-built Rust binaries through npm platform-specific subpackages; the postinstall hook (npm/main/scripts/postinstall.js) downloads the right binary—understanding this pattern is crucial for releases and platform support.
- Git porcelain commands and status parsing — src/core/segments/git.rs parses
git status,git branch, andgit rev-parseoutput; understanding git's command-line interface and output formats is needed to debug or extend Git integration. - Nerd Font icon sets and Unicode rendering — Statusline display relies on Nerd Font glyphs (e.g., git branch icon, model icon); understanding icon mapping and Unicode fallbacks prevents rendering issues across terminals.
- Claude Code integration via settings.json and command statuslines — CCometixLine is invoked as a subprocess by Claude Code's statusline feature; understanding Claude Code's settings schema and subprocess handling is essential for debugging integration issues.
🔗Related repos
starship/starship— Starship is the canonical cross-shell customizable statusline/prompt tool in Rust; CCometixLine is domain-specific to Claude Code but shares architectural patterns (modular segments, config-driven appearance, Ratatui TUI).ohmyzsh/ohmyzsh— Shell prompt framework that popularized segment-based statuslines; CCometixLine adapts this pattern for Claude Code rather than shell prompts.Wilfred/difftastic— Another popular Rust CLI tool with sophisticated configuration and theme system; example of Rust tooling best practices in ecosystem CCometixLine targets.tree-sitter/tree-sitter— Direct dependency of CCometixLine for AST parsing JavaScript/TypeScript transcripts; understanding tree-sitter is critical for extending context_window.rs parsing logic.ratatui-org/ratatui— TUI framework used for the interactive configuration panel in CCometixLine; you'll need familiarity with Ratatui to modify the config UI.
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add comprehensive unit tests for src/core/segments/ modules
The repo has 7 segment modules (context_window.rs, cost.rs, directory.rs, git.rs, model.rs, session.rs, usage.rs, output_style.rs) but no visible test files. These segments are core to the statusline generation and deserve unit test coverage. This would catch regressions in parsing Claude usage data, Git status detection, and segment rendering logic.
- [ ] Create tests/core/segments/git_tests.rs with tests for branch parsing, status detection, and icon rendering
- [ ] Create tests/core/segments/usage_tests.rs to validate transcript analysis and cost calculation logic
- [ ] Create tests/core/segments/context_window_tests.rs for context usage parsing edge cases
- [ ] Add integration test in tests/ that verifies all segments render without panicking on mock data
- [ ] Update CI workflow (.github/workflows/ci.yml) to run
cargo testif not already present
Add platform-specific integration tests for npm package distribution
The repo has 7 platform-specific npm packages (darwin-arm64, linux-x64-musl, win32-x64, etc.) with separate package.json files and a postinstall.js script, but no CI workflow validates that binaries actually execute correctly on each platform. The release.yml workflow should verify the binary works after npm install on each platform.
- [ ] Extend .github/workflows/release.yml to add a matrix job testing npm install on Ubuntu, macOS, and Windows runners
- [ ] Add a validation step in npm/scripts/postinstall.js that runs
ccline --versionafter extraction to catch corrupted binaries - [ ] Create tests/npm_integration.sh script to verify the ccline binary is executable and returns correct output on each platform
- [ ] Document in README.md the tested platforms (darwin-arm64, linux-x64-musl, win32-x64, etc.) with CI validation status
Extract duplicated configuration UI logic into reusable component modules
The src/ui/components/ directory has 8 components (color_picker.rs, editor.rs, icon_selector.rs, name_input.rs, separator_editor.rs, etc.) that likely share ratatui widget patterns and event handling. Without seeing the code, common TUI patterns like text input validation, dropdown selection, and preview rendering are probably duplicated across these files.
- [ ] Analyze src/ui/components/*.rs to identify shared patterns in event handling and widget rendering
- [ ] Create src/ui/components/common.rs with reusable helper functions (e.g., render_text_input(), handle_input_event())
- [ ] Refactor src/ui/components/color_picker.rs and icon_selector.rs to use the common module to reduce code duplication
- [ ] Create src/ui/components/mod.rs documentation explaining the component architecture and common patterns
- [ ] Add a test in tests/ui_components.rs verifying that refactored components still work identically
🌿Good first issues
- Add unit tests for
src/core/segments/cost.rsandsrc/core/segments/usage.rs—currently no test files visible in the repository; start with parameterized tests for token cost calculation math. - Document the config schema in a dedicated
docs/configuration.mdfile—currently no docs for the TOML structure; extract schema fromsrc/config/models.rsand add examples for each theme preset. - Add a
--dry-runflag to the Claude Code patcher commands (insrc/cli.rs) so users can preview changes before applying; requires splitting backup logic from application logic in the patcher.
⭐Top contributors
Click to expand
Top contributors
- @Haleclipse — 71 commits
- @JillVernus — 2 commits
- @hluaguo — 2 commits
- @ちょうていしょ — 2 commits
- @Gyv12345 — 1 commits
📝Recent commits
Click to expand
Recent commits
a73b166— chore: release v1.1.2 (Haleclipse)71f7b81— chore: release v1.1.1 (Haleclipse)f36d76a— chore: release v1.1.0 (Haleclipse)f638fed— fix(ui): sync Usage segment colors with TOML theme configs (Haleclipse)57d7405— feat(session): color line changes green/red for +/- (Haleclipse)20daff4— refactor(credentials): extract read_token_from_path() to reduce duplication (Haleclipse)db56644— Merge: prioritize CLAUDE_CONFIG_DIR over default path (#45) (Haleclipse)411741a— Merge: add Linux ARM64 support (#68) (Haleclipse)5cd936e— fix: remove fake checksum placeholder for ARM64 musl toolchain (Haleclipse)0a098cf— revert: remove native context_window API support (#71) (Haleclipse)
🔒Security observations
Failed to generate security analysis.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.