{"id":23632095,"url":"https://github.com/ergut/contextor","last_synced_at":"2025-04-09T23:32:32.438Z","repository":{"id":265281525,"uuid":"895562458","full_name":"ergut/contextor","owner":"ergut","description":"A lightweight Python tool for extracting codebase context for LLM conversations - generate directory trees and file contents for better AI interactions","archived":false,"fork":false,"pushed_at":"2024-12-26T18:19:26.000Z","size":45,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T20:33:16.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ergut.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-28T12:48:45.000Z","updated_at":"2024-12-26T17:52:36.000Z","dependencies_parsed_at":"2024-12-26T18:39:19.294Z","dependency_job_id":"fc4c8243-22ad-4b6c-bef6-283448127510","html_url":"https://github.com/ergut/contextor","commit_stats":null,"previous_names":["ergut/codecontextor","ergut/contextor"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergut%2Fcontextor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergut%2Fcontextor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergut%2Fcontextor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ergut%2Fcontextor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ergut","download_url":"https://codeload.github.com/ergut/contextor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248129538,"owners_count":21052589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-28T03:19:45.862Z","updated_at":"2025-04-09T23:32:32.403Z","avatar_url":"https://github.com/ergut.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Contextor 🚀\n\nHere's a secret about AI coding assistants: they're only as good as the context you give them! Forget chasing perfect prompts or waiting for the next big model - what truly transforms an AI assistant into a reliable coding partner is crystal-clear context about your project.\n\nEver needed to explain your codebase to ChatGPT or Claude? Contextor creates a perfect snapshot of your project in seconds:\n\n```bash\n# That's it! Just run:\ncontextor --directory ./my_project\n```\n\n## What You Get ✨\n\n```text\nmy_project/\n├── src/\n│   └── main.py     # LLMs can request this file if needed!\n└── config/\n    └── settings.yaml\n\n# Key files are included below the tree...\n```\n\nJust paste this into your AI chat and start coding! The AI can see your project structure and request any file it needs.\n\n## Quick Start 🏃‍♂️\n\n```bash\n# Install\npip install contextor\n\n# Run (will include all files)\ncontextor --directory ./my_project\n\n# Or specify key files only\ncontextor --files main.py config.yaml\n```\n\n## Why Contextor? 🎯\n\n- **Simple**: One command to create perfect context for AI conversations\n- **Smart**: Respects .gitignore, handles large files, includes safety checks\n- **Flexible**: Include specific files or let the AI see everything\n- **Safe**: Warns you about size and skips files \u003e10MB\n\n## Features in Detail 🛠️\n\n- 📁 Complete project tree generation\n- 📄 Automatic or selective file inclusion\n- 🔒 .gitignore pattern support\n- ⚡ Large file protection\n- 🎮 Custom file exclusions\n- 📊 Size warnings and confirmations\n\n## Advanced Usage 🔧\n\nNeed more control? We've got you covered:\n\n```bash\n# Include files listed in a text file\ncontextor --files-list important_files.txt\n\n# Custom exclude patterns\ncontextor --exclude-file exclude_patterns.txt\n\n# Ignore .gitignore\ncontextor --no-gitignore\n\n# Include essential context and supplementary info\ncontextor --prefix-file project_overview.txt --appendix-file api_docs.txt\n\n# Add schemas and deployment guides\ncontextor --prefix-file schemas.txt --appendix-file deployment.txt\n```\n\n## Command Line Options 🎛️\n\n| Option | Description |\n|--------|-------------|\n| `--directory` | Project directory (default: current) |\n| `--files` | Specific files to include |\n| `--files-list` | File containing list of files |\n| `--smart-select` | Automatically select important files like entry points, configs, and docs |\n| `--prefix-file` | Essential context to add at start (schemas, overview) |\n| `--appendix-file` | Supplementary info to add at end (docs, guides) |\n| `--output` | Output filename (default: project_context.txt) |\n| `--estimate-tokens` | Calculate and show estimated token count in the output file |\n| `--no-gitignore` | Disable .gitignore patterns |\n| `--exclude-file` | Additional exclude patterns file |\n\n## Examples 📚\n\n### Include specific files (files-list.txt):\n```text\nsrc/main.py\nconfig/settings.yaml\nREADME.md\n```\n\n### Exclude patterns (exclude-patterns.txt):\n```text\n*.pyc\n__pycache__/\n.env\n*.log\n```\n\n## Safety First 🛡️\n\nContextor looks out for you:\n- Calculates total file size\n- Shows warning for large directories\n- Asks for confirmation\n- Skips files \u003e10MB\n- Respects .gitignore by default\n\n## Installation Options 📦\n\n```bash\n# From PyPI (recommended)\npip install contextor\n\n# From source\ngit clone https://github.com/ergut/contextor\npip install -r requirements.txt\n```\n\n## Contributing 🤝\n\nWe love contributions! Check out [README.test.md](README.test.md) for:\n- Running tests\n- Test coverage details\n- Adding new features\n- Contributing guidelines\n\n## License 📜\n\nMIT License - See [LICENSE](LICENSE) file\n\n## Support 💬\n\n- 🐛 [Report issues](https://github.com/ergut/contextor/issues)\n- 💡 [Feature requests](https://github.com/ergut/contextor/issues)\n- 📖 [Documentation](https://github.com/ergut/contextor)\n\n## Author ✍️\n\nSalih Ergüt\n\n## Version 📋\n\nCurrent version: 1.0.3\n\nSee [CHANGELOG.md](CHANGELOG.md) for version history and updates.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fergut%2Fcontextor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fergut%2Fcontextor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fergut%2Fcontextor/lists"}