{"id":27374348,"url":"https://github.com/elvismdev/code2prompt-manager","last_synced_at":"2026-04-29T20:32:57.063Z","repository":{"id":286082001,"uuid":"960305429","full_name":"elvismdev/code2prompt-manager","owner":"elvismdev","description":"A CLI tool that helps you manage file size limits when using code2prompt. Interactively select which files to include/exclude from your codebase, automatically handle large files, and ensure your output stays under token limits for LLMs. Makes code2prompt easier to use with large projects.","archived":false,"fork":false,"pushed_at":"2025-06-16T08:32:44.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T01:36:47.670Z","etag":null,"topics":["ai-tool","cli-tool","code-analysis","code2prompt","codebase-management","developer-tool","file-management","interactive-cli","llm","nodejs","npm-package","prompt-engineering","prompting","size-optimization","terminal","token-management","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elvismdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-04-04T07:52:02.000Z","updated_at":"2025-06-16T08:32:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b220d5a-ac85-4834-adfe-c580e5294a99","html_url":"https://github.com/elvismdev/code2prompt-manager","commit_stats":null,"previous_names":["elvismdev/code2prompt-manager"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/elvismdev/code2prompt-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elvismdev%2Fcode2prompt-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elvismdev%2Fcode2prompt-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elvismdev%2Fcode2prompt-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elvismdev%2Fcode2prompt-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elvismdev","download_url":"https://codeload.github.com/elvismdev/code2prompt-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elvismdev%2Fcode2prompt-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32443505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ai-tool","cli-tool","code-analysis","code2prompt","codebase-management","developer-tool","file-management","interactive-cli","llm","nodejs","npm-package","prompt-engineering","prompting","size-optimization","terminal","token-management","utility"],"created_at":"2025-04-13T11:56:07.237Z","updated_at":"2026-04-29T20:32:57.045Z","avatar_url":"https://github.com/elvismdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code2Prompt Manager\n\nA CLI tool to manage file size limits when using [code2prompt](https://github.com/mufeedvh/code2prompt). This tool helps you interactively select which files to exclude from your codebase to keep the output Markdown file under your desired size limit.\n\n## Installation\n\n```bash\n# Install globally\nnpm install -g code2prompt-manager\n```\n\n## Prerequisites\n\n- Node.js 12 or higher\n- `code2prompt` must already be installed on your system\n\n## Usage\n\n```bash\ncode2prompt-manager [options]\n```\n\n### Options\n\n- `-l, --limit \u003csize\u003e`: Size limit for the generated MD file in KB (default: 400)\n- `-d, --directory \u003cpath\u003e`: Directory to scan (default: current directory)\n- `-e, --extra-exclude \u003cpatterns\u003e`: Additional exclude patterns (comma-separated)\n- `-i, --include \u003cpatterns\u003e`: Include patterns (comma-separated)\n- `-O, --output-file \u003cfile\u003e`: Output file name (default: current directory name + .md)\n- `-F, --output-format \u003cformat\u003e`: Output format: markdown, json, or xml (default: markdown)\n- `--include-priority`: Include files in case of conflict between include and exclude patterns\n- `--full-directory-tree`: List the full directory tree\n- `-c, --encoding \u003cencoding\u003e`: Optional tokenizer to use for token count\n- `--line-numbers`: Add line numbers to the source code\n- `-n, --no-execute`: Only show the command, don't execute it\n- `--auto-exclude`: Automatically exclude files to stay under size limit\n\n## How it Works\n\n1. The tool scans your codebase directory\n2. Files and directories are sorted by size (largest first)\n3. When using `--auto-exclude`, the tool automatically selects large files to exclude to meet the size limit\n4. An interactive UI lets you select which files to exclude or include\n5. The tool calculates the estimated output file size based on your selections\n6. The tool generates and executes the appropriate code2prompt command\n\n## Example\n\n```bash\n# Basic usage with default options\ncode2prompt-manager\n\n# Set a custom size limit (in KB)\ncode2prompt-manager --limit 350\n\n# Automatically exclude large files to stay under the limit\ncode2prompt-manager --limit 350 --auto-exclude\n\n# Specify a custom output file\ncode2prompt-manager --output-file my-project.md\n\n# Scan a specific directory and don't execute the command\ncode2prompt-manager -d ./my-project -n\n\n# Specify additional files to exclude\ncode2prompt-manager -e \"*.log,temp/**\"\n```\n\n## Default Excludes\n\nThe tool automatically excludes common large directories and files:\n\n- node_modules/\\*\\*\n- vendor/\\*\\*\n- .git/\\*\\*\n- .next/\\*\\*\n- .husky/\\*\\*\n- dist/\\*\\*\n- build/\\*\\*\n- public/\\*\\*\n- docs/\\*\\*\n- package-lock.json\n- composer.lock\n- yarn.lock\n- \\*.min.js\n- \\*.min.css\n\nYou can add or remove excludes through the interactive selection.\n\n## Size Limit Enforcement\n\nThe `-l, --limit` option sets a target size limit for your output file:\n\n- The tool will show you the estimated output size based on your selections\n- If you're over the limit, it will warn you with color-coded indicators\n- Use `--auto-exclude` to have the tool automatically exclude the largest files to meet your limit\n- You can still manually adjust the selection after auto-exclude\n\n## Tips for Reducing File Size\n\n1. Exclude test files and directories\n2. Exclude documentation and example files\n3. Exclude large media files\n4. Focus on the core functionality of your codebase\n5. Exclude third-party libraries and dependencies\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felvismdev%2Fcode2prompt-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felvismdev%2Fcode2prompt-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felvismdev%2Fcode2prompt-manager/lists"}