Skip to content

SourceSage

Repository analysis CLI that turns source trees into AI-friendly Markdown documentation.

Install

$pip install sourcesage

Install command taken from the project's README or registry entry. Always review code before running it.

SourceSage

Repository analysis CLI that turns source trees into AI-friendly Markdown documentation.

日本語 | Docs | PyPI | Releases

[!IMPORTANT] Release notes, README text, and other repository-facing materials are often produced with SourceSage and other AI-assisted tools, then reviewed and refined by the maintainers.

Why SourceSage

  • Generate repository documentation that an assistant can read immediately.
  • Combine project structure, Git context, file statistics, and file excerpts in one Markdown artifact.
  • Work against the current checkout or any other local repository through --repo.

Install And Run

Try it once with uvx

uvx --refresh sourcesage --help
uvx --refresh sourcesage --repo /path/to/repository

Install it as a tool

uv tool install sourcesage
sourcesage --help
sourcesage --repo /path/to/repository

Install it with pip

pip install sourcesage
sourcesage --help

Run from source

git clone https://github.com/Sunwood-ai-labs/SourceSage.git
cd SourceSage
uv sync
uv run sage --help
uv run sage --repo .

Common Commands

uv run sage --repo .
uv run sage --repo . --lite
uv run sage --repo /path/to/repository -l ja
uv run sage --repo /path/to/repository -o ./out
uv run sage --repo . --ignore-file .SourceSageignore

--lite keeps the tree, Git information, statistics, and root README files while skipping the full file-by-file excerpts section.

--diff is still available for legacy compatibility, but it is intentionally deprecated and no longer the primary workflow.

Output

Primary artifact:

.SourceSageAssets/
  Repository_summary.md

SourceSage merges .gitignore and .SourceSageignore. If .SourceSageignore does not exist yet, it creates a default template automatically before analysis starts.

For first-pass repository exploration, --lite is safer when ignore rules are not tuned yet because it avoids expanding every file into the summary.

Documentation

Project Standards

Development

uv sync
uv run pytest -q
cd docs
npm ci
npm run docs:build

Related Project

Similar plugs

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…

Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.

The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…