Raysense vs the alternatives
Raysense is one of several tools that try to make codebase health legible. The four that come up most in conversations about "how is this different from..." are SonarQube, CodeScene, NDepend, and Sourcegraph. They overlap with Raysense in places and target completely different problems in others. This page is an honest read on where each tool wins and where it does not.
Where this page calls a competitor's strength its strength, that is a real strength. Where it calls a Raysense gap a gap, that is a real gap. The goal is not to win the table - it is to be the page you would still trust after you tried both products.
At a glance
| Capability | Raysense | SonarQube | CodeScene | NDepend | Sourcegraph |
|---|---|---|---|---|---|
| Primary scope | Graph-level architecture grading + agent memory | Token-level quality (lints, smells, coverage) | Behavioural code analysis (hotspots, ownership) | Static .NET architecture analysis | Code search and navigation |
| License | MIT (open source) | LGPL community + commercial | Commercial | Commercial | Apache 2.0 OSS + commercial |
| Aggregate 0-to-100 architecture score | Yes (six dimensions) | Quality gate (pass/fail) | Code Health 1-10 (per-file) | Quality gates, no aggregate score | No |
| Stdio MCP server (AI agent native) | Yes | No | No | No | Cody (separate product) |
| CI gate | raysense --check exit code | Quality Gate API | CI plugins | Build server integration | Code Insights (separate) |
| Local-only (no server) | Yes (single binary) | Server + database required | Server required | Visual Studio plugin or console | Server required |
| Languages with full AST | 11 + Rayfall (12) | 30+ | 30+ | .NET only | 20+ |
| Languages with at least imports/functions | 69 | 30+ | 30+ | .NET only | 20+ |
| Query language for ad-hoc questions | Rayfall (Datalog + .graph.*) | No | SQL-like (CodeScene Query) | CQLinq | Sourcegraph search |
| Architectural rules as policy code | .rfl files in repo | Java rules SDK | UI configuration | CQLinq files | No |
| Live treemap dashboard | localhost:7000 | Server UI | Server UI | Visual Studio panel | Code Insights |
| Telemetry / phone-home | None | Configurable | Configurable | Configurable | Configurable |
| Per-file edit-risk score | Yes (churn x complexity x bus-factor x tests) | No | Hotspots | No | No |
| Mature ecosystem (years in market) | Brand new (2026) | 15+ years | 10+ years | 15+ years | 10+ years |
vs SonarQube
SonarQube is the dominant token-level quality scanner. It runs hundreds of rules per language inside individual files: dead code, copy-paste, complexity, security smells, code coverage. Its strength is breadth - 30+ languages with deep, vendor-curated rule sets and 15 years of ecosystem maturity. If you want to know "how clean is this single file", Sonar is the answer.
What SonarQube does not do: read the dependency graph as a graph, score the codebase as one shape, or expose itself as an MCP server an agent can consult between edits. The Quality Gate is binary (pass/fail); there is no aggregate "is the codebase getting better-shaped". The product is a server: it needs a database, a service to run, and ongoing operations.
Pick SonarQube if: you want token-level smells across many languages, a server-hosted dashboard for many teams, and you do not need agent integration. Pick Raysense if: you want the structural shape (graph-level), a single binary in CI, and a way for AI agents to read structural state before every edit.
vs CodeScene
CodeScene reads the same git history Raysense reads, but with a different emphasis: behavioural code analysis. Hotspots (files where most of the churn lands), knowledge maps (who owns what), temporal coupling (files that move together). Its Code Health score is per-file (1-10) and is the closest competitor to Raysense's per-file edit-risk number. CodeScene's strength is the depth of the behavioural side - hotspot ranking, knowledge loss detection, and the visualisations are best-in-class.
What CodeScene does not do: produce a single aggregate architecture score, expose the data to AI coding agents over MCP, or run as a single local binary. It is a hosted product (or self-hosted server), with UI-driven configuration rather than committed policy files.
Pick CodeScene if: behavioural analysis is the primary use case, the team is large enough to operate the server, and you want the polished visualisations. Pick Raysense if: you want one number for the whole repo, your rules to live as code in the repo, and an MCP integration for the agent.
vs NDepend
NDepend is the long-standing .NET architecture analyzer. Its query language (CQLinq) is one of the most powerful "rules as code" surfaces in the static-analysis space - you can write architectural constraints in a typed query language and have them enforced at build time. The dependency-structure matrix and abstractness/instability metrics it pioneered (Robert Martin's metrics) are conceptually similar to several Raysense dimensions.
What NDepend does not do: cover languages other than .NET, run as an open-source single binary, or speak MCP. The pricing and tooling are oriented to Visual Studio shops; the product is excellent for that audience and not designed for any other.
Pick NDepend if: you are .NET-only and want the most mature architecture-rules-as-code experience available. Pick Raysense if: your repo is polyglot, you want open source, or you need MCP integration.
vs Sourcegraph
Sourcegraph is primarily a code search and navigation product, with a code intelligence layer (Code Insights) and an AI side-product (Cody) that answers questions about a codebase. It excels at "find every reference to this function across 200 repos" and "show me the diff history for this file across the org". The graph it builds is a symbol graph, used for navigation more than for grading.
What Sourcegraph does not do: produce an architecture grade, expose blast-radius and cycle data over MCP from a single binary, or grade the structural shape of a single repo. Cody is closer to the AI integration story but is a separate commercial product, not an MCP server you can drop into any client.
Pick Sourcegraph if: you want enterprise-scale code search and navigation across many repos, with an AI assistant on top. Pick Raysense if: you want a structural-health signal for one repo, MCP-native, single binary, free.
Where Raysense is honestly weaker
Raysense was published to crates.io for the first time in late April 2026. The competitors above have 10-15 years of vendor-curated rules, integrations, and certifications. A few honest gaps to know about:
- Maturity. Single maintainer, single Rust crate, four days old at the time of writing. No SOC 2, no enterprise support contract, no 24/7 phone line. The license is MIT, the source is on GitHub, and the issue tracker is the support surface.
- Rule library breadth. Token-level smells (dead code, naming, simple lints) are not the focus. If you need 600 prebuilt rules out of the box for Java idioms, SonarQube wins.
- UI polish. The treemap dashboard is functional, not designed-for-marketing. CodeScene and Sourcegraph have invested far more in visualisation engineering.
- Hosted offering. There is no hosted Raysense. Run the binary in your CI step, or point your agent at the MCP server. If you need a multi-tenant dashboard for 50 teams, the others have it; Raysense does not.
Where Raysense is honestly stronger
- MCP-native. The same scan results back the CLI, the dashboard, and the agent's tool calls. The agent reads structural state from the running stdio server, not from a screenshot or a third-party API. None of the four competitors ship an MCP server today.
- Single binary, no server.
cargo install raysenseand you have CI gate, dashboard, and agent integration. No database, no separate service, no licence dance. - Aggregate architecture score. Six structural dimensions, A through F, weighted into one 0-to-100 number. The number moves with structure, not with cosmetics. SonarQube's Quality Gate is binary; CodeScene's score is per-file; NDepend has gates but no aggregate.
- Rules as code in the repo. A
.rflpolicy lives next to the code it governs, gets reviewed in pull requests, and runs on the same query substrate as ad-hoc queries. NDepend's CQLinq is the closest analog; the others bury rules in a UI. - Open source, MIT. No commercial dance, no per-seat licensing, no audit-firewall to navigate before adoption. Read the source, fix the bug, send a PR.
Bottom line
Raysense is not a SonarQube replacement; it is the structural layer that does not exist anywhere else as an open-source single binary with MCP support. Several teams will end up running both: SonarQube for token-level quality, Raysense for graph-level shape and the agent surface. The same is true for CodeScene's behavioural depth - the two are complementary, not substitutes.
If the question is "we have AI agents committing dozens of edits an hour and a diff-only review surface, what reads structure for us and the agent simultaneously", Raysense is the answer because that is the question the project was built to answer.