bfiles
2024-12-09
Initial creation of the bfiles project with bundler, unbundler, CLI, and test suite
110 files · 13,674+ · 256-
Project bootstrap with full bundling utility
13 files changed
pyproject.tomlPython package config using setuptools, targeting Python 3.11+ with dependencies on provide-foundation, pathspec, rich, and tiktokencli.pyClick CLI entry points (bfiles and bf alias) with bundle and unbundle commandsconfig.pyBfilesConfig attrs-based configuration with include/exclude pattern supportbundler.pyCore bundler for file discovery, filtering, metadata extraction, and bundle generationunbundler.pyBundle parser, file extractor, and checksum verifierchunking.pyToken-based file splitting via tiktoken with configurable overlapexclusions.pyExclusion engine respecting .gitignore patterns via pathspec with default artifact exclusionsmetadata.pyFile metadata extractionmetadata_writer.pyMetadata output formattingoutput.pyRich terminal output for statistics displayprogress.pyProgress display helperserrors.pyError hierarchy for the projectutils.pyShared utility functions
- Created complete Python package with
pyproject.tomlusing setuptools, targeting Python 3.11+ with dependencies onprovide-foundation,pathspec,rich, andtiktokenbaseline internal1 file
pyproject.toml
- Established CLI entry points (
bfilesandbfalias) using Click withbundleandunbundlecommands decouple behavioral1 file
cli.py
- Implemented
BfilesConfigattrs-based configuration with support for include/exclude patterns (glob, regex, literal) instantiate internal1 file
config.py
- Built the core bundler (
bundler.py) for file discovery, filtering, metadata extraction (size, hash, MIME type), and bundle file generation instantiate internal1 file
bundler.py
- Built the unbundler (
unbundler.py) for parsing bundle files, extracting files, and verifying checksums instantiate internal1 file
unbundler.py
- Added file chunking support (
chunking.py) with token-based splitting via tiktoken and configurable overlap harden internal1 file
chunking.py
- Implemented exclusion engine (
exclusions.py) respecting.gitignorepatterns via pathspec, with default exclusions for common artifacts decouple behavioral1 file
exclusions.py
- Added metadata handling (
metadata.py,metadata_writer.py) for file metadata extraction and output instantiate behavioral2 files
metadata.pymetadata_writer.py
- Created rich terminal output (
output.py,progress.py) for statistics and progress display decouple behavioral2 files
output.pyprogress.py
- Added comprehensive error hierarchy (
errors.py) and utility functions (utils.py) instantiate internal2 files
errors.pyutils.py
- Wrote extensive test suite: tests for CLI, core, config, exclusions, metadata, output, unbundler (chunks, extraction, security), and utilities
qualify
behavioral
8 files
test_cli.pytest_core.pytest_config.pytest_exclusions.pytest_metadata.pytest_output.pytest_unbundler.pytest_utils.py
- Added CI workflow (
.github/workflows/ci.yml), man page (docs/bfiles.1), format specification (docs/specs.txt), and development documentation specify errata3 files
ci.ymlbfiles.1specs.txt
Documentation and project metadata
6 files changed
README.mdFull documentation with features, installation, usage, API reference, and configurationLICENSEApache 2.0 licenseVERSIONProject version fileCLAUDE.mdAI-assisted development guidancePLAN.mdProject planning documentTODO.mdTask tracking document
- Rewrote README from stub to full documentation with features, installation, usage, API reference, and configuration
qualify
errata
1 file
README.md
- Added LICENSE (Apache 2.0), VERSION file, CLAUDE.md for AI-assisted development guidance
baseline
internal
3 files
LICENSEVERSIONCLAUDE.md
- Added
.dev/PLAN.mdand.dev/TODO.mdfor project planning instantiate internal2 files
PLAN.mdTODO.md