{"id":24407453,"url":"https://github.com/lig/todo-md","last_synced_at":"2026-02-09T23:34:23.533Z","repository":{"id":271840784,"uuid":"914607476","full_name":"lig/todo-md","owner":"lig","description":"`todo-md` is a small pre-commit hook implemented in Bash that maintains `TODO.md` file in your repo ","archived":false,"fork":false,"pushed_at":"2025-02-06T18:08:38.000Z","size":67,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T07:45:22.516Z","etag":null,"topics":["devtools","pre-commit","pre-commit-hook","todo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"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/lig.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-01-09T23:45:12.000Z","updated_at":"2025-02-18T21:15:08.000Z","dependencies_parsed_at":"2025-01-10T08:34:57.097Z","dependency_job_id":"b8f5e80d-d5f7-416f-896b-e66f17ab816a","html_url":"https://github.com/lig/todo-md","commit_stats":null,"previous_names":["lig/todo-md"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/lig/todo-md","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Ftodo-md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Ftodo-md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Ftodo-md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Ftodo-md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lig","download_url":"https://codeload.github.com/lig/todo-md/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Ftodo-md/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29285817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"ssl_error","status_checked_at":"2026-02-09T21:57:11.537Z","response_time":56,"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":["devtools","pre-commit","pre-commit-hook","todo"],"created_at":"2025-01-20T05:11:19.076Z","updated_at":"2026-02-09T23:34:23.515Z","avatar_url":"https://github.com/lig.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TODO.md Pre-Commit Hook\n\n`todo-md` is a pre-commit hook written in Go that automatically maintains a `TODO.md` file in your repository. It collects `TODO:` comments from your code and organizes them into a markdown file, making it easy to track tasks and improvements.\n\n## Features\n\n- Automatically scans your staged files for `TODO:` comments.\n- Updates `TODO.md` with references to the files, line numbers, and corresponding comments.\n- Removes outdated entries from `TODO.md` when tasks are removed from the code.\n- Uses Forge (e.g. Codeberg or GitHub) style `#L\u003cline number\u003e` links that work in a Forge UI.\n- Uses IDE style `:\u003cline number\u003e` text for links that are being recognized in terminal output by most of IDEs.\n\n## Usage\n\n### Installation\n\n1. Install [pre-commit](https://pre-commit.com/).\n\n2. Add the following to your `.pre-commit-config.yaml`:\n\n    ```yaml\n    repos:\n        - repo: https://codeberg.org/lig/todo-md.git\n          rev: v2.0.3\n          hooks:\n              - id: todo-md\n    ```\n\n3. Install the hook by running:\n\n    ```bash\n    pre-commit install\n    ```\n\n### How It Works\n\n- The hook scans all staged files for lines containing `TODO:` comments.\n- For each `TODO:` comment, it extracts:\n  - The file name\n  - The line number\n  - The comment text\n- It updates `TODO.md` in the root of the repository with entries in the format:\n\n    ```markdown\n    * [path/to/file:\u003cline_number\u003e](path/to/file#L\u003cline_number\u003e): The TODO comment text\n    ```\n\n- Outdated entries (corresponding to removed `TODO:` comments) are removed automatically.\n\n### Example\n\nGiven the following code in a staged file:\n\n```python\n...\n# TODO: Refactor this function\ndef example():\n    pass\n```\n\n`TODO.md` will be updated as:\n\n```markdown\n* [path/to/file:2](path/to/file#L2): Refactor this function\n```\n\nSee a [list of forks of popular projects](#examples-of-todo-md-generated-for-some-open-source-projects) with `TODO.md` file generated using this hook. :)\n\n## Contributing\n\nContributions are welcome! Feel free to submit issues or pull requests to the project repository: [todo-md on Codeberg](https://codeberg.org/lig/todo-md).\n\n## Support \u0026 Community\n\nFeel free to ask a question or request a feature in [Issues](https://codeberg.org/lig/todo-md/issues) or join our [chat on Matrix](https://matrix.to/#/#todomd:dabar.chat).\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Examples of TODO.md generated for some Open Source Projects\n\n- [CPython](https://github.com/lig/cpython/blob/master/TODO.md) (187 TODOs)\n- [Linux](https://github.com/lig/linux/blob/master/TODO.md) (3788 TODOs)\n- [Git](https://github.com/lig/git/blob/master/TODO.md) (112 TODOs)\n- [Go](https://github.com/lig/go/blob/master/TODO.md) (455 TODOs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flig%2Ftodo-md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flig%2Ftodo-md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flig%2Ftodo-md/lists"}