Skip to content

Normalize ​

Structural code intelligence for humans and AI agents.

Status: Potentially Mature ●

v0.3.2. Core functionality is solid: the three primitives (view/edit/analyze) ship, with extensive language support (98 languages via tree-sitter), a background indexing daemon (Unix), shadow-git edit tracking, and AI-session analysis. Active development is on the analysis surface (budget, test-ratio, coupling clusters, output formatting). Remaining work is capability expansion rather than foundation building.

Normalize provides tools for understanding, navigating, and modifying code at a structural level (AST, control flow, dependencies) rather than treating code as text.

Key features ​

  • 98 Languages - Tree-sitter grammars for comprehensive language support
  • Structural Editing - AST-based code modifications with fuzzy matching
  • Background Indexing - Daemon maintains symbol/call graph index
  • Shadow Git - Automatic edit history tracking in .normalize/shadow/
  • Session Analysis - Parse and analyze AI agent logs (Claude Code, Gemini CLI, etc.)

Three primitives ​

CommandPurposeExample
viewSee structurenormalize view src/ normalize view MyClass
editModify codenormalize edit src/foo.rs/func --delete
analyzeCompute metricsnormalize analyze --complexity

Crates ​

Core ​

CrateDescription
normalizeCLI binary and main library
normalize-coreFoundational traits (Merge, etc.)
normalize-deriveProcedural macros

Language support ​

CrateDescription
normalize-languages98 languages via tree-sitter grammars
normalize-surface-syntaxSyntax translation between languages (TS ↔ Lua ↔ Python)

Code analysis ​

CrateDescription
normalize-rulesSyntax-based linting with tree-sitter queries
normalize-toolsUnified interface for external tools (oxlint, ruff, prettier, etc.)

Type generation ​

CrateDescription
normalize-typegenPolyglot type/validator generation from schemas (incl. JSON Schema)
normalize-openapiOpenAPI client codegen

Package management ​

CrateDescription
normalize-packagesPackage registry queries for 12+ ecosystems

Agent support ​

CrateDescription
normalize-chat-sessionsSession log parsing (Claude Code, Gemini CLI, OpenAI Codex)
normalize-session-analysisSession cost/usage/model metrics
normalize-cli-parserParse CLI --help output

Quick start ​

bash
git clone https://github.com/rhi-zone/normalize
cd normalize
cargo build --release

# View a file's structure
normalize view src/main.rs

# Analyze codebase health
normalize analyze --health

# Search for a symbol
normalize view SkeletonExtractor

Relationship to Moonlet ​

Normalize focuses on intelligence (code analysis, session parsing, understanding) while Moonlet handles agency/execution (LLM calls, memory, running agents). The projects are intentionally not hard-linked. Normalize can optionally extend Moonlet via a plugin architecture.