← Back to directory
S

Sem

Community
Semantic version control on top of Git, giving AI coding agents entity-level code intelligence
GitHub source repository ↗
★ 3.3k Stars Category · Dev Tools Very popular
69FMRS · C

Sem is a semantic version control tool by Ataraxy Labs built on top of Git, providing entity-level diffs, impact analysis, blame, and context via tree-sitter, with support for 32 languages and several structured data formats. Its MCP server exposes 8 entity-level tools over stdio so coding agents can get deterministic dependency-graph answers without reading whole files, saving tokens. It suits developers using AI coding agents and teams needing cross-file impact analysis, but requires the sem binary to be installed and is not aimed at non-MCP clients or browser, cloud-storage, and database scenarios.

Reliability
11/20
Security and permissions
14/20
Maintenance
13/20
Documentation
17/20
Setup experience
14/20
Read the FMRS scoring method →

Sem is a semantic version control tool built on top of Git by Ataraxy Labs. It parses code with tree-sitter, extracts every function, method, and class as an entity, and diffs at the entity level instead of lines, so you see "function blahh was modified" instead of "lines x-y changed." It supports 32 programming languages plus structured data formats such as JSON, YAML, TOML, EDN, CSV, Markdown, and LaTeX, and offers rename and move detection, structural hashing that distinguishes cosmetic changes (whitespace, comments) from real logic changes, and fuzzy similarity matching. sem mcp starts a Model Context Protocol server over stdin/stdout that a coding agent launches in the background, exposing 8 entity-level tools: sem_entities, sem_diff, sem_blame, sem_impact, sem_log, sem_context, sem_find, and sem_grep. The server uses the stdio transport and ships in the same binary as every other command, so no separate install is needed. Local use is always free and requires no login; cloud queries are opt-in per repo, and when not logged in or when the cloud is unreachable sem computes locally and prints the exact same output.

Tools

sem_entities
List all entities under a file or directory path.
sem_diff
Entity-level diff with rename detection, structural hashing, and word-level inline highlights.
sem_blame
Entity-level blame showing who last modified each function, class, or method.
sem_impact
Cross-file dependency graph showing what breaks if an entity changes.
sem_log
Track how a single entity evolved through git history.
sem_context
Token-budgeted context for LLMs: the entity, its dependencies, and its dependents.
sem_find
Find where an entity is defined.
sem_grep
Text search across source files with rg-compatible file:line:text output.

Setup

  1. Install the sem CLI: use the install script (curl -fsSL https://raw.githubusercontent.com/Ataraxy-Labs/sem/main/install.sh | sh), or install via Homebrew (brew install sem-cli), winget (winget install AtaraxyLabs.sem), Scoop (scoop install sem), npm (npm install --save-dev @ataraxy-labs/sem), cargo (cargo install sem-cli), or Docker.
  2. For a client with an mcpServers config (such as Cursor or Claude Desktop), add a server entry with command "sem" and args ["mcp"].
  3. For Claude Code, you can run claude mcp add sem -- sem mcp.
  4. If sem isn't on the agent's PATH, use the absolute path to the binary in the config.
  5. sem mcp ships in the same binary as every other command; no separate install is needed.
claude_desktop_config.json
{
  "mcpServers": {
    "sem": {
      "command": "sem",
      "args": ["mcp"]
    }
  }
}

Fit and risk

Best for

  • Developers using AI coding agents who want to reduce token consumption
  • Teams that need cross-file impact analysis and entity-level diffs
  • Projects working in Git repos that want deterministic dependency-graph answers instead of grep results

Not for

  • Users who do not use an MCP client
  • Scenarios needing browser automation, cloud storage, or database access
  • Users wanting a zero-install experience: running sem mcp requires the sem binary to be installed first

Required permissions

  • Read local code repository files
  • Store a SQLite entity cache and query index on the local machine (by default under the OS cache directory; overridable with SEM_CACHE_DIR)
  • Optional: log in to sem cloud via the GitHub device flow with sem login (only needed for cloud acceleration)

Risks and side effects

  • The sem binary name conflicts with the sem binary shipped by GNU Parallel; run sem --version to check which one you are using
  • The entity cache is stored outside the repository by default under the OS cache directory, and setting SEM_CACHE_DIR can change its location
  • Cloud queries are opt-in per repo; logging in does not by itself upload a repo or send a query, but enabling cloud queries does send data to sem cloud
  • Local telemetry records command names on your own machine only and uploads nothing in that mode; opting in uploads counts, and SEM_NO_TELEMETRY=1 or DO_NOT_TRACK=1 forces the record-nothing behavior
  • Agents issue read queries against repository code, so ensure their working directory and permission scope match your expectations

Troubleshooting

  1. Run sem --version to confirm you are invoking Ataraxy Labs' sem rather than the GNU Parallel binary of the same name; on a conflict, set an alias or adjust PATH order
  2. If the agent reports it cannot find sem, use the absolute path to the sem binary in the MCP config
  3. With npm/bun installs the binary lives in node_modules/.bin/sem and can be invoked via npx sem or bunx sem; with Bun, run bun pm trust @ataraxy-labs/sem so the postinstall script can download the binary
  4. The first find/callers/refs/grep call in a repo builds the index and later calls read it directly; if caching looks wrong, check the SEM_CACHE_DIR setting
  5. If the cloud is unreachable or you are not logged in, sem computes locally and prints the same output, so no extra action is needed

Use cases

Let a coding agent ask "what breaks if I change submitOrder" before editing code (sem_impact)
Request just the context needed to refactor a function, returning its source plus its callers and callees (sem_context)
Get entity-level code changes without reading whole files, saving tokens
Analyze cross-file dependencies to assess the blast radius of a change
Run entity-level blame and history tracking inside AI agent workflows

Supported clients

Claude CodeFull support
CursorFull support
Claude DesktopFull support