explaingit

coatisoftware/sourcetrail

16,452C++Audience · developerComplexity · 3/5Setup · moderate

TLDR

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.

Mindmap

mindmap
  root((sourcetrail))
    What it does
      Code visualization
      Call graph navigation
      Dependency mapping
    Supported languages
      C and C++
      Java
      Python
    How it works
      Parses source code
      Stores in database
      Renders visual graph
    Platforms
      Windows
      macOS
      Linux
    Status
      Archived in 2021
      Source still available
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Load an unfamiliar C++ codebase and visually trace which functions call which before making any changes.

USE CASE 2

Audit legacy Java code by mapping class dependencies to find what can safely be refactored or removed.

USE CASE 3

Explore an open-source library's architecture by clicking through its call graph before contributing.

Tech stack

C++JavaPythonC

Getting it running

Difficulty · moderate Time to first run · 30min

Project was archived in 2021 and is no longer maintained, use pre-built binaries rather than building from source to avoid toolchain pain.

In plain English

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.

Copy-paste prompts

Prompt 1
I inherited a large C++ codebase, how do I set up Sourcetrail to index it and start exploring function call graphs?
Prompt 2
Show me how to use SourcetrailDB to add indexing support for a language that Sourcetrail doesn't natively handle.
Prompt 3
I need to refactor a Python module, how do I use Sourcetrail to find every file that imports it before I rename it?
Open on GitHub → Explain another repo

← coatisoftware on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.