{"id":20067763,"url":"https://github.com/krzko/codemap","last_synced_at":"2026-02-18T02:01:35.636Z","repository":{"id":260990219,"uuid":"882909310","full_name":"krzko/codemap","owner":"krzko","description":"🖍 A tool that helps annotate code files with structural information to provide better context for LLMs (Large Language Models)","archived":false,"fork":false,"pushed_at":"2025-03-06T08:50:12.000Z","size":40,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T21:58:57.757Z","etag":null,"topics":["annotation","annotation-tool","annotations","code","code-helper","llm"],"latest_commit_sha":null,"homepage":"","language":"Go","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/krzko.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-04T02:55:04.000Z","updated_at":"2024-11-04T23:56:50.000Z","dependencies_parsed_at":"2025-08-02T23:40:01.538Z","dependency_job_id":null,"html_url":"https://github.com/krzko/codemap","commit_stats":null,"previous_names":["krzko/codemap"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/krzko/codemap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzko%2Fcodemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzko%2Fcodemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzko%2Fcodemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzko%2Fcodemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krzko","download_url":"https://codeload.github.com/krzko/codemap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzko%2Fcodemap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29566366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"online","status_checked_at":"2026-02-18T02:00:09.468Z","response_time":162,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["annotation","annotation-tool","annotations","code","code-helper","llm"],"created_at":"2024-11-13T14:03:30.569Z","updated_at":"2026-02-18T02:01:35.630Z","avatar_url":"https://github.com/krzko.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codemap\n\n`codemap` is a tool that helps annotate code files with structural information to provide better context for LLMs (Large Language Models). It adds a single line of metadata at the top of each file containing the file path, package name and language information.\n\n## Installation\n\n```bash\nbrew install krzko/tap/codemap\n```\n\nOr clone and build manually:\n\n```bash\ngit clone https://github.com/krzko/codemap.git\ncd codemap\nmake build\n```\n\nOr use docker:\n\n```bash\ndocker run -v $(pwd):/app ghcr.io/krzko/codemap apply --dry-run\n```\n\n## Commands\n\n### Apply Annotations\n\n```bash\n# Add annotations to files in current directory\ncodemap apply\n\n# Add annotations with dry-run (show what would change)\ncodemap apply --dry-run\n\n# Add annotations to specific directory\ncodemap apply -d /path/to/project\n\n# Add annotations with verbose output\ncodemap apply -V\n```\n\n### Clean Annotations\n\n```bash\n# Remove annotations from files in current directory\ncodemap clean\n\n# Remove annotations with dry-run\ncodemap clean --dry-run\n\n# Clean specific directory\ncodemap clean -d /path/to/project\n```\n\n### List Files\n\n```bash\n# List files that would be processed\ncodemap list\n# or\ncodemap ls\n\n# List files in specific directory\ncodemap list -d /path/to/project\n```\n\n### Show Statistics\n\n```bash\n# Show annotation statistics for current directory\ncodemap stats\n\n# Show stats for specific directory\ncodemap stats -d /path/to/project\n```\n\n### Common Options\n\nAll commands support these options:\n- `-d, --dir`: Directory to process (default: current directory)\n- `-t, --types`: Comma-separated list of file extensions (default: \"go,py,js,jsx,ts,tsx\")\n- `-V, --verbose`: Enable verbose logging\n- `-v, --version`: Display version information\n\n### Example Annotation\n\nBefore:\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n    fmt.Println(\"Hello, World!\")\n}\n```\n\nAfter:\n```go\n// codemap: path=/path/to/file.go;pkg=main;lang=Go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n    fmt.Println(\"Hello, World!\")\n}\n```\n\n### Supported Languages\n\n- Go (.go)\n- Python (.py)\n- JavaScript (.js, .jsx)\n- TypeScript (.ts, .tsx)\n- Dockerfile\n\n### Default Exclusions\n\nThe tool automatically excludes these common directories and files:\n\nDirectories:\n- .git\n- .github\n- .gitlab\n- .vscode\n- .idea\n- node_modules\n- vendor\n- .venv\n- __pycache__\n- dist\n- build\n\nFiles:\n- Hidden files (.*) \n- *.min.js\n- *.map\n- *.lock\n- package-lock.json\n- yarn.lock\n- pnpm-lock.yaml\n- *.sum\n- *.mod\n\n## Examples\n\n```bash\n# Add annotations with dry-run\ncodemap apply --dry-run\n\n# Process only Go files\ncodemap apply -t go\n\n# Clean TypeScript files with dry-run\ncodemap clean -t ts,tsx --dry-run\n\n# List all Python and JavaScript files\ncodemap list -t py,js\n\n# Show stats for Go files\ncodemap stats -t go\n\n# Process all files with verbose output\ncodemap apply -V\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzko%2Fcodemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrzko%2Fcodemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzko%2Fcodemap/lists"}