Preflight CLI
Preflight by New Relic: observability for coding agents with cost in USD, efficiency scores and a local dashboard
- 67 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- Hooks record agent calls, including file names and commands
- In cloud mode telemetry goes to the external New Relic service
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/preflightDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Hooks record agent calls, including file names and commands
- In cloud mode telemetry goes to the external New Relic service
This is third-party code. Review the repository files before installing.
What it does
Preflight records what a coding agent does in a session: file reads, edits, commands and searches. From that it computes spend in USD per session, day and week, splits it by model and cache, shows a 0 to 100 efficiency score and catches typical misses such as re-reads, blind edits and loops. By default everything stays on your machine, with a live dashboard at `localhost:7777`. Connecting a New Relic account adds team dashboards, alerts on cost spikes and history across sessions. It works through hooks and a built-in MCP server, which the `preflight setup` wizard configures for you.
Who it is for. Developers and tech leads who want to see agent cost and efficiency instead of guessing from the bill.
Good fit when
- The token bill grew and you want to see which models and tasks drove it
- An agent goes in circles and call traces show where it got stuck
- A team compares Claude Code, Cursor and Windsurf on cost and outcome
- A manager wants a roll-up of developer spend without tool-call content
- You cap session budgets with an alert before overspend
Not a fit when
- Your agent has no hook support, so part of the calls will not be recorded
- Policy forbids any capture of agent actions, even local
- You only need provider invoices without per-session breakdown
Example request
Show how much my sessions cost this week and where the agent kept re-reading the same filesLimitations
Capture completeness depends on the platform: some agents expose every built-in call, while Zed, Continue.dev and Cline only see calls routed through Preflight own tools (see ADAPTERS.md). Requires Node.js 22 or newer. Cloud mode needs a New Relic license key and account ID; a key on the command line is visible to other users through `ps`, so read it from a file or variable. The project sits in the newrelic-experimental organization, so it is experimental with no support guarantee.
How to disable. Run `npm uninstall -g @newrelic/preflight`, remove the hooks and MCP entry from the agent configuration, and delete the data directory `~/.newrelic-preflight/`.
FAQ
Does data leave my machine?
Not by default: local mode keeps everything on the machine. Cloud and both modes send telemetry to New Relic.
How do I install it in Claude Code as a plugin?
Run `/plugin marketplace add newrelic-experimental/preflight`, then `/plugin install newrelic-preflight@newrelic-preflight-marketplace`.
Which agents does it work with?
Claude Code, Codex, Gemini CLI, GitHub Copilot, Amazon Kiro, opencode, Kilo Code and more, with capture coverage varying by platform.
Do I need a New Relic account?
No, the local dashboard works without one; the account is only for team dashboards and alerts.
How do I install through Homebrew?
Run `brew tap newrelic-experimental/preflight` and `brew install preflight`, then `preflight setup`.
Discussion
No questions or reviews yet.
Related
CLI toolsA local proxy between AI agents and model providers that prices every run as it happens and cuts off spend above your cap
Official Dynatrace skills for agents: DQL, traces, logs, Kubernetes, cloud and security work inside Claude Code and Cursor.
A local dashboard for Claude Code, Codex CLI, Gemini CLI, Copilot and OpenCode that shows tokens, cost, latency and errors
A plugin that reminds the agent of free-tier limits and paid traps in cloud services before deploys, without blocking any command.
Local gateway for coding agents: one setup for model providers, call tracing and per-request cost.
Tokscale
tokscale
A CLI with an interactive TUI that tracks token usage and cost across AI coding agents: Claude Code, Codex, Copilot, Cursor and more
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| Preflight (this card) | no | 67 | |
| ccusage | no | 19,425 | Counts spend from Claude Code logs, while Preflight records calls via hooks and scores efficiency. |
| TokenTelemetry | no | 388 | Another token telemetry collector; Preflight adds dashboards, alerts and a New Relic mode. |
README in short
The README explains why coding agents need observability and describes three modes: local, cloud and both. It covers installation through npm, a Claude Code plugin, Homebrew and Cursor, the supported agents and the New Relic connection.