CodePack CLI is a powerful command-line tool designed to help developers share their code with AI assistants like Claude, GPT-4, and other LLMs. It intelligently extracts and categorizes your project files into organized markdown files that can be easily shared with any AI assistant.
- π€ AI-Ready Output: Generates clean, organized markdown files perfect for sharing with AI assistants
- π File Size Analytics: Displays individual file sizes and total size information for better project insights
- π― Smart Categorization: Automatically categorizes files into code, data, and configuration files
- π Template Library: Built-in templates for popular frameworks (Flutter, React, Vue, Node.js, Laravel, Python)
- π Universal Exclusions: Automatically excludes
.git, IDE files, OS files, and other common artifacts - π i18n Support: Intelligent handling of internationalization and localization files
- π¨ Beautiful Output: Generates well-structured markdown with metadata, file sizes, and summaries
- β‘ Cross-Platform: Works seamlessly on Linux, macOS, and Windows
- π¨ Rich CLI: Colorful terminal output with progress indicators and size information
git clone https://github.com/adil-chbada/codepack-cli.git
cd codepack-cli-cli
make buildgo install github.com/adil-chbada/codepack-cli@latest-
Create a configuration file:
codepack-cli init react -o my-config.yaml
-
Generate AI-ready documentation:
codepack-cli generate -c my-config.yaml
-
Share with AI - Copy the content from generated markdown files and paste directly into ChatGPT, Claude, or any AI assistant for code review, debugging, or development assistance:
project-code.md- Source code files with individual and total sizesproject-data.md- Data files with size analyticsproject-locals.md- Configuration files with size breakdown
codepack-cli init [template] [flags]
# Examples
codepack-cli init react -o react-config.yaml
codepack-cli init flutter -o flutter-config.yaml
codepack-cli init common -o common-exclusions.yaml # Universal exclusions only
codepack-cli init --list # Show available templatescodepack-cli generate [flags]
# Examples
codepack-cli generate # Uses default config file
codepack-cli generate -c config.yaml # Specify config file
codepack-cli generate -o ./docs # Custom output directory| Template | Description | Best For |
|---|---|---|
common |
Universal exclusions (.git, IDE files, etc.) |
Any project type |
go |
Go projects with vendor/, bin/, build/ exclusions | Go applications |
react |
React projects with i18n support | React applications |
vue |
Vue.js projects with localization | Vue applications |
nodejs |
Node.js projects with i18n patterns | Node.js backends/APIs |
flutter |
Flutter/Dart projects with .arb files | Mobile applications |
laravel |
PHP Laravel with localization | Web applications |
python |
Python projects with locale support | Python applications |
The YAML configuration file defines file categorization patterns. Common exclusions (.git, IDE files, etc.) are automatically applied to all projects.
# Project metadata
project_name: "My React App"
project_path: "."
# Data file patterns (highest priority)
data_patterns:
- "src/data/**"
- "public/data/**"
- "data/**/*.json"
- "**/*.csv"
- "**/*.xml"
# Configuration file patterns
local_patterns:
- "*.config.js"
- ".env*"
- "package.json"
- "src/i18n/**"
- "src/locales/**"
# Main files (included in code documentation)
main_local_files:
- "src/index.js"
- "src/App.js"
- "src/i18n/en.json" # Main English locale only
# Project-specific exclusions (common exclusions are automatic)
exclude_patterns:
- "node_modules/**" # Project-specific
- "build/**" # Project-specific
- "package-lock.json" # Project-specific
use_regex: falseCodePack CLI generates three AI-optimized markdown files that can be easily shared with AI assistants:
- Content: Source code files and main application files formatted for AI code review, debugging, and development assistance
- Size Info: Individual file sizes, directory totals, overall project size
- Includes: Main locale file (English only)
- AI Use: Perfect for code review, bug fixing, architecture analysis, and development guidance
- Content: Data files from designated directories organized for AI analysis of project structure
- Size Info: Data file sizes, largest files highlighted
- Includes: JSON, CSV, XML, database files
- AI Use: Ideal for data structure analysis, schema review, and content understanding
- Content: Configuration and localization files prepared for AI translation and i18n assistance
- Size Info: Config file sizes, locale file breakdown
- Includes: All i18n files (except main English), environment files
- AI Use: Optimized for translation tasks, configuration review, and internationalization guidance
Each file includes metadata and well-formatted content optimized for AI consumption. Simply copy and paste the content into your preferred AI assistant for instant project understanding.
- Go 1.21+
- Make (optional)
git clone https://github.com/adil-chbada/codepack-cli.git
cd codepack-cli
make deps
make buildmake build # Build binary
make test # Run tests
make clean # Clean artifacts
make build-all # Cross-compile
make help # Show all commands- Use specific patterns:
data/**/*.jsoninstead of**/*.json - Leverage automatic exclusions: Common files are excluded automatically
- Organize by purpose: Separate data, code, and configuration clearly
- Include main files wisely: Only essential files in code documentation
exclude_patterns(highest)data_patternslocal_patterns- Default to code files
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Follow pattern precedence rules
- Include comprehensive i18n support
- Use specific directory patterns
- Test with real projects
MIT License - see LICENSE file for details.
- π Issues: GitHub Issues
- π‘ Features: Feature Requests
- π Docs: GitHub Wiki