CodSpeed CLI
A CLI for performance measurement and regression detection; the repository also holds a plugin with two skills and MCP for Claude Code and Cursor
- 385 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- Installation uses a `curl | bash` script that puts a binary on the system
- The CLI runs your programs and benchmarks and sends results and metadata to the CodSpeed service
- The `codspeed-optimize` skill edits code autonomously in a loop until you stop it
Install
- Works in
Manual install
curl -fsSL https://codspeed.io/install.sh | bashUbuntu 22.04, 24.04, 26.04 and Debian 12 are officially supported. After installing run `codspeed auth login`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Installation uses a `curl | bash` script that puts a binary on the system
- The CLI runs your programs and benchmarks and sends results and metadata to the CodSpeed service
- The `codspeed-optimize` skill edits code autonomously in a loop until you stop it
This is third-party code. Review the repository files before installing.
What it does
CodSpeed CLI runs any program or benchmark suite and records performance figures. The `codspeed exec` command measures an arbitrary executable without code changes, and `codspeed run` plugs into existing benchmarks: `pytest` with `--codspeed`, `cargo codspeed run` for criterion, `vitest bench`. Benchmarks can be described in a `codspeed.yml` file and run with one command. There are three measurement instruments: CPU simulation, which the authors say gives under 1% variance regardless of load, memory with eBPF-based heap allocation tracking, and real wall time. In CI, results are compared between commits, CodSpeed shows differential flamegraphs and leaves pull request comments. For agents the repository ships Claude Code and Cursor plugin manifests. The plugin holds the `codspeed-setup-harness` skill, which picks and configures benchmarks for the project's language, and `codspeed-optimize`, which loops: measure, read the flamegraph, change code and compare. The agent reads results through the MCP address `https://mcp.codspeed.io/mcp`.
Who it is for. Python, Rust, Node.js, Go and C/C++ developers who catch slowdowns in pull requests and want an agent to set up benchmarks and speed code up from measurements.
Good fit when
- You want to time a script or binary without edits or a benchmark framework
- CI should block a pull request that slows code beyond a threshold
- A project lacks benchmarks and an agent should create them for its language and build
- A hot path is slow and an agent should speed it up iteratively using flamegraphs
Not a fit when
- The system is not Ubuntu 22.04, 24.04, 26.04 or Debian 12: there is no official support and other distributions may not work
- You need an offline check without an account: the CLI asks you to run `codspeed auth login` to link results to an account
- Wall-time on a regular VM without dedicated runners gives unstable data, so use simulation mode instead
- You want to optimize by hand without an external service: the plugin skills require every measurement to go through CodSpeed
Example request
Set up codspeed in this project, add benchmarks for the hot functions and find what slows processing from the flamegraphLimitations
Officially the CLI supports Ubuntu 22.04, 24.04, 26.04 and Debian 12, and other Linux distributions may work without guarantees. Results linked to an account need a login with `codspeed auth login`. Wall-time mode on regular virtual machines gives unstable data, and the authors recommend their dedicated runners. The agent plugin requires every measurement to go through CodSpeed and asks the user for help when the CLI fails. Installation uses a `curl | bash` script, so read it before running.
How to disable. Remove the `codspeed` binary from `PATH`, the `codspeed.yml` file from the project and the CodSpeed step from CI configuration. Disable the plugin in the agent's plugin manager.
FAQ
How do I measure a program without changing code?
Run `codspeed auth login`, then `codspeed exec -- ./my-binary --arg1 value`. Pick the mode with a flag, for example `--mode walltime` for real time.
Which languages and frameworks are supported?
Python (`pytest`), Rust (`divan`, `criterion.rs`, `bencher`), C/C++ (`google-benchmark`), Node.js (`vitest`, `tinybench`, `benchmark.js`) and Go (built-in `testing`). A community integration exists for Zig.
What does the `codspeed-optimize` skill do?
It works in a loop: measure through the CLI, read the flamegraph, make a change and compare. The loop continues while there are gains or until you stop it.
How do I connect CodSpeed MCP by hand?
Point the agent's configuration at the remote server `https://mcp.codspeed.io/mcp`, as in the repository's `.mcp.json`. Authorization happens on CodSpeed's side.
How do I run CodSpeed in GitHub Actions?
Use the official `CodSpeedHQ/action@v5` action with `mode` and `run` inputs. The description includes samples for GitHub Actions, GitLab CI and CircleCI.
Discussion
No questions or reviews yet.
Related
CLI toolsFour Claude Code skills: 1C testing through Codex and 1c-testpilot, code review, export and load through ibcmd
Caliper runs agent tasks with and without your skill, then shows whether the skill helps and how many tokens it costs
kogiQA MCP gives an agent a browser that finds page elements without selectors, for debugging web apps and writing e2e tests
A 0 to 10 score for CLAUDE.md and AGENTS.md: Reporails finds vague rules, repeats and broken imports
A CLI for testing and red teaming LLM applications: compares models, runs automated CI checks and finds vulnerabilities
MCP server, agent and skills for end-to-end UI tests where the agent drives the computer through vision on cloud machines
README in short
The description opens with a feature list and the install command, then shows a quick start with `codspeed exec` and `codspeed run`. Next come a table of language integrations, setup via `codspeed.yml`, the three measurement instruments and sample runs in GitHub Actions, GitLab CI and CircleCI.