Go-first static analysis for Kotlin, Java, and Android. Krit uses tree-sitter for fast source analysis and can call JVM-backed Kotlin Analysis API/FIR helper tools for type-aware checks when a project needs them.
curl -fsSL https://raw.githubusercontent.com/kaeawc/krit/main/install.sh | sh
krit .That's it. Run it in any Kotlin, Java, or Android project and get findings in seconds.
- Broad rule coverage — detekt-compatible, Android Lint-compatible, plus extras for resources, icons, and Gradle
- Auto-fixes at three safety levels — cosmetic, idiomatic, semantic
- SARIF / JSON / Checkstyle / plain output
- LSP + MCP servers — editor diagnostics and AI agent integration
- Cross-file dead code via bloom-filtered indexing across Kotlin, Java, and XML
- Optional JVM analysis through
krit-types/KAA and FIR helper processes for checks that need compiler-grade facts
# Recommended (macOS / Linux): verifies SHA256 and installs to ~/.local/bin
curl -fsSL https://raw.githubusercontent.com/kaeawc/krit/main/install.sh | sh
# Homebrew (macOS / Linux)
brew install --cask kaeawc/tap/krit
# Scoop (Windows)
scoop bucket add krit https://github.com/kaeawc/scoop-krit
scoop install krit
# Go (any platform; needs Go 1.25+ and a C compiler)
go install github.com/kaeawc/krit/cmd/krit@latestSee docs/install.md for the full set of install options and companion tools (krit-lsp, krit-mcp, krit-types, and krit-fir).
krit --init # write starter krit.yml
krit . # analyze current directory
krit --fix . # apply safe fixes- Install — install options and companion binaries
- Quickstart — common commands and workflows
- Configuration —
krit.yml, thresholds, baselines - Rules — rules by category
- Integrations — IDE, CI hooks
- MCP setup — wiring
krit-mcpinto Claude Code, Claude Desktop, Codex
git clone https://github.com/kaeawc/krit.git && cd krit
go build -o krit ./cmd/krit/
go test ./... -count=1Rules live in internal/rules/. Fixtures live in tests/fixtures/. New rules
embed the appropriate rule base and register v2 metadata. See
CONTRIBUTING.md.
See LICENSE.