gitmyhub

Sourcetrail

C++ ★ 16k updated 4y ago ▣ archived

Sourcetrail - free and open-source interactive source explorer

Sourcetrail is an offline desktop tool that builds an interactive visual map of C, C++, Java, or Python codebases, so you can click through call graphs and file dependencies instead of grepping through unfamiliar files.

C++JavaPythonCsetup: moderatecomplexity 3/5

Sourcetrail is a free, open-source tool that helps developers explore and understand source code they didn't write. Instead of reading files line by line in a text editor, you load a project into Sourcetrail and it builds an interactive map of how the code connects — which functions call which, where classes are defined, which files depend on which others. You click around the visual graph to follow the threads, which makes it much easier to get productive on a codebase you've never seen before.

Under the hood it parses your source code, stores the relationships in a database, and renders them as a navigable graph alongside the original source. It runs offline as a desktop application on Windows, macOS and Linux, and supports projects written in C, C++, Java and Python. There is also a separate SDK called SourcetrailDB for people who want to add support for additional languages.

You would reach for it when joining a new team and inheriting a large unfamiliar codebase, when auditing or refactoring legacy code, or when trying to understand an open-source library before contributing to it. One thing to be aware of: the original authors archived the project at the end of 2021, so it is no longer actively maintained by them, though the source remains available. The full README is longer than what was provided and includes detailed build instructions for the C++ codebase.

Where it fits