Skip to main content

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

codefile-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codefile-1.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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

Hashes for codefile-1.0.0.tar.gz
Algorithm Hash digest
SHA256 66b21b0507189325f5d7ac9c597e481c4b3481de48bda4134bc289214fc413fd
MD5 de79fe8d2f013bd6242746d570cb4a89
BLAKE2b-256 bea6ebd28dc7bded5b2043895e358c8a30310a30c5b50271e259a6e75594a83e

See more details on using hashes here.

Provenance

The following attestation bundles were made for codefile-1.0.0.tar.gz:

Publisher: python-publish.yml on anthroberc/codefile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for codefile-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d68fef4bb2f5831e34a681f8391617f4091ea3f2e9763d128b0b3c019ba2097
MD5 279ba29d9fb657b0419dae107ec4dc41
BLAKE2b-256 1ff0741ff8cf674e2b38613094a3059845ff2e2d8342f54956e4aad2b34f0030

See more details on using hashes here.

Provenance

The following attestation bundles were made for codefile-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on anthroberc/codefile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page