Skip to content

docs(readme): restructure CLI section; voice polish#3

Merged
ob-aion merged 4 commits into
mainfrom
chore/readme-cli-and-voice
May 21, 2026
Merged

docs(readme): restructure CLI section; voice polish#3
ob-aion merged 4 commits into
mainfrom
chore/readme-cli-and-voice

Conversation

@ob-aion

@ob-aion ob-aion commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Promote the CLI section to the same <details><summary><code>signature</code></summary> pattern used by clean(input, options?) in ## API. Every flag now has its own row with type, default, and a one-line description. Arguments, Options, Exit codes, and Examples are split into four explicit tables.
  • Reorganize the section tree:
    • ## Install absorbs the CLI install methods (npx, pnpm add -g) alongside the four package-manager add commands. Single place for "how to get it".
    • ## Usage shrinks to a quick start: one minimal programmatic example, one minimal npx invocation.
    • ## Why this exists stays.
    • ## CLI (after Why this exists) is now pure reference — just the <details> block.
    • ## API unchanged.
  • Two tweaks in the Why this exists paragraph:
    • but they upload your filethen upload the bytes.
    • runs the same strips locally on a single dependency (...), opens no network connections, and writes no telemetryruns the same strips in-process on a single dependency (...). No network calls, no telemetry.

Test plan

  • PR CI green (preflight, gitleaks, dependency-review, osv-scanner; publish skipped on PR).
  • Eyeball the rendered README on the PR page — <details> expands, the four tables in ## CLI render, the Contents anchors all resolve.

ob-aion added 4 commits May 21, 2026 15:06
The CLI section listed flags inline in a comment block. Promote it
to the same `<details><summary><code>signature</code></summary>`
pattern used by `clean(input, options?)` in the API section, with
explicit Arguments / Options / Exit codes / Examples tables. Every
flag now has its own row with type, default, and a one-line
description. The previous `Common forms` examples are preserved.

Two voice fixes in the `Why this exists` paragraph:

- "but they upload your file" → "then upload the bytes" — drops
  second-person addressing in favor of third-person institutional
  voice.
- "runs the same strips locally on a single dependency (...), opens
  no network connections, and writes no telemetry" → "runs the same
  strips in-process on a single dependency (...). No network calls,
  no telemetry." — collapses the three-item conjunction.
Per review: the CLI deserves its own top-level section instead of
sitting nested under `## Usage` alongside the library example. Move
the `<details><summary><code>pdf-cleaner &lt;input&gt; [options]</code></summary>`
block plus the npx + global-install snippets out to a fresh `## CLI`
section that follows `## Why this exists`. `## Usage` now holds only
the library import + try/catch example, parallel to other Coroboros
packages that ship a library and no CLI.

Switch the global-install snippet from `npm install -g` to
`pnpm add -g` to match the package manager used throughout the
rest of the README.

Add `CLI` to the Contents TOC.
`## Usage` now sits as a quick-start: one minimal programmatic
example and one minimal CLI invocation, labeled with bold rather
than H3 subheaders. The H3s avoided an anchor collision with the
full `## CLI` section below (both would have rendered to `#cli`,
sending the Contents TOC to the wrong place).

Full library reference stays in `## API` (Types, Cleaning, Errors).
Full CLI reference stays in `## CLI` (the `<details>` block with
args, options, exit codes, and examples).

Drop the redundant ESM and CommonJS one-liners that lived in the
old Usage block — the `import` line in the quick-start example
already shows the ESM form, and Install lists the package manager
commands.
…e reference

Install now splits **As a library** (four package-manager add
commands) from **As a CLI** (the npx run-without-install and the
`pnpm add -g` global install). All ways to get the package end up
in one place.

`## CLI` becomes a pure reference section: only the
`<details><summary><code>pdf-cleaner &lt;input&gt; [options]</code></summary>`
block with arguments, options, exit codes, and examples. No more
install snippets repeating what Install already covers.

Section roles are now cleanly separated: Install = how to get it,
Usage = quick start with one example of each form, CLI = full
command-line reference, API = full library reference.
@ob-aion ob-aion merged commit 466dede into main May 21, 2026
5 checks passed
@ob-aion ob-aion deleted the chore/readme-cli-and-voice branch May 21, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant