uncoil
uncoil is a command-line tool designed to explore and recursively unfurl the contents of a directory into a single output, either printed to the terminal or saved to a file. It has an option to skip certain file extensions or entire subdirectories, as it works best with text-based files.
It will produce tree visualization of directories and files and will reveal the contents of files not specified to be skipped.
By default, folders and files that are suspected to provide no useful information (e.g., .git, .venv, __pycache__, etc.) are hard skipped, i.e. they are not included in the tree, and their contents are not revealed. Data folders and files which would not provide useful information through their contents but possibly through their presence (e.g. .jpg, .tar, etc.) are soft skipped, i.e. they are shown in the tree, but their contents are not revealed.
Using the -x option, you can specify additional file extensions or directories to hard skip.
The package handles Jupyter notebooks by converting to text using jupytext in the output without affecting the contents of the notebook or adding any files to the directory.
This can be useful for navigating large projects, quickly summarizing as well as thoroughly revealing the structure and contents of a project.
It may be useful for providing context of a codebase to a Large Language Model (LLM).
Installation
To install the latest version of uncoil, run:
pip install uncoil
Usage
uncoil -d <directory> [-o <output_file>] [-x <extensions_to_skip,dirs_to_skip>] [-t <tag>]
Options
usage: uncoil [-h] -d DIRECTORY [-o OUTPUT_FILE] [-x EXCLUDE] [-t TAG]
Process a directory and unfurl its contents.
options:
-h, --help show this help message and exit
-d DIRECTORY, --directory DIRECTORY
Directory to process.
-o OUTPUT_FILE, --output_file OUTPUT_FILE
Output file to redirect output into.
-x EXCLUDE, --exclude EXCLUDE
Comma-separated list of file extensions or directories to skip.
-t TAG, --tag TAG Optional tag to wrap around output. Enter 'none' for no tag.
Examples
- Print the unfiltered structure of a directory to the console:
uncoil -d directory
- Print the structure of a directory to the console, skipping certain extensions and subdirectories:
uncoil -d directory -x .log,.tmp,.git
- Save the unfiltered structure of a directory to a file:
uncoil -d directory -o output.txt
- Save the structure of a directory to a file, skipping certain extensions and subdirectories:
uncoil -d directory -o output.txt -x .log,.tmp,.git
- Save the unfiltered structure of a directory to a file, wrapping the output in a custom tag:
uncoil -d directory -o output.txt -t "my_project"
For example, see the examples/ directory for output of the following command run on this uncoil repository itself:
uncoil -d . \
-o examples/uncoil.txt \
-x LICENSE \
-t uncoil_codebase
Development
To develop the package further:
- Clone the repository and create a branch
- Install with dev dependencies:
pip install -e ".[dev]"
- Install pre-commit hook
pre-commit install
pre-commit autoupdate # optionally update
- Run tests:
pytest
Metadata
Release files for uncoil 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uncoil-1.3.0.tar.gz | 14.2 kB | Without provenance | Details for uncoil-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uncoil-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for uncoil-1.3.0-py3-none-any.whl |
Total release size: 21.8 kB
Release files / uncoil-1.3.0.tar.gz
| Download URL | uncoil-1.3.0.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9431d117800e65622b2ab5ece89693ae29ec94724a7f6a0bad7ec57ce55291fc
|
|
BLAKE2b-256 checksum How to use checksums |
92cfd125aa1cd1562d61f389c352d28bb5c539beb37d423ccacba957878f8b7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / uncoil-1.3.0-py3-none-any.whl
| Download URL | uncoil-1.3.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd2523cd8b0ec6e4cce0696fb7cda66d14b1f44fae2f2773e6c259ad9de1b4b7
|
|
BLAKE2b-256 checksum How to use checksums |
1b849db1e905e00d73e3a9631049c29a8fcd2ab34080f4df52f4275603a005ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for uncoil 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.