<div align="center">
<h1>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/AlexanderParker/blobify/main/misc/blobify-light.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/AlexanderParker/blobify/main/misc/blobify-dark.svg">
<img alt="Blobify" src="https://raw.githubusercontent.com/AlexanderParker/blobify/main/misc/blobify-dark.svg" width="48" height="48" style="vertical-align: middle; margin-right: 12px;">
</picture>
Blobify
</h1>
<p><em>Package your entire codebase into a single text file for AI consumption</em></p>
</div>
[](https://pypi.org/project/blobify/)
[](https://pypi.org/project/blobify/)
[](https://github.com/AlexanderParker/blobify/blob/main/LICENSE)
[](https://github.com/AlexanderParker/blobify/actions)
[](https://github.com/psf/black)
[](https://marketplace.visualstudio.com/items?itemName=ShentonConsulting.blobify-format)
Feed your project to Claude, ChatGPT, or other AI assistants for code analysis, debugging, refactoring, documentation, or feature development.
## Quick Start
Install:
```bash
pip install blobify
```
Basic usage:
```bash
# Package current directory to clipboard
bfy . --copy-to-clipboard=true
# Or run without directory if .blobify exists
bfy --copy-to-clipboard=true
```
## Command Line Options
```
bfy [directory] [options]
```
- `directory` - Directory to scan (optional, defaults to current directory if .blobify file exists)
- `--output-filename <file>` - Output file path (optional, defaults to stdout)
- `-x,` `--context [name]` - Use specific context from .blobify file, or list available contexts if no name provided
- `-f,` `--filter <"name","regex","filepattern">` - Content filter: extract only lines matching regex pattern, optionally restricted to files matching filepattern (can be used multiple times)
- `--debug`=`true|false` - Enable debug output for gitignore and .blobify processing (default: false)
- `--enable-scrubbing`=`true|false` - Enable scrubadub processing of sensitive data (default: true)
- `--output-line-numbers`=`true|false` - Include line numbers in file content output (default: true)
- `--output-index`=`true|false` - Include file index section at start of output (default: true)
- `--output-content`=`true|false` - Include file contents in output (default: true)
- `--output-metadata`=`true|false` - Include file metadata (size, timestamps, status) in output (default: true)
- `--show-excluded`=`true|false` - Show excluded files in file contents section (default: true)
- `--copy-to-clipboard`=`true|false` - Copy output to clipboard (default: false)
- `--suppress-timestamps`=`true|false` - Suppress timestamps in output for reproducible builds (default: false)
- `--list-patterns`=`none|ignored|contexts` - List patterns and exit: 'ignored' shows built-in patterns, 'contexts' shows available contexts (default: none)
**Key features:** Respects `.gitignore`, automatic sensitive data scrubbing, includes line numbers, supports custom filtering via `.blobify` configuration, content filters for extracting specific patterns with file targeting, context listing for easy discovery, cross-platform clipboard support, **context inheritance** for reusable configurations.
**Important Notice:** The scrubbing feature is not guaranteed to work; it may not detect some sensitive data. Consider it a best-effort helper only. Always review output before sharing.
## Content Filters
You can add multiple filters to extract specific patterns from files.
The filter syntax is: `"name","regex","filepattern"` where:
- `name` - Filter identifier (for display)
- `regex` - Regular expression to match content lines
- `filepattern` - **Optional** file glob pattern (defaults to `*` for all files if omitted)
If you provide only two values like `"name","regex"`, the filter applies to all matched files. Single values like `"regex"` use the regex as both name and pattern.
### Basic Filters
```bash
# Function and class definitions
bfy . --filter '"signatures","^(def|class)\s+"' --copy-to-clipboard=true
# Multiple filters (OR logic)
bfy . --filter '"funcs","^def"' --filter '"imports","^import"' --copy-to-clipboard=true
```
### File-Targeted Filters
Target specific file types with the file pattern syntax:
```bash
# Python functions only
bfy . --filter '"py-functions","^def","*.py"' --copy-to-clipboard=true
# Backend API analysis: routes from Python + SQL from migrations
bfy . --filter '"api-routes","@app\.","*.py"' --filter '"queries","^(SELECT|INSERT)","*.sql"' --copy-to-clipboard=true
```
## .blobify Configuration
Create a `.blobify` file in your project directory for custom configurations. When a `.blobify` file exists in your current directory, you can run `bfy` without specifying a directory argument.
**VS Code Extension:** For `.blobify` file syntax highlighting and validation, install the [Blobify Format extension](https://marketplace.visualstudio.com/items?itemName=ShentonConsulting.blobify-format) from the VS Code Marketplace.
### Basic Configuration
- `@option=value` - Set default configuration option (`@debug=true`, `@copy-to-clipboard=true`, `@output-content=false`, etc.)
- `@filter="name","regex","filepattern"` - Set default content filter with CSV format for file targeting
- `+pattern` - Include files (overrides gitignore)
- `-pattern` - Exclude files
- `[context-name]` - Define named contexts
- `[context-name:parent]` - Define context with single inheritance
- `[context-name:parent1,parent2]` - Define context with multiple inheritance
- `## instruction` - Add LLM/AI analysis instructions (appears in output header)
- Supports `*` and `**` wildcards
```
# Default configuration options
@copy-to-clipboard=true
@show-excluded=false
@suppress-timestamps=true
# Content filters with file targeting (CSV format)
@filter="signatures","^(def|class)\s+","*.py"
@filter="imports","^(import|from)","*.py"
@filter="routes","@app\.(get|post)","app.py"
# Include/exclude patterns
+.github/**
+.pre-commit-config.yaml
-*.log
-temp/**
[docs-only]
# Documentation review context
## Review this documentation for clarity and completeness
## Check for broken links and outdated information
-**
+*.md
+docs/**
[security-review]
## This codebase represents a web application built with Flask
## Focus on security vulnerabilities including SQL injection and XSS
## Pay special attention to authentication and authorization mechanisms
+*.py
+templates/*.html
[todos]
# Find all TODOs and FIXMEs
@filter="todos","(TODO|FIXME|XXX)"
@show-excluded=false
+**
```
LLM instructions (lines starting with `##`) appear in the output header as:
```
# Instructions for AI/LLM analysis:
# * Review this documentation for clarity and completeness
# * Check for broken links and outdated information
```
### Context Inheritance
- Use `[context:parent]` for single inheritance
- Use `[context:parent1,parent2]` for multiple inheritance
- Contexts can only inherit from contexts defined earlier in the file
- Child contexts inherit all patterns and options from parents, then add their own
- Cannot redefine the `default` context - it's automatically created
- Inheritance order is preserved: parent1 → parent2 → child
- LLM instructions are also inherited from parent contexts
```
# Base configuration
@copy-to-clipboard=true
@debug=true
# Match nothing by default
-**
[backend:default]
# Inherits @copy-to-clipboard=true, @debug=true, +*.py, -*.pyc from default
## Analyze backend code for performance and security issues
+*.sql
+migrations/**
@filter="functions","^def","*.py"
@filter="models","^class.*Model","models/*.py"
[frontend:default]
# Also inherits from default
## Focus on component structure and state management
+*.js
+*.vue
+*.css
@filter="components","^(function|const)\s+[A-Z]","*.jsx"
[full:backend,frontend]
# Multiple inheritance - combines backend + frontend
## Perform comprehensive full-stack analysis
+*.md
+docs/**
@show-excluded=false
```
---
## Development
### Setup
1 - Clone and enter directory:
```bash
git clone https://github.com/AlexanderParker/blobify.git
cd blobify
```
2 - Create and activate virtual environment:
```bash
python -m venv venv
source venv/bin/activate # Linux/macOS
# or
venv\Scripts\activate # Windows
```
3 - Install with dev dependencies:
```bash
pip install -e ".[dev]"
pre-commit install
```
### Run Tests
```bash
invoke test # Run tests
invoke coverage # Run with coverage
invoke format # Format code
invoke lint # Check code quality
invoke all # Check everything
```
### For Maintainers
**Publishing to PyPI:**
This package is published to PyPI as `blobify`. Releases are managed using invoke tasks:
```bash
# On branch main - after any release-related PRs are merged in.
# Bump version (choose one):
invoke bump-patch # 1.0.0 → 1.0.1
invoke bump-minor # 1.0.0 → 1.1.0
invoke bump-major # 1.0.0 → 2.0.0
# or set specific version:
invoke set-version 1.2.3
# Ensure all tests pass:
invoke all
# Clean any previous build artifacts:
invoke clean-dist
# Build the package:
invoke build
# Test upload to TestPyPI first (recommended):
invoke publish-test
# Upload to production PyPI (requires appropriate credentials):
invoke publish
# Finally tag the build with the new version number and push the tag to the remote:
invoke tag-release
```
**TestPyPI Testing:**
```bash
# Install from TestPyPI to verify the package:
invoke test-install
```
## License
[MIT License](https://github.com/AlexanderParker/blobify/blob/main/LICENSE) - see the project repository for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "blobify",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Alexander Parker <pypi@parker.im>",
"keywords": "ai, llm, chatgpt, claude, codebase, code-analysis, text-processing, file-aggregation, developer-tools, automation, documentation, code-review, refactoring, context-engineering",
"author": null,
"author_email": "Alexander Parker <pypi@parker.im>",
"download_url": "https://files.pythonhosted.org/packages/7b/d8/32649126958e1d64599fcbcf1f3da73a1f36dc174c18c9e474edd713d2ea/blobify-1.1.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\r\n <h1>\r\n <picture>\r\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/AlexanderParker/blobify/main/misc/blobify-light.svg\">\r\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/AlexanderParker/blobify/main/misc/blobify-dark.svg\">\r\n <img alt=\"Blobify\" src=\"https://raw.githubusercontent.com/AlexanderParker/blobify/main/misc/blobify-dark.svg\" width=\"48\" height=\"48\" style=\"vertical-align: middle; margin-right: 12px;\">\r\n </picture>\r\n Blobify\r\n </h1>\r\n <p><em>Package your entire codebase into a single text file for AI consumption</em></p>\r\n</div>\r\n\r\n[](https://pypi.org/project/blobify/)\r\n[](https://pypi.org/project/blobify/)\r\n[](https://github.com/AlexanderParker/blobify/blob/main/LICENSE)\r\n[](https://github.com/AlexanderParker/blobify/actions)\r\n[](https://github.com/psf/black)\r\n[](https://marketplace.visualstudio.com/items?itemName=ShentonConsulting.blobify-format)\r\n\r\nFeed your project to Claude, ChatGPT, or other AI assistants for code analysis, debugging, refactoring, documentation, or feature development.\r\n\r\n## Quick Start\r\n\r\nInstall:\r\n\r\n```bash\r\npip install blobify\r\n```\r\n\r\nBasic usage:\r\n\r\n```bash\r\n# Package current directory to clipboard\r\nbfy . --copy-to-clipboard=true\r\n\r\n# Or run without directory if .blobify exists\r\nbfy --copy-to-clipboard=true\r\n\r\n```\r\n\r\n## Command Line Options\r\n\r\n```\r\nbfy [directory] [options]\r\n```\r\n\r\n- `directory` - Directory to scan (optional, defaults to current directory if .blobify file exists)\r\n- `--output-filename <file>` - Output file path (optional, defaults to stdout)\r\n- `-x,` `--context [name]` - Use specific context from .blobify file, or list available contexts if no name provided\r\n- `-f,` `--filter <\"name\",\"regex\",\"filepattern\">` - Content filter: extract only lines matching regex pattern, optionally restricted to files matching filepattern (can be used multiple times)\r\n- `--debug`=`true|false` - Enable debug output for gitignore and .blobify processing (default: false)\r\n- `--enable-scrubbing`=`true|false` - Enable scrubadub processing of sensitive data (default: true)\r\n- `--output-line-numbers`=`true|false` - Include line numbers in file content output (default: true)\r\n- `--output-index`=`true|false` - Include file index section at start of output (default: true)\r\n- `--output-content`=`true|false` - Include file contents in output (default: true)\r\n- `--output-metadata`=`true|false` - Include file metadata (size, timestamps, status) in output (default: true)\r\n- `--show-excluded`=`true|false` - Show excluded files in file contents section (default: true)\r\n- `--copy-to-clipboard`=`true|false` - Copy output to clipboard (default: false)\r\n- `--suppress-timestamps`=`true|false` - Suppress timestamps in output for reproducible builds (default: false)\r\n- `--list-patterns`=`none|ignored|contexts` - List patterns and exit: 'ignored' shows built-in patterns, 'contexts' shows available contexts (default: none)\r\n\r\n**Key features:** Respects `.gitignore`, automatic sensitive data scrubbing, includes line numbers, supports custom filtering via `.blobify` configuration, content filters for extracting specific patterns with file targeting, context listing for easy discovery, cross-platform clipboard support, **context inheritance** for reusable configurations.\r\n\r\n**Important Notice:** The scrubbing feature is not guaranteed to work; it may not detect some sensitive data. Consider it a best-effort helper only. Always review output before sharing.\r\n\r\n## Content Filters\r\n\r\nYou can add multiple filters to extract specific patterns from files.\r\n\r\nThe filter syntax is: `\"name\",\"regex\",\"filepattern\"` where:\r\n\r\n- `name` - Filter identifier (for display)\r\n- `regex` - Regular expression to match content lines\r\n- `filepattern` - **Optional** file glob pattern (defaults to `*` for all files if omitted)\r\n\r\nIf you provide only two values like `\"name\",\"regex\"`, the filter applies to all matched files. Single values like `\"regex\"` use the regex as both name and pattern.\r\n\r\n### Basic Filters\r\n\r\n```bash\r\n# Function and class definitions\r\nbfy . --filter '\"signatures\",\"^(def|class)\\s+\"' --copy-to-clipboard=true\r\n\r\n# Multiple filters (OR logic)\r\nbfy . --filter '\"funcs\",\"^def\"' --filter '\"imports\",\"^import\"' --copy-to-clipboard=true\r\n```\r\n\r\n### File-Targeted Filters\r\n\r\nTarget specific file types with the file pattern syntax:\r\n\r\n```bash\r\n# Python functions only\r\nbfy . --filter '\"py-functions\",\"^def\",\"*.py\"' --copy-to-clipboard=true\r\n\r\n# Backend API analysis: routes from Python + SQL from migrations\r\nbfy . --filter '\"api-routes\",\"@app\\.\",\"*.py\"' --filter '\"queries\",\"^(SELECT|INSERT)\",\"*.sql\"' --copy-to-clipboard=true\r\n\r\n```\r\n\r\n## .blobify Configuration\r\n\r\nCreate a `.blobify` file in your project directory for custom configurations. When a `.blobify` file exists in your current directory, you can run `bfy` without specifying a directory argument.\r\n\r\n**VS Code Extension:** For `.blobify` file syntax highlighting and validation, install the [Blobify Format extension](https://marketplace.visualstudio.com/items?itemName=ShentonConsulting.blobify-format) from the VS Code Marketplace.\r\n\r\n### Basic Configuration\r\n\r\n- `@option=value` - Set default configuration option (`@debug=true`, `@copy-to-clipboard=true`, `@output-content=false`, etc.)\r\n- `@filter=\"name\",\"regex\",\"filepattern\"` - Set default content filter with CSV format for file targeting\r\n- `+pattern` - Include files (overrides gitignore)\r\n- `-pattern` - Exclude files\r\n- `[context-name]` - Define named contexts\r\n- `[context-name:parent]` - Define context with single inheritance\r\n- `[context-name:parent1,parent2]` - Define context with multiple inheritance\r\n- `## instruction` - Add LLM/AI analysis instructions (appears in output header)\r\n- Supports `*` and `**` wildcards\r\n\r\n```\r\n# Default configuration options\r\n@copy-to-clipboard=true\r\n@show-excluded=false\r\n@suppress-timestamps=true\r\n\r\n# Content filters with file targeting (CSV format)\r\n@filter=\"signatures\",\"^(def|class)\\s+\",\"*.py\"\r\n@filter=\"imports\",\"^(import|from)\",\"*.py\"\r\n@filter=\"routes\",\"@app\\.(get|post)\",\"app.py\"\r\n\r\n# Include/exclude patterns\r\n+.github/**\r\n+.pre-commit-config.yaml\r\n-*.log\r\n-temp/**\r\n\r\n[docs-only]\r\n# Documentation review context\r\n## Review this documentation for clarity and completeness\r\n## Check for broken links and outdated information\r\n-**\r\n+*.md\r\n+docs/**\r\n\r\n[security-review]\r\n## This codebase represents a web application built with Flask\r\n## Focus on security vulnerabilities including SQL injection and XSS\r\n## Pay special attention to authentication and authorization mechanisms\r\n+*.py\r\n+templates/*.html\r\n\r\n[todos]\r\n# Find all TODOs and FIXMEs\r\n@filter=\"todos\",\"(TODO|FIXME|XXX)\"\r\n@show-excluded=false\r\n+**\r\n```\r\n\r\nLLM instructions (lines starting with `##`) appear in the output header as:\r\n\r\n```\r\n# Instructions for AI/LLM analysis:\r\n# * Review this documentation for clarity and completeness\r\n# * Check for broken links and outdated information\r\n```\r\n\r\n### Context Inheritance\r\n\r\n- Use `[context:parent]` for single inheritance\r\n- Use `[context:parent1,parent2]` for multiple inheritance\r\n- Contexts can only inherit from contexts defined earlier in the file\r\n- Child contexts inherit all patterns and options from parents, then add their own\r\n- Cannot redefine the `default` context - it's automatically created\r\n- Inheritance order is preserved: parent1 \u2192 parent2 \u2192 child\r\n- LLM instructions are also inherited from parent contexts\r\n\r\n```\r\n# Base configuration\r\n@copy-to-clipboard=true\r\n@debug=true\r\n# Match nothing by default\r\n-**\r\n\r\n[backend:default]\r\n# Inherits @copy-to-clipboard=true, @debug=true, +*.py, -*.pyc from default\r\n## Analyze backend code for performance and security issues\r\n+*.sql\r\n+migrations/**\r\n@filter=\"functions\",\"^def\",\"*.py\"\r\n@filter=\"models\",\"^class.*Model\",\"models/*.py\"\r\n\r\n[frontend:default]\r\n# Also inherits from default\r\n## Focus on component structure and state management\r\n+*.js\r\n+*.vue\r\n+*.css\r\n@filter=\"components\",\"^(function|const)\\s+[A-Z]\",\"*.jsx\"\r\n\r\n[full:backend,frontend]\r\n# Multiple inheritance - combines backend + frontend\r\n## Perform comprehensive full-stack analysis\r\n+*.md\r\n+docs/**\r\n@show-excluded=false\r\n```\r\n\r\n---\r\n\r\n## Development\r\n\r\n### Setup\r\n\r\n1 - Clone and enter directory:\r\n\r\n```bash\r\ngit clone https://github.com/AlexanderParker/blobify.git\r\ncd blobify\r\n```\r\n\r\n2 - Create and activate virtual environment:\r\n\r\n```bash\r\npython -m venv venv\r\nsource venv/bin/activate # Linux/macOS\r\n# or\r\nvenv\\Scripts\\activate # Windows\r\n```\r\n\r\n3 - Install with dev dependencies:\r\n\r\n```bash\r\npip install -e \".[dev]\"\r\npre-commit install\r\n```\r\n\r\n### Run Tests\r\n\r\n```bash\r\ninvoke test # Run tests\r\ninvoke coverage # Run with coverage\r\ninvoke format # Format code\r\ninvoke lint # Check code quality\r\ninvoke all # Check everything\r\n```\r\n\r\n### For Maintainers\r\n\r\n**Publishing to PyPI:**\r\n\r\nThis package is published to PyPI as `blobify`. Releases are managed using invoke tasks:\r\n\r\n```bash\r\n# On branch main - after any release-related PRs are merged in.\r\n\r\n# Bump version (choose one):\r\ninvoke bump-patch # 1.0.0 \u2192 1.0.1\r\ninvoke bump-minor # 1.0.0 \u2192 1.1.0\r\ninvoke bump-major # 1.0.0 \u2192 2.0.0\r\n# or set specific version:\r\ninvoke set-version 1.2.3\r\n\r\n# Ensure all tests pass:\r\ninvoke all\r\n\r\n# Clean any previous build artifacts:\r\ninvoke clean-dist\r\n\r\n# Build the package:\r\ninvoke build\r\n\r\n# Test upload to TestPyPI first (recommended):\r\ninvoke publish-test\r\n\r\n# Upload to production PyPI (requires appropriate credentials):\r\ninvoke publish\r\n\r\n# Finally tag the build with the new version number and push the tag to the remote:\r\ninvoke tag-release\r\n```\r\n\r\n**TestPyPI Testing:**\r\n\r\n```bash\r\n# Install from TestPyPI to verify the package:\r\ninvoke test-install\r\n```\r\n\r\n## License\r\n\r\n[MIT License](https://github.com/AlexanderParker/blobify/blob/main/LICENSE) - see the project repository for details.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Package your entire codebase into a single text file for AI consumption",
"version": "1.1.0",
"project_urls": {
"Author": "https://parker.im",
"Bug Reports": "https://github.com/AlexanderParker/blobify/issues",
"Documentation": "https://github.com/AlexanderParker/blobify#readme",
"Feature Requests": "https://github.com/AlexanderParker/blobify/issues",
"Repository": "https://github.com/AlexanderParker/blobify",
"VS Code Extension": "https://marketplace.visualstudio.com/items?itemName=ShentonConsulting.blobify-format"
},
"split_keywords": [
"ai",
" llm",
" chatgpt",
" claude",
" codebase",
" code-analysis",
" text-processing",
" file-aggregation",
" developer-tools",
" automation",
" documentation",
" code-review",
" refactoring",
" context-engineering"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "df5286e22d07664b2dd7d52f403a13d40c572e6d18c7b0eb3d1cabea097f0613",
"md5": "1c4cc75d99f797456b14aa5acdcd5fbd",
"sha256": "be2fdd4e80ccdd5d32c13588cd195a73f40b0c185fb6e24e3969f40e2aab4116"
},
"downloads": -1,
"filename": "blobify-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1c4cc75d99f797456b14aa5acdcd5fbd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 82453,
"upload_time": "2025-08-09T09:43:12",
"upload_time_iso_8601": "2025-08-09T09:43:12.203109Z",
"url": "https://files.pythonhosted.org/packages/df/52/86e22d07664b2dd7d52f403a13d40c572e6d18c7b0eb3d1cabea097f0613/blobify-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7bd832649126958e1d64599fcbcf1f3da73a1f36dc174c18c9e474edd713d2ea",
"md5": "0844c3c98b3152501920884638b9f6c0",
"sha256": "b69ed4f17ea7aa8eceeb8869c4620205e8ec6d6409136c52a41ea8a489632c01"
},
"downloads": -1,
"filename": "blobify-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0844c3c98b3152501920884638b9f6c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 73490,
"upload_time": "2025-08-09T09:43:13",
"upload_time_iso_8601": "2025-08-09T09:43:13.649786Z",
"url": "https://files.pythonhosted.org/packages/7b/d8/32649126958e1d64599fcbcf1f3da73a1f36dc174c18c9e474edd713d2ea/blobify-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-09 09:43:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AlexanderParker",
"github_project": "blobify",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "blobify"
}