Skip to main content

Multi-language TODO comment extractor written in Rust.

Project description

Rusty TODO MD — A Pre-Commit Hook & CLI for Managing TODOs

PyPI - Version PyPI - Python Version License: MIT

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

  1. Automatic TODO Collection By default, Rusty TODO MD scans your staged files (or all tracked files using the --all-files flag) for markers like TODO and FIXME, and updates your TODO.md with any new entries.

  2. Sectioned TODO.md Format The TODO.md file 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.

  3. Multi-line TODO Support Handles multi-line and indented TODO comments, merging them into a single entry.

  4. 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.
  5. 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.

  6. 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, pip will try to build from source — which requires a Rust toolchain.
  • If you encounter build errors, please:
    1. Check the latest releases to confirm wheel availability.
    2. 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


⚖️ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rusty_todo_md-1.8.0.tar.gz (62.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rusty_todo_md-1.8.0-py3-none-win_amd64.whl (1.6 MB view details)

Uploaded Python 3Windows x86-64

rusty_todo_md-1.8.0-py3-none-win32.whl (1.4 MB view details)

Uploaded Python 3Windows x86

rusty_todo_md-1.8.0-py3-none-musllinux_1_2_x86_64.whl (1.8 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

rusty_todo_md-1.8.0-py3-none-musllinux_1_2_i686.whl (1.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

rusty_todo_md-1.8.0-py3-none-musllinux_1_2_armv7l.whl (1.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

rusty_todo_md-1.8.0-py3-none-musllinux_1_2_aarch64.whl (1.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

rusty_todo_md-1.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

rusty_todo_md-1.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

rusty_todo_md-1.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (1.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

rusty_todo_md-1.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

rusty_todo_md-1.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

rusty_todo_md-1.8.0-py3-none-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

rusty_todo_md-1.8.0-py3-none-macosx_10_12_x86_64.whl (1.5 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file rusty_todo_md-1.8.0.tar.gz.

File metadata

  • Download URL: rusty_todo_md-1.8.0.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.3

File hashes

Hashes for rusty_todo_md-1.8.0.tar.gz
Algorithm Hash digest
SHA256 defdbb56e9e1d10be8cc8aae977567c361bebb25d64666147c296541662b1b92
MD5 439433965081ef10724481c5a1b5268e
BLAKE2b-256 59cc42f532cae6530b248b1f82ca143e8fc12e26450ab7429136c13f92d46058

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 87db2bec53aa8a1517a86089f093c0edcec4e524c2a08a5eab827985a3b6f6a7
MD5 e78f2e5a90ed1dc00341e4d3c11aed68
BLAKE2b-256 69565bfd1f93f10492983c5716b59e7552851ef63179e7bc96b481ecc30d2935

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-win32.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 310a71d264baeb6e75a9ee6a956d9d41ff1bdb84d3bd6c85ba71c7a25ab5e8f1
MD5 fb8a0bbd5318fb0d60aaac376bb3b34e
BLAKE2b-256 94f7a0e31d6ac0e4b9e62881bb32b3865d05f792d8af476fe921409b4532bacb

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b40e24342122f3e522fdd18c8097b62d9c84eed7d575bd20c1421f17f9b84434
MD5 f3d9c4b1542de3f51b1179bd1639737b
BLAKE2b-256 7080e05982345c3c032a1f0727ece0b78fe8e6cf468c3daad6a8e1fa546e9179

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 2cbb4819fe28c409eead185c0fd98b564b68b794d2aa17ce5726d9f35baebcdb
MD5 19c7c9cda8a7f778e9924720358acfaf
BLAKE2b-256 d3c5526836e9aa04fdbdb61f8f3a24996ef9ce3d2a5d6240d12846b9a7299e8f

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 8981249b7dfd7ada70a932cea893a31172992181b1f1fa3b0eeeb6f87b7bd3f4
MD5 25fbc128a5f1af01a2c2306341a0f4f4
BLAKE2b-256 a6a72a4ea97fdf595400a808c11cb3a087aefffcefb0b1f0a36960054ebdf11f

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 546cebb839bf5d5f9c2b6cfc71815ae0ff927c343957d81a0c24457e74259514
MD5 65fc6add084415c07bed48e63ca09d9c
BLAKE2b-256 0e4d09ccb4df282a2d020b05ec07ede0e78e1b000f93ae4f8a6b91fccf9e5636

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 caf5259c98c464c646925778aa377e4730cadc80d02ed8e394ef8ba909c86bc7
MD5 4bbd478b311394d3354920ebae288c11
BLAKE2b-256 096adbc0cc1ab359a94a8cbe915863c4a185d54afb350d2dedc397b30a5b2b0f

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 0e1d9be28865bdfb2dee697bf9376405439cf7249d5a1998cc180e1215a922dd
MD5 cae1e3ac3395af1a8f69afa043e440d3
BLAKE2b-256 9c822aefbeb1fc8e397b87821561023bcdc200fe9c1112bb011936ea2c48e4df

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b160b44088a464417a152d13efaaf2bb24e5bb47f9985abf17034c47ad02ce22
MD5 445b924cac8865da179b0cbbd871fa88
BLAKE2b-256 3ce03379d72302457490efc4f0e7d224906b752bc569c400d951704ce91f8985

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 cf77957d938f4ebc11ffc97c3fc601333eff986b3caabb535750c89bc86137ca
MD5 ddb0d3f983f1d39dfd4570d4f9799680
BLAKE2b-256 1fb82005f091fd1fd51a56c14b69efa044e3a7d2a0e1eb89ff57699e06d33851

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9c29d8c96def43eea42b3ef6a6b812d61b4b50c471d474c4e9aa094c6615af76
MD5 8f089aee243253f176f4e1772f7494a6
BLAKE2b-256 555d38e202ead1c46f1c854157dcf0a1ddf60b50d4794c34e270983f2a0cd45d

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac0ebe3b8f9a81d26861912d4489496a8a57ea4fdb542ac355be63fb44390bed
MD5 8245dddc5b2b8c2d269f74090604a87a
BLAKE2b-256 1ca105172a4c8fcb146db7221a9e32d654b0afae210b010b1c92b6ed260535c2

See more details on using hashes here.

File details

Details for the file rusty_todo_md-1.8.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rusty_todo_md-1.8.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e139c2c8914a622f18d4632b67a53b0e0db8a3437c0e09a9294e7b984b5ff1ee
MD5 68cf24e32878af9be7cef67378b081ff
BLAKE2b-256 c85333ec73ded8674297c2d6aef2f92fae50f6de0f9c0b09ee2590871dd254f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page