Modularize CodeContexter and document CLI usage#1
Open
ShivamB25 wants to merge 10 commits intoSekinal:masterfrom
Open
Modularize CodeContexter and document CLI usage#1ShivamB25 wants to merge 10 commits intoSekinal:masterfrom
ShivamB25 wants to merge 10 commits intoSekinal:masterfrom
Conversation
…build/dist files, and common IDE/tool caches
- Remove unused imports (mimetypes, concurrent.futures, as_completed, unused typing names) - Simplify typing imports to only what's used - Normalize string quoting and spacing for consistency (use double quotes) - Reflow long lines and improve readability (multi-line constructs, blank lines) - Minor refactors: clearer tqdm fallback layout, tidy file/path handling and logging messages No functional changes intended; purely stylistic and cleanup.
- Add src/codecontexter/__init__.py exposing main() and FileMetadata - Add src/__init__.py for proper package structure - Follow src-layout Python packaging best practice 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Extract LANGUAGE_MAP with 250+ file extension mappings - Extract FILE_CATEGORIES for file classification - Extract ALWAYS_IGNORE_PATTERNS for build/vendor directories - Fix duplicate .dockerignore key (removed line 268) - Comprehensive coverage: Python, JS/TS, Docker, K8s, IaC, CI/CD 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add src/codecontexter/cli.py which provides a command-line interface to create enhanced Markdown summaries of code. Supports arguments for the target directory, output path, verbosity, toggling the metadata table, and optionally including SHA-256 file hashes.
- Add src/codecontexter/file_operations.py: - Utilities for scanning and collecting project files (collect_files) - Merge global and nested .gitignore patterns (get_combined_spec, load_nested_gitignore) - Project root discovery (find_project_root) - File processing helpers: line counting, optional SHA-256 hashing, metadata extraction (process_file, count_lines, get_file_hash) - Safe tqdm fallback when tqdm is unavailable - Respect output/script exclusions and file-type filtering via language detection - Add src/codecontexter/language_detection.py: - Determine language hints from filenames/extensions using LANGUAGE_MAP (get_language_from_path) - Special handling for .github/workflows YAML and no-extension text files - File categorization by purpose using FILE_CATEGORIES (get_file_category)
Delete the single-file CLI implementation (app.py) now that its functionality has been extracted into the new modular package (file operations, language detection, CLI entrypoint). Cleans up repository and avoids duplication.
…metadata and lockfile
…e, report layout, configuration, and development instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Commit lineage