CCometixLine Documentation

repository·master·Indexed 25 days ago

https://github.com/haleclipse/ccometixline

CCometixLine (ccline) is a high-performance statusline tool for Claude Code written in Rust. It provides real-time information including Git status, Claude model names, and context window usage. It features a TUI configuration interface, customizable themes, and the ability to patch the Claude Code cli.js to disable context warnings and enable verbose mode. Supports macOS, Linux, and Windows.

Tokens
6.1K
Snippets
12
Records
51
Agent score
82%

What's inside CCometixLine

  1. Configure CCometixLine for Claude Code

    master

    To integrate CCometixLine as a statusline in Claude Code, add a statusLine configuration to your Claude Code settings.json file.

    This method uses a path relative to the user home directory and is recommended for all platforms, including Windows (v2.1.47+).

    {
      "statusLine": {
        "type": "command",
        "command": "~/.claude/ccline/ccline",
        "padding": 0
      }
    }

    Note for Windows users: Do not use %USERPROFILE%. Starting from Claude Code v2.1.47+, the ~ symbol is automatically expanded to your user home directory and is the most reliable method.

    Fallback (npm installation)

    If you have installed via npm and ccline is in your system PATH, use this configuration:

    {
      "statusLine": {
        "type": "command",
        "command": "ccline",
        "padding": 0
      }
    }
    {
      "statusLine": {
        "type": "command",
        "command": "~/.claude/ccline/ccline",
        "padding": 0
      }
    }
  2. Manage CCometixLine configuration and themes

    master

    CCometixLine can be configured via TOML files or an interactive TUI.

    • Initialize default config: ccline --init (creates ~/.claude/ccline/config.toml)
    • Interactive TUI editor: ccline --config (allows real-time editing and previewing)
    • Theme selection: ccline -c opens the configuration panel for theme selection.
    • Temporary theme override: Use the --theme flag to override the config file settings.
    # Initialize default configuration
    ccline --init
    
    # Open interactive configuration editor
    ccline --config
    
    # Open theme selection panel
    ccline -c
    
    # Use a specific theme temporarily
    ccline --theme cometix
    ccline --theme minimal
    ccline --theme gruvbox
    ccline --theme nord
    ccline --theme powerline-dark
    
    # Use a custom theme from the themes directory
    ccline --theme my-custom-theme
  3. Manual installation for Linux, macOS, and Windows

    master

    If you prefer not to use npm, you can download binaries from the GitHub Releases page and place them in ~/.claude/ccline/.

    # Linux (Dynamic Link - Recommended)
    mkdir -p ~/.claude/ccline
    wget https://github.com/Haleclipse/CCometixLine/releases/latest/download/ccline-linux-x64.tar.gz
    tar -xzf ccline-linux-x64.tar.gz
    cp ccline ~/.claude/ccline/
    chmod +x ~/.claude/ccline/ccline
    
    # macOS (Apple Silicon)
    mkdir -p ~/.claude/ccline
    wget https://github.com/Haleclipse/CCometixLine/releases/latest/download/ccline-macos-arm64.tar.gz
    tar -xzf ccline-macos-arm64.tar.gz
    cp ccline ~/.claude/ccline/
    chmod +x ~/.claude/ccline/ccline
  4. Install CCometixLine via npm

    master

    The recommended way to install CCometixLine is via npm, which works across all platforms. This provides the global ccline command.

    To install globally:

    npm install -g @cometix/ccline

    Alternatively, you can use yarn or pnpm:

    yarn global add @cometix/ccline
    pnpm add -g @cometix/ccline

    If you are in a region where npm is slow, use the npm mirror:

    npm install -g @cometix/ccline --registry https://registry.npmmirror.com
    npm install -g @cometix/ccline
  5. Configure models and context limits in `models.toml`

    master

    You can customize how model IDs are displayed and define their context window limits in ~/.claude/ccline/models.toml. This file is automatically created on the first run.

    Model Entries

    Use [[models]] to define patterns for model ID substring matching. These take priority over built-in Claude model recognition.

    Context Modifiers

    Use [[context_modifiers]] to append suffixes to display names and override context limits. These are matched independently and are composable with model entries.

    Example configuration:

    [[models]]
    pattern = "glm-4.5"
    display_name = "GLM-4.5"
    context_limit = 128000
    
    [[models]]
    pattern = "kimi-k2"
    display_name = "Kimi K2"
    context_limit = 128000
    
    [[context_modifiers]]
    pattern = "[1m]"
    display_suffix = " 1M"
    context_limit = 1000000
    [[models]]
    pattern = "glm-4.5"
    display_name = "GLM-4.5"
    context_limit = 128000
    
    [[models]]
    pattern = "kimi-k2"
    display_name = "Kimi K2"
    context_limit = 128000
    
    [[context_modifiers]]
    pattern = "[1m]"
    display_suffix = " 1M"
    context_limit = 1000000
  6. Configure custom models in models.toml

    master

    You can define custom model display names and context limits in ~/.claude/ccline/models.toml. This file uses pattern matching against model IDs. You can also use context_modifiers to append suffixes and override limits based on specific patterns.

    # Model entries: matches substrings of model IDs
    # Higher priority than built-in Claude recognition
    [[models]]
    pattern = "glm-4.5"
    display_name = "GLM-4.5"
    context_limit = 128000
    
    [[models]]
    pattern = "kimi-k2"
    display_name = "Kimi K2"
    context_limit = 128000
    
    # Context modifiers: matches independently to append suffixes or override limits
    [[context_modifiers]]
    pattern = "[1m]"
    display_suffix = " 1M"
    context_limit = 1000000
  7. Configure CCometixLine via TUI keyboard shortcuts

    master

    The CCometixLine TUI uses specific keyboard shortcuts to navigate and modify configurations.

    • Tab: Switch between the Segment List and Settings panels.
    • Esc: Quit the application or close an open popup.
    • Up / Down: Navigate selections. Use Shift + Up/Down to reorder segments in the list.
    • Enter: Toggle a segment's enabled state or edit a selected field.

    Theme Management

    • 1, 2, 3, 4: Quickly switch to built-in themes (default, minimal, gruvbox, nord).
    • p: Cycle through all available themes.
    • r: Reset the current theme to its default configuration.
    • s: Save the current configuration to config.toml.
    • Ctrl + s: Open a name input to save the current configuration as a new theme.
    • w / W: Write the current configuration directly to the active theme file.

    Segment & Style Editing

    • e / E: Open the Separator Editor to modify the segment separator.
    • s: Save configuration to config.toml.
  8. Patch Claude Code context warnings

    master

    You can use the --patch flag to disable Claude Code context warnings. The tool uses the ClaudeCodePatcher utility to modify the target file.

    Safety mechanism: The tool automatically creates a backup of your target file with a .backup extension in the same directory.

    Restoration: To undo the patches, manually replace the modified file with the backup using: cp <original_file>.backup <original_file>