A collection of tools to flatten and process code repositories
Project description
Coderoller
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).
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/root/folder
This command 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file coderoller-0.2.0.tar.gz
.
File metadata
- Download URL: coderoller-0.2.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8a11a39957df5d8907714bef851e7003b41390d244594f95772f88868278d67 |
|
MD5 | b2e88c0a33954a95441bccfd06f7cb48 |
|
BLAKE2b-256 | c637aad05d743552a59ce7b6d913f6d4bb90958c32c8dc9e01b4106485e15c35 |
File details
Details for the file coderoller-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: coderoller-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 842da5d0b228dfdde8dedb075bc3b5b3c4271339c5442e63996c1fab8a02e48f |
|
MD5 | 0c631dd21faae5fd5a658fd0b07cd97b |
|
BLAKE2b-256 | a0ef6434d32afab15cc9ae06133f12f2c885e589e96f1416a265efb449467fcf |