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" />
                    
Directory.Packages.props
<PackageReference Include="CodeMemory" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=CodeMemory&version=0.2.0
                    
Install as a Cake Tool

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

License

Apache-2.0

Product 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 45 5/16/2026
0.1.0 50 5/14/2026