Fast code intelligence CLI. Structural awareness of codebases through AST-based analysis.
# From source
cargo install --path crates/normalize
# Or build locally
cargo build --release
./target/release/normalize --help
# With Nix
nix develop
cargo build --release# View project structure
normalize view
# View a specific file's symbols
normalize view src/main.rs
# View a specific symbol
normalize view src/main.rs/main
# Analyze codebase health
normalize analyze health
# Search for text patterns
normalize grep "TODO"
# Run linters
normalize tools lintView directories, files, and symbols as a unified tree:
normalize view # Current directory tree
normalize view src/ # Specific directory
normalize view src/main.rs # File with symbols
normalize view src/main.rs/MyClass # Specific symbol
normalize view src/main.rs -d 2 # Depth 2 (show nested symbols)
normalize view --full src/foo.rs/bar # Full source code of symbol
normalize view --deps src/foo.rs # Show imports/exports
normalize view --focus src/foo.rs # Resolve and show imported symbolsUnified analysis with subcommands:
normalize analyze health # Codebase metrics and health score
normalize analyze complexity # Cyclomatic complexity report
normalize analyze length # Function length analysis
normalize analyze security # Security vulnerability scan
normalize analyze hotspots # Git history analysis (churn + complexity)
normalize analyze duplicates # Detect code clones
normalize analyze duplicate-types # Detect duplicate type definitions
normalize analyze graph # Dependency graph analysis
normalize analyze docs # Documentation coverage
normalize analyze all # Run all analysis passesUnified interface to linters, formatters, and type checkers:
normalize tools lint # Auto-detect and run relevant tools
normalize tools lint --fix # Auto-fix where possible
normalize tools lint --sarif # Output in SARIF format
normalize tools lint --category type # Only type checkers
normalize tools lint --tools ruff,clippy # Specific tools
normalize tools lint --list # List available tools
normalize tools test # Run native test runnersSupported tools: ruff, clippy, rustfmt, oxlint, biome, prettier, tsc, mypy, pyright, eslint, gofmt, go-vet, deno-check, and more.
Fast ripgrep-based search:
normalize grep "pattern" # Search all files
normalize grep "TODO" --only "*.rs" # Filter by extension
normalize grep "fn main" -i # Case insensitive
normalize grep "error" --limit 50 # Limit resultsQuery package registries and analyze dependencies:
normalize package info tokio # Package info from registry
normalize package list # List project dependencies
normalize package tree # Dependency tree
normalize package outdated # Check for updates
normalize package why tokio # Why is this dependency included?
normalize package audit # Security vulnerability scanSupports: Cargo, npm, pip, Go modules, Bundler, Composer, Hex, Maven, NuGet, Nix, Conan.
Run normalize as a server for integration:
normalize serve mcp # MCP server for LLM tools (stdio)
normalize serve http --port 8080 # REST API server
normalize serve lsp # LSP server for IDEsEdit code by targeting symbols structurally:
normalize edit src/main.rs/old_fn delete # Delete a symbol
normalize edit src/main.rs/Foo replace < new.rs # Replace symbol content
normalize edit src/main.rs/bar insert --after # Insert after symbol
normalize edit undo # Undo last edit
normalize edit delete --dry-run src/main.rs/Foo # Preview without applyingView the history of structural edits:
normalize edit history # Recent edit history
normalize edit undo # Undo last edit
normalize edit redo # Redo last undone edit
normalize edit goto <ref> # Jump to a shadow commitShow hierarchical .context.md files:
normalize context # Context for current directory
normalize context src/ # Context for specific path
normalize context --list # Show file paths onlyManage and run syntax + fact rules:
normalize rules list # List all rules
normalize rules run # Run all rules
normalize rules setup # Interactive rule configuration
normalize rules add <url> # Add a rule from URL
normalize rules enable <id> # Enable a rule
normalize rules tags # List rule tagsTranslate code between programming languages:
normalize translate src/main.ts --to python # TypeScript to Python
normalize translate src/lib.py --to lua # Python to Lua
normalize translate - --from ts --to lua # Stdin with explicit langsManage the structural index (symbols, imports, calls):
normalize structure stats # Index stats
normalize structure rebuild # Rebuild the index
normalize structure files # List indexed filesAnalyze Claude Code and other agent session logs:
normalize sessions list # List recent sessions
normalize sessions show <id> # Show session details
normalize sessions stats # Aggregate statistics
normalize sessions plans # View agent plansCreate .normalize/config.toml:
[structure]
# enabled = true
[view]
depth = 1
line_numbers = false
[filter.aliases]
tests = ["**/test_*.py", "**/*_test.go"]Add custom tools in .normalize/tools.toml:
[[tools]]
name = "my-linter"
command = ["my-linter", "--format", "json"]
category = "linter"
languages = ["python"]
output_format = "sarif"Most commands support --json for structured output:
normalize view src/main.rs --json
normalize analyze health --json
normalize tools lint --jsonNormalize supports 98 languages via tree-sitter grammars including: Python, Rust, TypeScript, JavaScript, Go, Java, C, C++, Ruby, PHP, Swift, Kotlin, Scala, and many more.
# Build
cargo build
# Test
cargo test
# Build grammars (required for tests)
cargo xtask build-grammars
# Install locally
cargo install --path crates/normalize- Rust toolchain (1.75+)
bunornpm- required to build the sessions web viewer SPA
If using Nix: nix develop provides all dependencies.
MIT