Skip to main content

Coderoller

Coderoller banner

Build Status Supports Python versions 3.10+

Coderoller is a Python utility that flattens a source code repository into a single markdown file. This tool collects all relevant source and configuration files, including Python, JavaScript, TypeScript, HTML, CSS, JSON, and more, and compiles them into a markdown document. The flattened file provides an organized overview of the repository's contents, making it easy to use in conjunction with LLMs. Simply copy the contents of the flattened file and paste it into your LLM chat context. The flattened form is also great for API-based uses of LLMs in automated workflows.

Features

  • Flattens source code repositories into a single markdown file.
  • Supports multiple file types including .py, .js, .jsx, .ts, .tsx, .swift, .go, .java, .c, .cpp, .h, .hpp, .cs, .lua, .rb, .php, .pl, .html, .css, .json, .toml, .md, .yaml, .yml, .conf, .ini, and .sh.
  • Automatically includes README files if present, placing it at the start of the flattened file.
  • Excludes hidden files and directories (those starting with a dot), specific directories (build, dist, node_modules, __pycache__), specific files (lockfiles, hidden files, other flattened files, etc.), and any paths specified in .gitignore.
  • Supports flattening directly from Git URLs even if the repository is not cloned locally.

Installation

Coderoller requires Python 3.10 or later.

Using pipx

You can install Coderoller globally using pipx:

pipx install coderoller

Usage

To flatten a source repository, use the coderoller-flatten-repo script.

coderoller-flatten-repo /path/to/reponame

To flatten a source repository directly from a Git URL, use the coderoller-flatten-repo script with the repository URL:

coderoller-flatten-repo https://github.com/username/reponame.git

Both commands will create a markdown file named reponame.flat.md in the current working directory, containing the flattened contents of the repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for coderoller 0.4.3

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

Source distribution (sdist)

Source distribution for coderoller 0.4.3
File Size Uploaded
coderoller-0.4.3.tar.gz 5.2 kB Details

Built distribution (wheel)

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

Total release size: 12.1 kB

Release files / coderoller-0.4.3.tar.gz

Download URL coderoller-0.4.3.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
99cbc534fbdfafda3175c6f7fcce405b33060042a4f78a448f002b39373c7a61
BLAKE2b-256 checksum
How to use checksums
6911a9ad044fe28bf62a3f69f450d1fb19854a712a255444b6736b50cdaf1652
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.8

Release files / coderoller-0.4.3-py3-none-any.whl

Download URL coderoller-0.4.3-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7764ed06a183635a267ad706c7629107f9bc3faa6b69f504d172d7ce9c040351
BLAKE2b-256 checksum
How to use checksums
cfeadad2b13f07dd0c423dd1813a43f1f8fa7f44761cbc8cdc5d9d0b6998d0ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.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