Multi-language TODO comment extractor written in Rust.
Project description
Rusty TODO MD — A Pre-Commit Hook & CLI for Managing TODOs
Rusty TODO MD helps you find, centralize, and maintain all your TODO comments across your codebase.
It can run as a pre-commit hook or from the CLI, automatically extracting TODO-style comments into a structured TODO.md file.
Supports a wide range of languages and file types, with sectioned formatting, multi-line support, and smart sync.
📌 Recommended usage: Pre-commit via shim repo
When pre-commit installs a hook from a Git repo, it runs pip install . from that repo — which would normally build Rusty TODO MD from source (requiring a Rust toolchain).
The shim repository (rusty-todo-md-pre-commit) solves this by depending on the rusty_todo_md PyPI package, ensuring prebuilt wheels are used.
Add this to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/simone-viozzi/rusty-todo-md-pre-commit
rev: v1.7.5 # Use the latest upstream tag (shim mirrors upstream)
hooks:
- id: rusty-todo-md
Then install the hook:
pre-commit install
✅ No Rust toolchain is required when using the shim and a supported platform.
⚙️ CLI installation
You can also install Rusty TODO MD directly for manual CLI use:
pip install rusty_todo_md
Then run:
rusty-todo-md --help
✨ Key Features
-
Automatic TODO Collection By default, Rusty TODO MD scans your staged files (or all tracked files using the
--all-filesflag) for markers likeTODOandFIXME, and updates yourTODO.mdwith any new entries. -
Sectioned TODO.md Format The
TODO.mdfile is now organized into sections, grouped first by marker (e.g.,# TODO,# FIXME), then by file. Each marker section begins with a header (# <MARKER>), each file with a sub-header (## <file-path>), followed by a list of extracted TODO items. -
Multi-line TODO Support Handles multi-line and indented TODO comments, merging them into a single entry.
-
Sync Mechanism
- Automatically merges new TODO entries with existing ones, using an internal representation.
- Removes entries when their corresponding TODOs are no longer present in the source code.
-
Language-Aware Parsing Supports precise parsing for Python, Rust, JavaScript, and Go out-of-the-box, with plans for additional languages such as TypeScript, PHP, and Java.
-
Seamless Pre-Commit Integration Easily integrate Rusty TODO MD into your workflow by adding it to your
.pre-commit-config.yaml.
🧩 CLI usage
Scan staged files
rusty-todo-md
Scan all tracked files
rusty-todo-md --all-files
Use multiple markers
rusty-todo-md --markers TODO FIXME HACK
Custom TODO.md path
rusty-todo-md --todo-path docs/TODOS.md
📝 Supported languages & extensions
Rusty TODO MD detects comment syntax based on file extension:
| Language / Type | Extensions |
|---|---|
| Python | py |
| Rust | rs |
| JavaScript / JSX | js, jsx, mjs |
| TypeScript | ts, tsx |
| Java | java |
| C / C++ headers | cpp, hpp, cc, hh |
| C# | cs |
| Swift | swift |
| Kotlin | kt, kts |
| JSON | json |
| Go | go |
| Shell | sh |
| YAML | yml, yaml |
| TOML | toml |
| Dockerfile | dockerfile |
| Markdown | md |
Many extensions share the same parser (e.g., JS-style comment parsing for TS, Java, C-like languages).
🔍 Output format (stable)
Entries in TODO.md use this format:
* [path/to/file.ext:LINE](path/to/file.ext#L{LINE}): MESSAGE
This format is stable and designed for easy linking to code in hosted repos.
Example:
# TODO
## src/main.rs
* [src/main.rs:10](src/main.rs#L10): Refactor initialization logic
📦 Requirements & Supported Platforms
- Python ≥ 3.10
- No Rust toolchain needed if using the shim or PyPI wheels
Prebuilt wheels are published for:
| OS / libc | Architectures |
|---|---|
| Linux (manylinux) | x86_64, x86, aarch64, armv7, ppc64le |
| Linux (musllinux) | x86_64, x86, aarch64, armv7 |
| Windows | x64, x86 |
| macOS | x86_64 (macOS 13), aarch64 (macOS 14) |
🛠 Troubleshooting
- If no wheel is available for your platform,
pipwill try to build from source — which requires a Rust toolchain. - If you encounter build errors, please:
- Check the latest releases to confirm wheel availability.
- Open an issue with your OS/arch details.
👩💻 Development
If you want to run Rusty TODO MD directly from the main repo via pre-commit (building from source):
repos:
- repo: https://github.com/simone-viozzi/rusty-todo-md
rev: v1.7.5
hooks:
- id: rusty-todo-md
⚠️ This will compile the Rust source and requires a working Rust toolchain.
🤝 Contributing
Contributions are welcome!
- Open an issue for bug reports or feature requests.
- Submit a pull request with improvements, new parsers, or fixes.
📚 Links
- Shim repo (recommended for pre-commit): rusty-todo-md-pre-commit
- PyPI package: rusty_todo_md
- Releases: GitHub Releases
⚖️ License
Licensed under the MIT License.
❤️ Support
If you find Rusty TODO MD helpful, please consider giving it a ⭐ on GitHub to help others discover the project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rusty_todo_md-1.9.1.tar.gz.
File metadata
- Download URL: rusty_todo_md-1.9.1.tar.gz
- Upload date:
- Size: 90.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
466b6960b7b5f45119505fdcc5376d4bb7a9af7ebc7d3e1b291fda3a44f50888
|
|
| MD5 |
05c2c55a3a1f8c58edb3215c2dc2cb1a
|
|
| BLAKE2b-256 |
13e20af29673163699eae50719cbe61c8015884aa6704bf1a854860adef80576
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-win_amd64.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-win_amd64.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4c83a29f31cd053cdd5cbebe34caa01487172d2939abae5d70f0c7b4784e5ec
|
|
| MD5 |
f205bb08e25aa38c7b9685b639ca1778
|
|
| BLAKE2b-256 |
910c60a4536e4369759151b3dd363187dae43ee7af29699dd48b0e477c130179
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-win32.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-win32.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc15393c1d002d1f2b4e2a837f801441dbcb6f9297cc75a91b2f6e293afcb160
|
|
| MD5 |
15b8d863c04c4df948d6d35c0707bd42
|
|
| BLAKE2b-256 |
a549fd2099a4176f2580ae21dc6ac374a189ec7404fc3e705aeb8d6489494366
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2f3af96afc0096ec3ab2316d3679c16253e5b956248e731989a82a8142e98bc
|
|
| MD5 |
454be0dbeb47d22ad400465c69ad66bc
|
|
| BLAKE2b-256 |
d9105057092d1c9de28a33ac67f6f22e06e0a35dfbb20d1538369eed7ba09857
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-musllinux_1_2_i686.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87bcf051e283894b5bed362723bad2ea7b2d538b3d59ab2276551e2401dca883
|
|
| MD5 |
a2899975a2c83d1cc5fa7a57eb2f0e63
|
|
| BLAKE2b-256 |
be747a5324a9d68d5dba4027bbee01a543a1d8e1f143ab6d3f7c3cf9cbd3a321
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf6f3a86df8235b3efe643becae292740cc0ce74562300c8b13cd8f1cfaaa7c9
|
|
| MD5 |
736eea663c4a541505834ef6c2983359
|
|
| BLAKE2b-256 |
c373ee937566cf5fa1fbe19956b95e9b0e8a3ebe017b88c6f82d8f9ebd34c96c
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6094e7efb5f3f06b296ea088fa6da1d15987c8d401af6be0f1ce4be3cbf6ea48
|
|
| MD5 |
6bd7d728deb95cc0f899daa753b23ceb
|
|
| BLAKE2b-256 |
9ab32fbaa6bc52c372bb1a85eae200d97bdd3037ca80a6623db789cba04e77a4
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89562a59ab3a3cc7078b8a06e343db74230071ddf8d59ca33e28881713eaeb0e
|
|
| MD5 |
445b98098f64257a663b13e685f4b03b
|
|
| BLAKE2b-256 |
c68ae23c0c5f0cc8190920abb8de0b986e86b3f5373b886a259aebbac2a8449c
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f20c2d5544bc750cfbde3135904f9ed60e23a542b00708d132fa3b410e4cbb4b
|
|
| MD5 |
12f5154fc5ed92e1b34674891a646149
|
|
| BLAKE2b-256 |
d983b7edeb42a6190f0a30e6b5f2320d9fcaaed1137d7ece70f8c47a3f971ac7
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4fdbcbbe858067d827e66b7682c4c96ee3bc241beadc55d61e4776ec81e21df
|
|
| MD5 |
6c4a9060cb0e19d8a254d84e653e5543
|
|
| BLAKE2b-256 |
4a12b6110fe6d82aeebb72ca3c4084d6a651886d4e29b46fdabc5a3a35dfbaec
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f0af8dde725d6c16295f93167638f650b03cd9abcbb629299a07257e418ef8a
|
|
| MD5 |
1a1ff12aba0787def08e71aafef695ab
|
|
| BLAKE2b-256 |
489db5cd6d10625aae2224478fdf23293097eb3846194f33904166f0c011264e
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1831f5cbc7a09ebfc1b6a77323583a08deff68dd85ec74e75ff8b0b49e88f8f
|
|
| MD5 |
315d0157aa89b3afcddc7bf6c3cbd603
|
|
| BLAKE2b-256 |
5e5fe65531c3ce8a0b01fb50a2ed9366d08056ef9663ab13a6a1d752bb6aca45
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bd94023e8a424386b0bbed74a1d626f30137ede966531cba25108d8fa2fbe40
|
|
| MD5 |
cf9a910bea6d4720c9d31b3254ecdb22
|
|
| BLAKE2b-256 |
9630e8c77ea3d1c65f31f7b065b7892b2016e46dd8af9f8904eb49944c24ad2b
|
File details
Details for the file rusty_todo_md-1.9.1-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rusty_todo_md-1.9.1-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c927bb485adcd4c5d02ed35e0a5e2afcc276a2a8ef752b04dffbb1896fd4353c
|
|
| MD5 |
8a77c5fd3c901290295abac7d839c535
|
|
| BLAKE2b-256 |
e27f57e59f94467ebeee7cad168dd1b28b9e210a5554b0b63baad273d95ebd51
|