sentrux is a pure-Rust architectural sensor that watches your codebase in real time and turns structural health into one 0-10000 quality score. It appeared in the For You feed as the "live map" that keeps a project from collapsing as AI agents rewrite it: it scans files and dependency chains, folds five root-cause metrics into a single score, and exposes that signal to agents through MCP. Its pitch is simple. Agents write code at machine speed, so without a sensor, codebases rot at machine speed too.
Key Features
- One score, five root causes: modularity, acyclicity, depth, equality, and redundancy are combined with a geometric mean, which the author argues is hard to game.
- Live treemap:
sentruxopens a GUI that updates as the agent writes, instead of showing diffs or terminal output. - MCP integration: nine MCP tools let Claude Code, Cursor, Codex, or OpenCode query the score and gate on degradation.
- Rules engine:
.sentrux/rules.tomlencodes layers, boundaries, and constraints, great for turning architectural intent into machine-readable grades. - Session gate:
sentrux gate --savebefore a session andsentrux gateafter, to catch degradation per agent run. - CI-friendly:
sentrux check .exits 0 or 1 so you can block bad merges. - 52 languages: all language knowledge lives in
plugin.tomlplustags.scmquery files, so adding a language needs zero Rust code.
Use Cases
Who Should Use This Tool?
- Team leads running long Claude Code / Codex sessions who lose trust in a codebase after a week of agency.
- Platform engineers who want a quality gate in CI that is about structure, not just tests.
- Refactoring planners who need to see coupling, cycles, and god-files before they start.
- Anyone adopting vibe coding who still wants an exit ramp before the architecture becomes unreadable.
Problems It Solves
- Context rot without a feedback loop: the agent does not know when code stops fitting the system, so it cannot self-correct.
- Spec-first workarounds produce mountains of markdown with zero visibility into what actually shipped.
- Test suites catch behavior, not architecture: no tool was closing the loop on whether a change fits the growing system.
Pricing
sentrux is free and open source under the MIT license. There is no paid tier; you pay only for your compute.
| Piece | Price | Notes |
|---|---|---|
| sentrux binary | $0 | MIT, single binary, macOS/Linux/Windows |
| Language plugins | $0 | 52 in the standard set, or custom via plugin init |
Advantages & Unique Selling Points
- Pure Rust, single binary: no runtime dependencies, easy to drop into a repo or a container.
- Language-agnostic by design: all language logic is data-driven, so extending it is not a compiler change.
- Differentiator versus context-rot tools: instead of managing the context window, sentrux gives the agent an external source of truth about the codebase's health.
User Reviews
"It's the difference between an agent guessing why the code feels off and giving it a target: get your redundancy score below 1000. That directness saves tokens and makes the self-improvement loop actually go somewhere." — Independent contractor, per community write-ups
"The 0-10000 score is ungameable by design. Whether that holds up under adversarial pushing is the thing to watch." — Practitioner note from an MCP roundup
Getting Started
- Install:
brew install sentrux/tap/sentrux(macOS), curl installer (Linux), or a release binary (Windows). - Open the GUI:
sentruxorsentrux /path/to/project. - Save a baseline:
sentrux gate --save .before an agent session. - Compare after:
sentrux gate ., or enforce in CI withsentrux check .. - Connect the agent: point your MCP client at the sentrux server so the agent sees the live score.
First-party resources: sentrux.dev, the sentrux GitHub repo, and its MCP integration docs.
Frequently Asked Questions
Does sentrux run tests or check functionality?
No. It measures structure (dependencies, file organization, architecture) through static analysis. Correctness is still the job of a test suite, so use both.
Can it be used without an AI agent?
Yes. Run sentrux to visualize, sentrux check in CI to enforce rules, and sentrux gate to track quality over time.
What do the 52 languages really mean?
Language ability comes from tree-sitter plugins referenced in plugin.toml. The binary itself is generic, which is why adding a language needs no Rust code.
What drives the score?
The five metrics are combined via a geometric mean, which is less susceptible to one inflated metric carrying the whole result.
Alternatives
- LangGraph: for orchestrating agentic workflow logic, a different layer than code-structure sensing.
- CrewAI: for building multi-agent teams, not for measuring a codebase.
- OpenCode: an agent CLI that sentrux can feed structural feedback into.
Tips & Best Practices
- Set a baseline first:
gate --savebefore your agent session is what makesgateafter meaningful. - Write rules for your stack: default constraints may be too permissive or too strict; the rules engine is where your architecture intent belongs.
- Do not skip functional tests: sentrux is structural only, so pair it with a real test suite.
Conclusion
sentrux is the sensor that gives machine-speed coding a machine-speed governor. It does not replace planning or tests, it closes the gap neither of them could. If your codebase is being reshaped daily by agents, one score plus one MCP hook is a cheap way to stop the drift before it becomes a rewrite.
Comments
No comments yet. Be the first to comment!
Related Tools
Serena
github.com/oraios/serena
MCP toolkit that gives coding agents IDE-level semantic code retrieval, editing, refactoring, and debugging through symbol-level tools.
CC Switch
ccswitch.io
Rust/Tauri CLI control center. Rechecked: MIT, 127,783 stars. Free desktop app; not a 126,700-star census.
Goose
block.github.io/goose
Local Apache-2.0 agent from Block / AAIF. Rechecked: 52,895 GitHub stars. Software $0; you pay the LLM. Not a 35k-star / 1,700-MCP census.
Related Insights
Stop Cramming AI Assistants into Chat Boxes: Clawdbot Picked the Wrong Battlefield
Clawdbot is convenient, but putting it inside Slack or Discord was the wrong design choice from day one. Chat tools are not for operating tasks, and AI isn't for chatting.
Seven AI Coding CLIs, Six Months: No Matter How Strong the Model, Work Needs Supervision
Claude Code, Codex, opencode, pi, omp and DeepSeek Harness all have personalities. After six months of deep use I run a division of labor: pi for the fastest cheapest reviews, omp for complex PRs, DeepSeek Harness on V4 Flash for high-frequency low-cost review, and Claude Code, Qoder and Cursor for writing. No matter how strong the model, work needs supervision — ideally from an independent third party.
The Twilight of Low-Code Platforms: Why Claude Agent SDK Will Make Dify History
A deep dive from first principles of large language models on why Claude Agent SDK will replace Dify. Exploring why describing processes in natural language is more aligned with human primitive behavior patterns, and why this is the inevitable choice in the AI era.