A CLI tool to bundle entire projects into a single AI-friendly context file.
Project description
codefile – Python Project Packager
===================================== What Is codefile?
codefile is a Python package that scans your project directory and packs everything into a single output file named:
CodeFile
It includes:
- Project folder structure (tree view)
- File metadata (SHA-256 ID)
- File contents
- Total size (in MB)
- UTC creation timestamp
This is useful for:
- Creating project snapshots
- Sharing full source code as one file
- Simple archiving
- Backup purposes
===================================== Installation
If installed from source:
pip install .
installing a package:
pip install codefile
===================================== How To Use
Step 1: Open terminal inside your project folder.
Step 2: Run:
codefile
Step 3: After execution, a new file will appear:
CodeFile
That file contains your full project snapshot.
===================================== What Gets Packed?
✔ All regular files in the current directory
✔ Subdirectories
✔ File contents
✔ Directory structure
Automatically ignored:
- .git folder
- The generated CodeFile
- The package script itself
- Patterns listed in .gitignore (if present)
===================================== Output File Structure
The generated file contains:
ROOT_NAME <project_name> CREATED_UTC TOTAL_SIZE_MB
START_STRUCTURE END_STRUCTURE
FILE_START <relative_path> <file_id> FILE_END <relative_path> <file_id>
===================================== Technical Details
- Uses SHA-256 hashing (first 12 characters as ID)
- Reads files in chunks (memory safe)
- Skips unreadable or broken files safely
- Writes output using UTF-8 encoding
- Handles errors without crashing
===================================== Requirements
- Python 3.8+
- No external dependencies (uses standard library only)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codefile-1.0.0.tar.gz.
File metadata
- Download URL: codefile-1.0.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66b21b0507189325f5d7ac9c597e481c4b3481de48bda4134bc289214fc413fd
|
|
| MD5 |
de79fe8d2f013bd6242746d570cb4a89
|
|
| BLAKE2b-256 |
bea6ebd28dc7bded5b2043895e358c8a30310a30c5b50271e259a6e75594a83e
|
Provenance
The following attestation bundles were made for codefile-1.0.0.tar.gz:
Publisher:
python-publish.yml on anthroberc/codefile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codefile-1.0.0.tar.gz -
Subject digest:
66b21b0507189325f5d7ac9c597e481c4b3481de48bda4134bc289214fc413fd - Sigstore transparency entry: 1022958760
- Sigstore integration time:
-
Permalink:
anthroberc/codefile@e90fef6fe81fca1dee990baf2a7ecb452a99007b -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/anthroberc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e90fef6fe81fca1dee990baf2a7ecb452a99007b -
Trigger Event:
release
-
Statement type:
File details
Details for the file codefile-1.0.0-py3-none-any.whl.
File metadata
- Download URL: codefile-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d68fef4bb2f5831e34a681f8391617f4091ea3f2e9763d128b0b3c019ba2097
|
|
| MD5 |
279ba29d9fb657b0419dae107ec4dc41
|
|
| BLAKE2b-256 |
1ff0741ff8cf674e2b38613094a3059845ff2e2d8342f54956e4aad2b34f0030
|
Provenance
The following attestation bundles were made for codefile-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on anthroberc/codefile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codefile-1.0.0-py3-none-any.whl -
Subject digest:
6d68fef4bb2f5831e34a681f8391617f4091ea3f2e9763d128b0b3c019ba2097 - Sigstore transparency entry: 1022958792
- Sigstore integration time:
-
Permalink:
anthroberc/codefile@e90fef6fe81fca1dee990baf2a7ecb452a99007b -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/anthroberc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e90fef6fe81fca1dee990baf2a7ecb452a99007b -
Trigger Event:
release
-
Statement type: