copilot-powerline-0.1.0 is not a library.
copilot-powerline
A fast, modular, and customizable powerline status line for GitHub Copilot CLI, written in Rust. Inspired by claude-powerline.
Features
- ⚡️ Sub-5ms Execution: Compiled Rust binary with bundled SQLite; zero terminal latency or lag.
- 🎯 Context & Token Monitoring: Displays current vs max tokens with a percentage and a high-usage alert threshold (>100k).
- 💰 Spend Tracking: Real-time session spend and month-to-date aggregation (read directly from Copilot's local SQLite database).
- ⚙️ Configurable AIC Display: Easily toggle whether AI Credits (
... AIC) are displayed alongside dollar amounts. - 🎨 Multiple Styles: Choose from
minimal(pipe separator),powerline(Nerd Font arrows),capsule(rounded pills), orplain. - 🌈 Themes: Built-in support for
colorblind,github,nord,tokyo-night, andplain. Automatically syncs with your Copilot theme if set to default. - 🛠 Zero Dependencies: Bundles SQLite and JSON parsing directly into a single static binary.
Quick Start
1. Build and Install
# Clone the repository
# Build and install to ~/.cargo/bin
2. Generate Default Configuration
This creates a default configuration file at ~/.copilot/powerline.toml.
3. Connect to GitHub Copilot CLI
Update your ~/.copilot/settings.json to use copilot-powerline:
(If ~/.cargo/bin is not in your global system PATH, specify ~/.cargo/bin/copilot-powerline).
Configuration (~/.copilot/powerline.toml)
copilot-powerline is configured via a simple TOML file:
= "minimal" # Options: "minimal", "powerline", "capsule", "plain"
= "colorblind" # Options: "colorblind", "github", "nord", "tokyo-night", "plain"
= [
"tokens",
"session_cost",
"month_cost",
]
[]
= true
= true
= 100000
= "⚠️ "
[]
= true
= "Session:"
= "$"
= false # Set to true to show "(X.X AIC)"
= 2
[]
= true
= "Month:"
= "$"
= false # Set to true to show "(X AIC)"
= 2
Command Line Options
# Test with sample JSON from stdin
|
# Override style on the fly
# Override theme on the fly
# Use a custom configuration file
License
MIT