cship  by stephenleo

Status line for AI coding sessions

Created 1 month ago
315 stars

Top 85.8% on SourcePulse

GitHubView on GitHub
Project Summary

<CShip provides a highly customizable and performant status line for Claude Code sessions, offering real-time insights into session cost, context window usage, model details, and API limits. It targets Claude Code users seeking to monitor their AI session's resource consumption directly within their terminal, enhancing productivity through immediate feedback and deep configuration options, including seamless integration with the popular Starship prompt.

How It Works

Written in Rust, CShip is engineered for speed, aiming for a render budget under 10 milliseconds. It processes Claude Code's live JSON feed to extract and display session-specific data. Customization is achieved through a TOML configuration file, allowing users to define status line layouts, module visibility, and warning/critical thresholds with custom styling. A key feature is its Starship passthrough capability, enabling the direct embedding of any Starship module (like git status or language runtimes) alongside native CShip modules for a unified terminal experience.

Quick Start & Requirements

  • Primary install / run command: The recommended installation method is via a curl script: curl -fsSL https://cship.dev/install.sh | bash. This script handles OS/architecture detection, binary installation to ~/.local/bin/cship, starter configuration creation at ~/.config/cship.toml, and automatic wiring into ~/.claude/settings.json. An alternative installation using cargo install cship requires the Rust toolchain.
  • Non-default prerequisites and dependencies: Starship is required for passthrough modules. On Linux, libsecret-tools is needed for usage limit tracking.
  • Links: Official documentation and configuration reference are available at cship.dev.

Highlighted Details

  • Blazing-fast performance with a ≤10ms render budget.
  • Full Starship passthrough allows embedding any Starship module.
  • Provides detailed session insights: cost tracking (USD), context window usage (visual bar and token counts), API usage limits (5hr/7-day), model name, and agent name.
  • Highly customizable via TOML, supporting custom colors and thresholds for various metrics.
  • Includes six ready-to-use configurations, demonstrating various layouts and styling, including options for Nerd Fonts and full Starship prompt integration.

Maintenance & Community

No specific details regarding maintainers, sponsorships, or community channels (e.g., Discord, Slack) are provided in the README.

Licensing & Compatibility

CShip is released under the Apache-2.0 license. This permissive license allows for commercial use and integration into closed-source projects.

Limitations & Caveats

Certain configurations, such as those utilizing Nerd Fonts, require the user's terminal to have a compatible font installed. The tool's functionality is inherently dependent on the output format and availability of data from the Claude Code status line API.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
48
Issues (30d)
9
Star History
318 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.