Skip to content

Sephera

Sephera is a Rust workspace for codebase inspection. It currently focuses on four practical workflows:

  • loc for fast, language-aware line counting
  • context for deterministic Markdown or JSON context packs with AST compression
  • graph for multi-language dependency graph analysis
  • mcp for built-in MCP server agent integration

The current docs reflect the v0.5.x release line.

The project is intentionally narrow in scope. It does not try to be an AI agent framework or a hosted service. The goal is to provide reliable local analysis primitives that fit naturally into review, debugging, and prompting workflows.

Modern code workflows need two kinds of signals:

  • trustworthy repository metrics
  • focused context bundles that are small enough to fit inside real prompt budgets

Sephera provides both without requiring a server, a browser extension, or a provider-specific integration.

  • Fast loc analysis with per-language totals, table output, and elapsed-time reporting
  • Deterministic context packs with focus-path prioritization, Git diff awareness, and approximate token budgeting
  • Tree-sitter AST compression reducing token usage by 50-70% for 8 supported languages
  • Dependency graph generation with cycle detection and exports to Markdown, JSON, XML, and DOT
  • Built-in MCP server for direct integration with AI agents like Claude Desktop
  • URL mode for direct analysis of cloneable repo URLs and GitHub/GitLab tree URLs
  • Repo-level defaults and named profiles through .sephera.toml
  • Export to Markdown for human copy-paste workflows and JSON for automation
  • Generated language metadata sourced from config/languages.yml
  • Byte-oriented scanning with newline portability across LF, CRLF, and classic CR
  • Benchmark and fuzzing infrastructure to keep behavior stable over time

These examples assume sephera is installed and available on your PATH.

Count lines of code in the current repository:

Terminal window
sephera loc --path .

Analyze a remote repository directly:

Terminal window
sephera loc --url https://github.com/Reim-developer/Sephera

Build a focused context pack and export it to JSON:

Terminal window
sephera context --path . --focus crates/sephera_core --format json --output reports/context.json

Compress context excerpts to reduce LLM token usage:

Terminal window
sephera context --path . --compress signatures

Start the MCP server to let AI agents call Sephera directly:

Terminal window
sephera mcp

Build a review pack from recent Git changes:

Terminal window
sephera context --path . --diff HEAD~1 --budget 32k

Run the same review flow on a remote checkout:

Terminal window
sephera context --url https://github.com/Reim-developer/Sephera --ref master --diff HEAD~1 --budget 32k

List configured profiles for the current repository:

Terminal window
sephera context --path . --list-profiles
sephera loc language-aware repository totals
Terminal demo of sephera loc rendering a table report.
sephera context deterministic context bundles for people, tools, and Git review flows
Terminal demo of sephera context building a structured context pack.

The demos above are illustrative captures of the CLI workflows described throughout the docs.