CodeMemory 0.2.0
dotnet add package CodeMemory --version 0.2.0
NuGet\Install-Package CodeMemory -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeMemory" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeMemory" Version="0.2.0" />
<PackageReference Include="CodeMemory" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeMemory --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeMemory, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeMemory@0.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeMemory&version=0.2.0
#tool nuget:?package=CodeMemory&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodeMemory
Repository intelligence substrate — a persistent, queryable semantic memory layer for codebases, exposed via the Model Context Protocol (MCP).
Build architecture-aware AI agents that understand symbols, dependencies, semantics, and git history — without coupling to a specific database, LLM, or embedding provider.
Installation
dotnet add package CodeMemory
What You Get
- Semantic code search — natural language queries over indexed code via
IEmbeddingGenerator<string, Embedding<float>> - Dependency graph — upstream/downstream symbol relationships (calls, references, inheritance, implementation)
- Architecture overview — component structure, language breakdown, file and symbol counts
- Impact analysis — change impact with downstream dependencies, affected files, components, and test coverage
- Component clustering — logical groupings based on inter-component coupling density
- Symbol history — per-symbol git commit history with authors and timestamps
- Hotspot detection — most frequently changed files ranked by commit count
- Edit context — comprehensive context for a symbol: source code, dependency chains, related symbols, and test coverage
- SQL queries — compose arbitrary filters across indexed fields using SQL (
SELECT,WHERE,ORDER BY,GROUP BY,HAVING, aggregates, vector search) — parsed by SqlParserCS, executed as LINQ over InMemoryVectorStore - Multi-repo support — per-repository storage isolation via
ServiceRegistry+IRepoContextAccessor - Pluggable storage — in-memory (
InMemoryVectorStore, default, zero-dependency) or SQLite with vector extensions (Microsoft.SemanticKernel.Connectors.SqliteVec)
Dependency Injection
// Minimal setup — in-memory storage, offline n-gram embeddings
services.AddSingleton<IEmbeddingGenerator<string, Embedding<float>>, NgramEmbeddingGenerator>();
services.AddKeyedSingleton("default", (sp, _) => /* configure IStorageService */);
services.AddSingleton<DependencyGraphService>();
services.AddSingleton<ArchitectureService>();
services.AddSingleton<ComponentClusteringService>();
services.AddSingleton<GitHistoryService>();
services.AddSingleton<SemanticSearchService>();
services.AddSingleton<SqlQueryService>();
services.AddSingleton<CollectionRegistry>();
Key Dependencies
| Package | Role |
|---|---|
| Memori | NgramEmbeddingGenerator for offline embeddings + InMemoryVectorStore — no API keys, no model downloads |
| SqlParserCS | SQL parsing (SELECT, WHERE, ORDER BY, GROUP BY, HAVING, aggregates) |
| Microsoft.Extensions.AI.Abstractions | IEmbeddingGenerator, IChatClient abstractions |
| Microsoft.Extensions.VectorData.Abstractions | Vector store abstractions |
| ModelContextProtocol | MCP server types and tool attributes |
| Microsoft.CodeAnalysis.CSharp | Roslyn-based C# parsing |
| TreeSitter.DotNet | Multi-language parsing (TS, JS, Java) — optional |
| System.Numerics.Tensors | TensorPrimitives.Norm for embedding normalization |
Targets
- Repository indexing, semantic analysis, and MCP tool exposure
- AI coding agents and IDE assistants needing architecture-aware context
- Multi-repo deployments with per-repository storage isolation
Learn More
- Full documentation and architecture: ARCHITECTURE.md
- AI agent engineering guidelines: AGENTS.md
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Memori (>= 0.2.2)
- Microsoft.CodeAnalysis.CSharp (>= 5.3.0)
- Microsoft.Extensions.AI.Abstractions (>= 10.6.0)
- Microsoft.Extensions.VectorData.Abstractions (>= 10.1.0)
- ModelContextProtocol (>= 1.3.0)
- SqlParserCS (>= 0.6.5)
- System.Numerics.Tensors (>= 10.0.8)
- TreeSitter.DotNet (>= 1.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.