README.md

March 14, 2026 · View on GitHub

SourceSage hero

SourceSage

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

日本語 | Docs | PyPI | Releases

CI Docs PyPI version License

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