Skip to main content

Your repos already remember everything. Now they can tell your AI.

Project description

soma-cli

soma is a CLI tool that scans git repos on-demand and generates compact LLM context summaries — so you never re-explain your project to an AI assistant.

soma context myproject
# myproject — Context Summary (generated 2026-06-11 by SOMA)

**Branch:** main | **Last active:** 2h ago
**Activity (7d):** 8 commits, 15 files changed
**Confidence:** high

**What this is:** A CLI tool that scans git repos and generates LLM context summaries.

## Recent work
- feat: add watch mode (+18/-2) (2h ago)
- fix: correct token budget truncation order (+6/-4) (4h ago)

## Files in motion
- src/context.py (2h ago)
- tests/test_context.py (2h ago)

## Possible blockers
- None detected

## Suggested focus
Continue recent work in `src/` — last commit: "feat: add watch mode"

Paste this into any LLM session. Your AI already knows the project.


Install

pip install soma-cli
soma init        # scan ~/ for git repos, register them
soma status      # see all projects sorted by last activity
soma context <project>   # generate context summary

Commands

Command What it does
soma init Scan home directory for git repos, write ~/.soma/projects.toml
soma status All-projects table sorted by recency (branch, commits, files)
soma status <project> Deep view: recent commits, files changed, warnings
soma history Timestamped activity log, last 7 days
soma history --days 30 --markdown Export to markdown for standups/notes
soma context <project> Generate LLM-ready context summary (with diff stats per commit)
soma context <project> --watch Keep CLAUDE.md in the repo up-to-date on file changes
soma forget <project> Remove a project from the registry (does not delete files)
soma validate Health check: token budget, format, secrets across all projects
soma --version Show installed version
soma --update Upgrade soma-cli via pip
soma --uninstall Interactive uninstall (optionally purges ~/.soma/)

What soma does NOT do

  • No daemon. Scanning is on-demand only. Nothing runs in the background.
  • No LLM calls. Output is pure heuristics + templates — no AI, no API key, no cost.
  • No database. State lives in ~/.soma/projects.toml (TOML, plain text).
  • No network. Fully offline. Your code never leaves your machine.
  • No shell capture. soma never runs your code or reads environment variables.
  • No secrets. Output is redacted for api_key=, token=, sk-* patterns.

How it works

soma reads two sources:

  1. git log — commits, branches, changed files, diff stats (via gitpython)
  2. File mtimes — catches uncommitted edits git doesn't see

No event logging, no process watching. The filesystem is the daemon.


Context format

Every soma context output follows a fixed schema an LLM can parse reliably:

  • Branch + last active + activity — orientation line
  • What this is — extracted from README or pyproject.toml description
  • Recent work — last 5 commits with (+insertions/-deletions) diff stats
  • Files in motion — up to 8 files sorted by recency (omits files untouched >30d)
  • Possible blockers — stale branch, TODO/FIXME in active files, fix storms
  • Suggested focus — derived from most recent activity cluster

Target: 350–600 tokens. Active repos typically land at 340–400.


Configuration

Projects registry: ~/.soma/projects.toml — auto-written by soma init.

soma never writes inside your repos except CLAUDE.md when --watch is explicitly used. It will refuse to overwrite a CLAUDE.md it didn't generate (your hand-written agent contract is safe).


Requirements

  • Python 3.12+
  • git

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soma_cli-0.2.0.tar.gz (78.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soma_cli-0.2.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file soma_cli-0.2.0.tar.gz.

File metadata

  • Download URL: soma_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 78.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for soma_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 663a7a86e19b4b6fb0db96c5fb86fe64830437667b1d97f39e1b46a527675867
MD5 4c89782999a1fa0b56c4e8f55820c855
BLAKE2b-256 bf63681eb8f399f515ba1d83ceb8fc3262fec7039dfd7f5d329e25032e7443fa

See more details on using hashes here.

File details

Details for the file soma_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: soma_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for soma_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d964a5f7f06f10e5887aae92032189ecc3a2989a900def6ac9a4dcae41e2d0f3
MD5 be164a57d2c2a34ce711ded8784ae8b4
BLAKE2b-256 3b08bcf8cf9a75926656420ad49716af2c3556449cc75b880e549a53f4a882dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page