Skip to main content
Recursivist logo

Recursivist

See the shape of any codebase in one command

PyPI Python Tests Coverage Quality Gate Status License: MIT Docs

Recursivist draws any directory as a color-coded tree and annotates it with lines of code, file sizes, modification times, and Git status. It can filter that tree, compare it with another, and export it in six formats, for a local folder or for a GitHub repository you haven't cloned.

Terminal output of recursivist visualize --sort-by-loc --size --git-status --exclude .git: the tree of my-project, where every file and folder shows its lines of code and size, and two files carry Git status markers

Each file type gets its own color. Folder figures are totals for the files beneath them, and [M] and [U] mark modified and untracked files.

Installation

pip install recursivist

Prefer an isolated install? pipx install recursivist and uv tool install recursivist both work. Each installs the recursivist command and its shorter alias, rcv.

Features

  • File statistics: lines of code, size, and modification time for every file, rolled up per folder. Sort by any of them, or just display them.
  • Git status: modified, added, deleted, and untracked files are marked in the tree and can be sorted first.
  • Filtering: exclude directories and extensions, match file names by glob or regex, and apply .gitignore-style files at every level of the tree.
  • GitHub repositories: pass a URL wherever a path is accepted, pinned to a branch, tag, or subfolder if you like. Private repositories work with GITHUB_TOKEN set.
  • Comparison: two trees side by side with their differences highlighted, in the terminal or as a self-contained HTML page. Either side can be local or on GitHub.
  • Export: Markdown, JSON, HTML, SVG, plain text, and reStructuredText, with a pre-commit hook that regenerates them on every commit.
  • Configuration: save your defaults once, or commit a project's to .recursivist.toml or pyproject.toml.
  • And more: Nerd Font icons, shell completion for Bash, Zsh, Fish, and PowerShell, and a typed Python API.

Quick Start

# The current directory, or any path, as a tree
recursivist visualize
recursivist visualize path/to/project --depth 2

# Most lines of code first, with size and modification time alongside
recursivist visualize --sort-by-loc --size --mtime

# Changed files first, leaving out whatever .gitignore ignores
recursivist visualize --sort-by-git-status --ignore-file .gitignore

# Python files only, without the tests
recursivist visualize --include-pattern "*.py" --exclude-pattern "test_*"

# A GitHub repository, or one folder of one branch
recursivist visualize https://github.com/owner/repo
recursivist visualize https://github.com/owner/repo/tree/develop/src

# A fork against its upstream, saved as an HTML report
recursivist compare ./my-fork https://github.com/owner/repo --save

# Markdown for the docs, JSON for scripts, SVG for a README
recursivist export --format "md json svg" --output-dir docs

# Defaults for every run
recursivist config set exclude node_modules .git
recursivist config set ignore-file .gitignore

Documentation

The documentation covers every command and option. Begin with the quick start, borrow from the recipes for CI pipelines, self-updating structure docs, and jq analysis, or look things up in the CLI reference.

Metadata

Release files for recursivist 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recursivist 3.0.0
File Size Uploaded
recursivist-3.0.0.tar.gz 165.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for recursivist 3.0.0
File Interpreter ABI Platform
recursivist-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 267.6 kB

Release files / recursivist-3.0.0.tar.gz

Download URL recursivist-3.0.0.tar.gz
Size 165.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b96a4200a33a18ca2cf1d5d70906d9d9d15711ca76a34d33135792db845fe4a4
BLAKE2b-256 checksum
How to use checksums
7a64d42e877fcd271c598d3ebf859a1883d4f80d60ee64d96f19021e283716db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / recursivist-3.0.0-py3-none-any.whl

Download URL recursivist-3.0.0-py3-none-any.whl
Size 101.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d905b7e0a3e0086231a4aa79049b265e035545b46074a1a1a86c862e803e0d34
BLAKE2b-256 checksum
How to use checksums
2d00e7e40447bbd3a591d72e543241eae0739f372c1794927fedc776bd34d730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

4.0.0

2 release files

This release

3.0.0 This release

2 release files

2.1.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page