Codebase Context
Codebase Context is a simple Python tool that generates a textual representation of your project's codebase. It creates a folder tree view along with the contents of files (by default, Python files) to help you get a quick overview of your project's structure.
Features
- Folder Tree Generation: Builds a visual tree of your project directories.
- File Content Aggregation: Appends file contents for files matching specified endings.
- Customizable Filtering: Supports configuration for file endings, ignoring hidden files/folders, and more via a YAML config file.
- Easy to Use: Run the module directly from the command line with minimal configuration.
Installation
Install the package using pip:
pip install codebase-context
Usage
You can run the tool from the command line:
python -m codebase_context <module> [--outfile <output_file>] [--endings <file_endings>] [--config <config_file>] [--overwrite]
For example, to generate a codebase file for a module named my_module:
python -m codebase_context my_module
During execution, if the output file already exists, the script will prompt you to confirm whether to overwrite it. You can bypass this prompt by using the --overwrite flag.
Configuration
By default, the tool looks for a generate_codebase.yaml configuration file in the target module's root directory. This file allows you to customize:
File endings to include (e.g., .py). Hidden file and directory handling. Patterns for ignoring specific files or directories. If no configuration file is provided, default settings are used.
License
This project is licensed under the MIT License.
Metadata
Release files for codebase-context 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codebase_context-0.1.5.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codebase_context-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.1 kB
Release files / codebase_context-0.1.5.tar.gz
| Download URL | codebase_context-0.1.5.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a6e432db96ffdcecc7781c09243cb39c49d6fc0ff0f5cda6e5753b4139a09e0
|
|
BLAKE2b-256 checksum How to use checksums |
24d11c51bcb2dd76729b72faa23a44643b439a822a1e57d1c26d4a8a3f2337b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2025.
Transparency logRelease files / codebase_context-0.1.5-py3-none-any.whl
| Download URL | codebase_context-0.1.5-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4c572c591f4f1004bcb2ff7be58c4ef4d21a5deb3e6bab4c4807e401b811a18
|
|
BLAKE2b-256 checksum How to use checksums |
20fac76a3c15383eb99e92779ec0897c205dc14f1e5f67b6fd893f87121f3731
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2025.
Transparency log