neural-shared
Shared utilities for Neural Garage code analysis tools
Overview
neural-shared provides common functionality for the Neural Garage suite of code analysis tools. It includes:
- Parser Module - Tree-sitter-based AST parsing for multiple languages
- Scanner Module - File system traversal with .gitignore support
- Report Module - Generic reporting framework for analysis results
Features
Parser Module
Language-agnostic parsing infrastructure:
use ;
let parser = new?;
let source = "def hello(): pass";
let parsed = parser.parse?;
// Access definitions, usages, and entry points
for def in parsed.definitions
Supported languages:
- Python
- TypeScript
- JavaScript
Scanner Module
Efficient file system scanning:
use Scanner;
let scanner = new;
let files = scanner.scan?; // Respects .gitignore
Features:
- .gitignore support via the
ignorecrate - Parallel file scanning
- Language-specific file filtering
Report Module
Generic reporting framework with Finding trait:
use ;
use Serialize;
let reporter = JsonReporter;
let json = reporter.report?;
Built-in reporters:
JsonReporter- LLM-friendly JSON outputMarkdownReporter- Human-readable markdown
Part of Neural Garage 🧠🔧
This library is part of the Neural Garage monorepo.
Tools using neural-shared:
- bury - Dead code detector
- complexity (coming soon) - Code complexity analyzer
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributing
See the main repository for contribution guidelines.