sem  by Ataraxy-Labs

Semantic code intelligence CLI

Created 1 month ago
828 stars

Top 42.9% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a semantic version control CLI, offering entity-level diffs, blame, graph, and impact analysis for code across numerous languages. It targets developers and CI/CD pipelines seeking deeper code understanding beyond traditional line-based Git operations, enabling more precise change tracking and analysis.

How It Works

Sem operates by parsing code into Abstract Syntax Trees (ASTs) using tree-sitter, enabling it to identify code entities like functions, classes, and properties. It then performs entity-level diffing on top of Git, employing a three-phase matching strategy (Exact ID, Structural hash, Fuzzy similarity) to accurately detect renames, moves, additions, and deletions, while distinguishing cosmetic changes from logical ones. This approach provides a semantic understanding of code evolution, moving beyond simple line-level modifications.

Quick Start & Requirements

  • Install: Build from source using Rust (cargo install --path sem-cli after cloning) or download pre-compiled binaries from GitHub Releases.
  • Prerequisites: Rust toolchain required for building from source. Works in any Git repository with no additional setup.
  • Docs: GitHub Repository

Highlighted Details

  • Supports 16 programming languages (e.g., TypeScript, Python, Go, Rust, Java, C/C++) with full entity extraction.
  • Parses structured data formats (JSON, YAML, TOML, CSV) and Markdown, falling back to chunk-based diffing for other types.
  • Offers advanced analysis tools: entity dependency graph (sem graph), impact analysis (sem impact), and entity-level blame (sem blame).
  • Provides JSON output for seamless integration with AI agents and CI/CD pipelines.

Maintenance & Community

The provided README does not detail specific contributors, sponsorships, or community channels (e.g., Discord, Slack). The sem-core library is versioned at 0.3, indicating ongoing development.

Licensing & Compatibility

Licensed under MIT OR Apache-2.0, permitting broad use, including commercial applications and linking within closed-source projects.

Limitations & Caveats

For file types not explicitly supported or complex structures within supported types, the tool defaults to less granular chunk-based diffing. The project appears to be under active development, as indicated by the library version.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
14
Issues (30d)
12
Star History
829 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.