Skip to main content

Crate towl

Crate towl 

Source
Expand description

§towl

A fast CLI tool and library for scanning codebases for TODO, FIXME, HACK, NOTE, and BUG comments. Supports interactive browsing via a terminal UI, multiple output formats, and automatic GitHub issue creation.

§Library usage

use towl::scanner::Scanner;
use towl::config::{ParsingConfig, TowlConfig};

let config = TowlConfig::load(None)?;
let scanner = Scanner::new(config.parsing)?;
let result = scanner.scan(".".into()).await?;

for todo in &result.todos {
    println!("{}: {} ({}:{})", todo.todo_type, todo.description,
             todo.file_path.display(), todo.line_number);
}

§Modules

  • scanner — Directory traversal and file scanning
  • config — Configuration loading and validation
  • output — Formatting and writing results (JSON, CSV, Markdown, etc.)
  • github — GitHub issue creation from TODO comments
  • tui — Interactive terminal UI for browsing and selecting TODOs
  • processor — Post-creation replacement of TODO comments with issue links
  • comment — TODO comment types and data structures
  • cli — Command-line argument parsing
  • error — Top-level error type aggregating all module errors

Modules§

cli
Command-line interface definitions using clap.
comment
TODO comment types and classification.
config
Configuration loading, validation, and initialisation.
error
Top-level error type that unifies errors from all towl subsystems.
github
GitHub issue creation from TODO comments.
llm
LLM-powered TODO validation and analysis.
output
Output formatting and writing for scan results.
parser
Regex-based parser for extracting TODO comments from source file content.
processor
Post-issue-creation processor that replaces TODO comments with issue links.
scanner
Directory traversal and concurrent file scanning for TODO comments.
tui
Interactive terminal UI for browsing, filtering, and selecting TODO comments.