Skip to content

Flag help prints words nobody wrote, for the same reason the errors did #127

Closed

Description

@tamnd

#121 fixed the error messages that came out of the renderer with a word nobody wrote. The flag help has the same problem, from the same cause, and it is worse there, because a help line is where someone looks up what to type.

fang title-cases the first word of a flag's usage string the same way it does an error message. Forty-two help lines in this repo lose something to it:

ccrawl columnar count --engine   Auto|Duckdb|Native|Print (auto)
ccrawl columnar count --subset   Warc|Crawldiagnostics|Robotstxt (warc)
ccrawl fetch --order             Input|File: emit in the order given or the order on disk (file)
ccrawl fetch --file              Warc file path (relative to data.commoncrawl.org)
ccrawl parse --type              Warc-Type filter (response|request|metadata|...)
ccrawl parse --mime              Http MIME filter (substring)
ccrawl index build --input       Jsonl file of documents to index, or - for stdin
ccrawl index build --urls        Comma-Separated page URLs to fetch and index
ccrawl rank top --table          Url of a gzipped rank table
ccrawl host get --graph          Web-Graph release ID (default: latest)
ccrawl urls publish --repo       Huggingface dataset repo (org/name)
ccrawl urls publish --workers    Download-And-Convert workers (0 picks a default from CPU count)
ccrawl domains recount --workers Footer-Read workers (0 picks a default from CPU count)
ccrawl markdown refetch --rate   Per-Host request rate limit (req/s, 0 = unlimited)

The first two are the ones that actually mislead. --engine and --subset print a list of the values they take, and after the renderer every value in the list is spelled with a capital that the flag does not accept. The rest print a word that is not the word: Warc, Http, Jsonl, Url, Huggingface.

Same rule as #121, so the fix is the same: no help line starts with a word that title-casing damages. Reword them to lead with a plain lowercase word.

Two more come from any-cli rather than from here, --fields printing "Comma-Separated columns to show" and --timeout printing "Per-Request timeout". They need an upstream change and are out of scope for this issue.

Done when

  • no flag in the tree prints a first word that was not written that way
  • --engine and --subset print the values they accept
  • a test fails on a new one, covering both ways a flag is declared here, the pflag call and the kit help tag
  • the two any-cli flags are written down as upstream

Activity

  1. added this to the v0.10.1 milestone on Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cliCommand surface, flags, configpriority: P3Durability and polishtype: bugSomething is wrong

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions