CodeToNeo4j 1.1.16
dotnet tool install --global CodeToNeo4j --version 1.1.16
dotnet new tool-manifest
dotnet tool install --local CodeToNeo4j --version 1.1.16
#tool dotnet:?package=CodeToNeo4j&version=1.1.16
nuke :add-package CodeToNeo4j --version 1.1.16
CodeToNeo4j
CodeToNeo4j is a .NET tool that analyzes .NET solutions and indexes their structure (projects, files, symbols, and documentation) into a Neo4j graph database.
Features
- Multi-File Support: Indexes
.cs,.razor,.xaml,.js,.ts,.tsx,.html,.xml,.json,.css,.csproj, and.dartfiles (configurable via--include). - Structural Ingestion: Indexes Projects, Files, and Symbols (Classes, Methods, Directives, UI Elements).
- Semantic Metadata: Ingests XML Documentation and code comments for every symbol.
- Incremental Indexing: Only process changed files using
--diff-base. When enabled, it also ingests detailed commit history in parallel batches (hashes, authors, dates, and messages) and links them to the modified files. Support for various git range specifications (e.g.,hash1..hash2). - Git Metadata: Tracks file metadata including creation/modification dates, commits, and individual author statistics (contribution counts and dates).
- Administrative Tools: Safely purge data by repository key using
--purge-data. - Accessibility Filtering: Control which members are indexed using
--min-accessibility. - Platform Native Progress: Special progress reporting for GitHub Actions and Azure DevOps.
Installation
Install the tool globally using NuGet:
dotnet tool install --global CodeToNeo4j
Basic Usage
Run the tool by providing Neo4j credentials. When --input is omitted, the tool auto-detects the project type from the current directory:
# .NET solution
codetoneo4j \
--uri bolt://localhost:7687 \
--password your-password
Or specify an explicit input:
codetoneo4j \
--input ./MySolution.sln \
--uri bolt://localhost:7687 \
--password your-password
# Dart project directory
codetoneo4j \
-s ./my-dart-project/ \
--uri bolt://localhost:7687 \
--password your-password
Key Options
| Option | Description |
|---|---|
--input, --sln, -s |
Path to a .sln, .slnx, or .csproj file, or a directory. Auto-detects when omitted. |
--no-key |
Do not use a repository key. Use this if the Neo4j instance is dedicated to this repository. |
--password, -p |
Required. Password for the Neo4j database. |
--uri, -u, --url |
Required. Neo4j connection string (Default: bolt://localhost:7687). |
--user |
Neo4j username (Default: neo4j). |
--database, -db |
Neo4j database name (Default: neo4j). |
--diff-base |
Optional git base ref (e.g., origin/main) for incremental indexing. |
--log-level, -l |
Logging verbosity (Information, Debug, etc.). |
--debug, -d |
Turn on debug logging. |
--verbose, -v |
Turn on trace logging. |
--quiet, -q |
Mute all logging output. |
--skip-dependencies |
Skip NuGet dependency ingestion. |
--min-accessibility |
Minimum accessibility level (e.g., Public, Internal, Private). Default: NotApplicable. |
--batch-size |
Number of symbols to batch before flushing to Neo4j. Default: 500. |
--include, -i |
File extensions to include (Default: all supported, including .dart). |
--purge-data |
Purge data associated with the repository. |
Note: When
--inputis omitted, the tool auto-detects the project type from the current directory (.sln>.slnx>.csproj>pubspec.yaml> files-only). When using--purge-data, the tool asks for confirmation before deletion. If--includeis specified, only matching file extensions are purged.--skip-dependenciesand--min-accessibilityare not allowed with this switch. Only one of--log-level,--debug,--verbose, or--quietcan be used.
Purge examples
- Purge by derived repository key:
codetoneo4j --input ./MySolution.sln --password your-pass --purge-data - Purge all CodeToNeo4j data (when using --no-key):
codetoneo4j --no-key --password your-pass --purge-data - Purge only certain file types:
codetoneo4j --input ./MySolution.sln --password your-pass --purge-data --include .cs --include .razor
Prerequisites
- .NET 8, 9, or 10 SDK must be installed on the machine.
- Neo4j 5.0+ database.
- Git (if using
--diff-base). - Dart SDK (optional) — required only for analyzing Dart projects. Install from dart.dev/get-dart. The
dartexecutable must be available on yourPATH. If not found,.dartfiles are skipped with a warning.
For more detailed documentation, visit the GitHub Repository.
CI/CD Integration
GitHub Actions
You can install and run CodeToNeo4j directly in your GitHub workflows:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install CodeToNeo4j
run: dotnet tool install --global CodeToNeo4j
- name: Run CodeToNeo4j
run: |
codetoneo4j \
--input ./MySolution.sln \
--uri ${{ secrets.NEO4J_URL }} \
--password ${{ secrets.NEO4J_PASS }} \
--diff-base ${{ github.event.before }}
Azure DevOps
Use the .NET Core task to install and run the tool:
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
useGlobalJson: true
- script: dotnet tool install --global CodeToNeo4j
displayName: 'Install CodeToNeo4j'
- script: |
codetoneo4j \
--input ./MySolution.sln \
--uri $(NEO4J_URL) \
--password $(NEO4J_PASS) \
--diff-base $(System.PullRequest.SourceCommitId)
displayName: 'Run CodeToNeo4j'
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.16 | 95 | 3/21/2026 |
| 1.1.15 | 80 | 3/21/2026 |
| 1.1.14 | 88 | 3/19/2026 |
| 1.1.13 | 124 | 3/16/2026 |
| 1.1.12 | 111 | 3/16/2026 |
| 1.1.11 | 108 | 3/15/2026 |
| 1.1.10 | 117 | 3/15/2026 |
| 1.1.9 | 104 | 3/15/2026 |
| 1.1.8 | 109 | 3/15/2026 |
| 1.1.7 | 104 | 3/15/2026 |
| 1.1.5 | 102 | 3/10/2026 |
| 1.1.4 | 87 | 3/9/2026 |
| 1.1.3 | 82 | 3/9/2026 |
| 1.1.2 | 82 | 3/9/2026 |
| 1.1.1 | 86 | 3/9/2026 |