mdsmith
Esc
    v0.52.0 GitHub

    mdsmith metrics

    List and rank shared Markdown metrics (file length, token estimate, readability, …).

    Metrics are the shared measurements rules compute: file length, section length, token estimate, readability scores. This CLI surfaces them as a standalone tool for triage.

    mdsmith metrics <command> [flags] [files...]

    # Subcommands

    SubcommandDescription
    listList available metrics in the registry
    rankRank files by selected metrics

    # metrics list

    mdsmith metrics list [flags]
    FlagDefaultDescription
    -f, --formattexttext or json
    --scopefileMetric scope (only file)

    # metrics rank

    mdsmith metrics rank [flags] [files...]
    FlagDefaultDescription
    -c, --configautoOverride config path
    -f, --formattexttext or json
    --metricsComma-separated metric IDs to compute
    --byMetric ID to rank by
    --orderdescasc or desc
    --top0Limit output to N rows (0 = all)
    --no-gitignorefalseSkip gitignore filtering
    --follow-symlinksconfigFollow symlinks; tri-state
    --max-input-size2MBMax file size (e.g. 2MB, 0=none)

    metrics rank counts only authored bytes. Content between <?include?> and <?catalog?> markers is excluded. Embedded content is measured against its source file, not the host that pulls it in.

    With no file arguments, defaults to the current directory.

    # Examples

    mdsmith metrics list
    mdsmith metrics rank --by bytes --top 10 .
    mdsmith metrics rank --by token-estimate --top 5 docs/
    mdsmith metrics rank --metrics bytes,sentences --by sentences plan/

    # Exit codes

    CodeMeaning
    0Output produced
    2Runtime / config error