MCPcopy Index your code
hub / github.com/Piebald-AI/splitrail

github.com/Piebald-AI/splitrail @v3.5.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.5.8 ↗ · + Follow
1,240 symbols 3,174 edges 62 files 218 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Check out Piebald

We've released Piebald, the ultimate agentic AI developer experience. \ Download it and try it out for free! https://piebald.ai/

Join our Discord X

Scroll down for Splitrail. :point_down:

hero

Splitrail

Splitrail is a fast, cross-platform, real-time token usage tracker and cost monitor for: - Gemini CLI (and Qwen Code) - Claude Code - Codex CLI - Cline / Roo Code / Kilo Code (VS Code extension + CLI) - GitHub Copilot (VS Code) - GitHub Copilot CLI - OpenCode - Pi Agent

Run one command to instantly review all of your CLI coding agent usage. Upload your usage data to your private account on the Splitrail Cloud for safe-keeping and cross-machine usage aggregation. From the team behind Piebald.

[!note] ⭐ If you find Splitrail useful, please consider starring the repository to show your support!

Download the binary for your platform on the Releases page.

Screenshots

Splitrail CLI

Screenshot of the Splitrail CLI

Splitrail VS Code Extension

Screenshot of the Splitrail VS Code Extension

Splitrail Cloud

Screenshot of Splitrail Cloud

MCP Server

Splitrail can run as an MCP (Model Context Protocol) server, allowing AI assistants to query your usage statistics programmatically.

splitrail mcp

Available Tools

  • get_daily_stats - Query usage statistics with date filtering
  • get_model_usage - Analyze model usage distribution
  • get_cost_breakdown - Get cost breakdown over a date range
  • get_file_operations - Get file operation statistics
  • compare_tools - Compare usage across different AI coding tools
  • list_analyzers - List available analyzers

Resources

  • splitrail://summary - Daily summaries across all dates
  • splitrail://models - Model usage breakdown

Configuration

Splitrail stores its configuration at ~/.splitrail.toml:

[server]
url = "https://splitrail.dev"
api_token = "your-api-token"

[upload]
auto_upload = false
upload_today_only = false

[formatting]
number_comma = false
number_human = false
locale = "en"
decimal_places = 2

Development

Windows

On Windows, we use lld-link.exe from LLVM to significantly speed up compilation, so you'll need to install it to compile Splitrail. Example for winget:

winget install --id LLVM.LLVM

Then add it to your system PATH:

:: Command prompt
setx /M PATH "%PATH%;C:\Program Files\LLVM\bin\"
set "PATH=%PATH%;C:\Program Files\LLVM\bin"

or

# PowerShell
setx /M PATH "$env:PATH;C:\Program Files\LLVM\bin\"
$env:PATH = "$env:PATH;C:\Program Files\LLVM\bin\"

Then use standard Cargo commands to build and run:

cargo run

macOS/Linux

Build as normal:

cargo run

License

MIT

Copyright © 2026 Piebald LLC.

Extension points exported contracts — how you extend this code

Analyzer (Interface)
(no doc) [18 implementers]
src/analyzer.rs
ReqwestSimdJsonExt (Interface)
Extension trait to add simd-json support to reqwest [1 implementers]
src/reqwest_simd_json.rs
DashboardData (Interface)
(no doc)
vscode-splitrail/src/dashboardView.ts
ResponseSimdJsonExt (Interface)
Extension trait to add simd-json parsing support to reqwest responses [1 implementers]
src/reqwest_simd_json.rs
JsonStatsResponse (Interface)
(no doc)
vscode-splitrail/src/usageView.ts
JsonAnalyzerStats (Interface)
(no doc)
vscode-splitrail/src/usageView.ts
JsonDailyStats (Interface)
(no doc)
vscode-splitrail/src/usageView.ts
JsonInnerStats (Interface)
(no doc)
vscode-splitrail/src/usageView.ts

Core symbols most depended-on inside this repo

get
called by 189
src/types.rs
approx_eq
called by 153
src/models.rs
iter
called by 140
src/types.rs
hash_text
called by 71
src/utils.rs
calculate_input_cost
called by 35
src/models.rs
calculate_output_cost
called by 32
src/models.rs
calculate_cache_cost
called by 28
src/models.rs
get_model_info
called by 27
src/models.rs

Shape

Function 670
Method 349
Class 178
Enum 34
Interface 9

Languages

Rust97%
TypeScript3%

Modules by API surface

src/analyzers/opencode.rs85 symbols
src/models.rs84 symbols
src/types.rs62 symbols
src/analyzer.rs59 symbols
src/analyzers/opencode_common.rs49 symbols
src/analyzers/copilot_cli.rs44 symbols
src/tui/tests.rs43 symbols
src/tui.rs40 symbols
src/config.rs36 symbols
src/analyzers/codex_cli.rs36 symbols
src/analyzers/piebald.rs35 symbols
src/analyzers/claude_code.rs34 symbols

For agents

$ claude mcp add splitrail \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page