@lineman-io/plugin
v2.9.15
Published
Lineman MCP server — AI-powered code intelligence for Claude Code
Downloads
1,227
Maintainers
Readme
Lineman: save 40%+ tokens on Claude Code, and see what it costs
Lineman is a Claude Code plugin that hands data-heavy work to a fast secondary AI. It takes large file reads, build- and test-log triage, and web-search and grep output off your primary model so its context stays on reasoning. Teams typically save 40%+ tokens.
It also turns that usage into a real-time Cost Explorer: every call is priced as you work and attributed automatically to the repository, branch, developer, and ticket it came from. Less tokens, same output, lower bills, and a clear picture of where your Claude Code spend actually goes.
Get started at lineman.io
@lineman-io/plugin is the plugin package itself. You don't install it by hand with npm install. The Lineman CLI installs it into Claude Code, signs you in, and verifies everything in one step:
npx -y @lineman-io/cli setupTo update Lineman (both the CLI and the Claude Code plugin) later:
npx -y @lineman-io/cli updateupdate runs a fresh copy through npx, so it repairs a broken install too. Both commands are safe to re-run. Create your account and see plans at lineman.io and lineman.io/pricing.
What Lineman does
- Saves tokens. A secondary LLM compresses and filters data-heavy tool output (large file reads,
tsc/ test / CI output,git diff,docker logs, grep and glob results) before it reaches your primary model's context window. You keep the same context with 40%+ fewer tokens. - Monitors your spend. Lineman prices every call as you work and feeds a real-time Cost Explorer: a breakdown of AI spend by repository, branch, developer, and ticket, plus spike alerts and one-click CSV export. Attribution is automatic from your git context, so there is no manual tagging. Unlike generic LLM-cost dashboards, spend is mapped to the repo and the ticket it came from.
- Coming soon: native issue-tracker integrations that write that cost back onto the ticket (Jira, Linear, GitHub Issues, monday.com, and more).
- Keeps your session coherent. Before Claude Code compacts the conversation, Lineman snapshots your standing rules and decisions and re-injects them on the next session, so the model picks up where it left off.
- Shows its work. An optional TUI statusline reports cumulative tokens and cost saved this session.
Two model-facing MCP tools (assist, edit_file), the lifecycle hooks, and the skills are catalogued in the tools & methods docs. Benchmarks (SWE-Bench Pro) are at lineman.io/benchmarks.
After installing
The setup wizard signs you in. To run sign-in on its own (a second machine, or after switching accounts):
npx -y @lineman-io/cli auth # OAuth sign-in (also available as /lineman:auth in Claude Code)This opens a browser for approval. In a headless or CI environment where no browser is available, skip the flow and set LINEMAN_API_TOKEN directly (see Configuration).
Inside a Claude Code session, Lineman is invisible: hooks route data-heavy tool calls through the secondary LLM automatically. Slash commands:
| Command | Purpose |
|---------|---------|
| /lineman:auth | One-time OAuth 2.1 PKCE sign-in (acquires + saves your API token). |
| /lineman:doctor | Health check: MCP reachable, token valid, tier, config writable, hooks installed, last-call latency. |
| /lineman:stats | Session metrics: assist calls, tokens saved, savings ratio, and a by-task-type breakdown. |
Alternative install paths
The plugin (MCP server + lifecycle hooks + skills as one unit) can also be added via the Claude Code marketplace:
/plugin marketplace add lineman-io/lineman-mono
/plugin install lineman@lineman
/reload-plugins
/lineman:authOr register only the assist MCP tool, without Lineman's auto-routing hooks/skills (you then invoke it explicitly from prompts):
claude mcp add lineman -- npx -y @lineman-io/pluginMost users should prefer npx -y @lineman-io/cli setup, which wires up the full experience.
Statusline (optional)
Lineman ships an optional bottom-bar statusline for the Claude Code TUI that shows cumulative session savings:
[Lineman] saved 73% / 182.50k tokens across 12 calls
It installs itself on first session start, refreshes on upgrade, restores cleanly when disabled, and never puts a model in the loop. Full lifecycle (auto-install, conflict handling with an existing statusline, manual removal) is documented in the statusline docs. TUI-only: the Claude Code desktop and IDE surfaces show the per-call savings cue instead.
Configuration
User config lives at ~/.lineman/config.json:
{
"dataApiUrl": "https://api-data.lineman.io",
"controlApiUrl": "https://api-app.lineman.io",
"apiToken": "<set by lineman setup / lineman auth>",
"userId": "<set after auth>",
"tier": "free",
"telemetryEnabled": true
}The OAuth flow also persists the refresh token + expiry so the access token refreshes silently. The two URLs map to the customer-facing Lineman API services (dataApiUrl = sync inference; controlApiUrl = auth, usage, dashboard). URL resolution never fails: a fresh install with no config lands on production.
| Variable | Overrides | Purpose |
|----------|-----------|---------|
| LINEMAN_DATA_API_URL | dataApiUrl | Sync inference service |
| LINEMAN_CONTROL_API_URL | controlApiUrl | Auth + usage + dashboard service |
| LINEMAN_ENV | both URLs | staging / prod bundle switch |
| LINEMAN_API_TOKEN | apiToken | Override the saved token (CI / scripted) |
Lineman's MCP tools (assist, edit_file) always register, even before authentication: a call returns a structured not_authenticated error pointing at the sign-in flow until a token is present, then succeeds without restarting the server.
Telemetry
Lineman sends a small, anonymous stream of operational telemetry to Sentry so we can detect outages, fix bugs, and measure activation. We never send raw prompts, source code, file contents, or environment variable values.
- Sent: a stable per-machine install id, your Lineman user id (after auth), tool-call telemetry (tool name, task type, latency, byte counts, savings estimates, error class), activation events, and runtime info (OS, Node, MCP version, host).
- Stripped before send: absolute file paths are rewritten to
~; stack-frame variables named likeprompt/content/code/token/secretare blanked; HTTP bodies are blanked wholesale.
Disable it either way (env wins):
export LINEMAN_TELEMETRY=off
# or: npx -p @lineman-io/plugin lineman-mcp telemetry off # on | statusOpting out also hard-disables the cost-attribution capture path. A minimal phone-home (identity + version + config flags, no source-derived data) still flows so we can count installs and track crash-rate per release.
Troubleshooting
Run /lineman:doctor (or npx -y @lineman-io/cli setup again). It probes the MCP server, the API token, the tier, config writability, hook installation, and last-call latency, and prints actionable fail entries.
Requirements
- Node.js >= 22
- Claude Code with plugin support
License
Proprietary. See lineman.io for terms. Lineman is a product of Goo Holdings Ltd.
