Repository navigation
v0.8.0
CsMesh 0.8.0
Graph format is still v14. Existing indexes keep working; no reindex is required, with one
exception noted under doctor.
Upgrade
dotnet tool update -g CsMesh
npm install -g @nrafinia/csmesh
csmesh install # refreshes the generated agent instruction blocks
New: csmesh export
Renders the graph as Mermaid or DOT at three levels:
csmesh export --level project --format mermaid
csmesh export --level namespace --format dot --out docs/namespaces.dot
csmesh export --level neighbourhood "OrderService.Submit" --depth 1 --direction out
- Without
--out, the diagram goes to stdout under the budget (default 1500). If it does
not fit, the command exits 2 and names the remedy:--out, a coarser--level, or a
smaller--depth. - With
--out, the full diagram is written atomically and stdout carries only a short
summary: node and edge counts plus what was withheld. The path must be inside the
repository (exit 64 otherwise). - Node ids are derived from the symbol's identity, so a committed diagram changes only
where the code changed. - Call edges are plain arrows. Other kinds are labelled (
di,iface,override,
mediatr,construct,route,typeuse); write access is dashed. - By default, test code,
TypeUseedges, compiler-synthesized tuple and anonymous types,
and edges inside a single project or namespace are withheld and counted in the summary.
--include-testsand--all-edgesbring the first two back. - Namespace buckets use the namespace of the outermost containing type; nested types never
appear as namespaces. - Available over MCP as the
exporttool, which returns the summary.
Design and trade-offs: docs/adr/0004-csmesh-export.md.
Selecting one overload
When two overloads of a member live in the same project, --project cannot tell them
apart. Exit 3 now prints a selector for each candidate. Pass it back quoted:
csmesh trace "CheckoutService.Apply(int,string)"
The parameter list must match exactly: same arity, same ref/out/in. Short type
names, Int32/int style aliases and nullable value types are accepted. A selector
works wherever a symbol does (trace, impl, blast-radius, context, path,
silence). If no overload matches, silence with the same selector lists the ones that
exist. An unclosed ( is exit 64 with a reminder to quote.
doctor
Two new warnings, each naming the project and the fix:
- Source-generator output not on disk (CS8795). Members a generator would supply stay
unbound. SetEmitCompilerGeneratedFiles=trueand build. - PackageReference to a project in the same solution. That project's types are not
bound through the package. Use aProjectReference.
The generator warning reads diagnostics captured at index time. On a project with many
compiler errors, run csmesh index --full once so the index records it.
Smaller changes
csmesh where <term> --unrankedlists every match in stable order, without entrypoint
ranking.usage.jsonlrecords carryschema_version: 2. Lines without it read as version 1, and
lines written by 0.0.1 in PascalCase are read again instead of being dropped.reviewkeeps its five most recent base caches and drops caches for the same revision
built against an older reference set.- The release workflow passes dispatch inputs through environment variables instead of
interpolating them into scripts.
📦 Installation & Upgrades
Global .NET Tool
dotnet tool update --global CsMeshAutomatic One-Line Install Script
Linux & macOS:
curl -fsSL https://raw.githubusercontent.com/nRafinia/CsMesh/main/install.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/nRafinia/CsMesh/main/install.ps1 | iexQuick Setup for AI Assistants
# Install skills and register MCP server in one command:
csmesh install -g --all
csmesh index --full