sem Plugin
Semantic version control built on Git. Entity-level diff, blame, graph, and impact analysis for code.
Commands
Diff
sem diff run— Entity-level diff with rename detectionsem diff run --format json— JSON output for CI/AI
Analysis
sem impact analyze— Cross-file dependency graphsem blame run— Entity-level blamesem log show— Track entity through history
Context
sem entities list— List all entities in a filesem context generate— Token-budgeted LLM context
Usage Examples
# Semantic diff of working changes
sem diff
# JSON output for AI agents
sem diff --format json
# Impact analysis - what breaks if this changes
sem impact authenticateUser
# Entity blame
sem blame src/auth.ts --json
# Track entity evolution
sem log validateToken -v
# LLM context within token budget
sem context authenticateUser --budget 4000
Installation
brew install sem-cli
Key Features
- Entity-level diff (functions, classes, methods) instead of lines
- 23 languages via tree-sitter
- Rename and move detection
- Cross-file dependency analysis
- Token-budgeted LLM context generation
- Can replace
git diffwithsem setup