Matthew A. Cottrell

Work / 10 · CLI framework

ClassicCottrell CLI

A reusable CLI framework so every new tool starts branded, not blank.

Role
Design and build
Year
2026
Status
Private repo
Stack
Python
Numbers
3 bundled apps · 1 shipped product
Links
Private repository
Product box for the Photo Curation Skill v1: a white box with a black spine, a green aperture logo, a large orange v1 with an AI-powered badge, and the line Photo Curation Skill, Provider-Neutral Real Estate Photo Selection.
Fig. 1 · Photo Curator CLI, the first shipped product on the framework.

Every new internal tool started the same way: a blank argparse script, a copy-pasted color function, a welcome message written once and never touched again. The branding lived in whichever script wrote it last.

ClassicCottrell CLI is the fix: subclass a Brand, register a few commands, and every tool that ships gets the same welcome page, the same terminal styling, and the same fallback behavior for free.

What it is

One framework, three fields to brand it:

  • Brand once, in three fields. Subclass Brand with a name, tagline, and hex accent, and every command inherits a welcome page, an ASCII-rendered logo, and a branded first-run splash. No copy-paste between projects.
  • Terminal color that actually degrades. The success/warning/error/info helpers detect truecolor, 256-color, or 16-color terminals automatically, fall back to plain text under NO_COLOR or a pipe, and never assume a capability that isn't there.
  • Three bundled apps prove the framework holds up. ccasset (responsive image variants and blurhash), ccsync (frontmatter validation and content indexing), and cctokens (CSS custom-property extraction) each ship in roughly 80 to 145 lines because the framework does the heavy lifting, not the app.

The UX thinking

  • A first run should look considered, not empty. Every tool built on the framework gets the same branded welcome page and splash banner by default, so “we didn’t have time for onboarding” stops being the default outcome.
  • Degrade honestly instead of assuming a terminal. Color support is detected, not assumed, so the same command reads correctly whether it's a modern terminal, an old one, or a log file redirected to disk.
  • White-labeling should never require a fork. Every brand token overrides through an env var prefix at runtime, so the same framework ships five differently branded tools without five copies of the code.

Photo Curator CLI: a real product on the framework

The framework needed proof it could carry a shipped product, not just internal tools. Photo Curator CLI is that proof:

  • Automated shortlisting, not manual triage. Point it at a shoot folder and it scores every frame, then ranks a keep/reject shortlist automatically — the first pass done for you, fast, instead of scrubbing hundreds of near-duplicates by eye.
  • Thresholds you set, not a black box. Keep/reject cutoffs are configurable, so the tool's judgment stays tunable to how strict a pass you actually want.
  • Built on the same branded shell as everything else. It ships as a command-line tool on the Classic Cottrell CLI toolkit, so it inherits the same welcome page, terminal styling, and fallback behavior as ccasset, ccsync, and cctokens for free.

The measure of a framework isn't the first tool built on it, it's the fifth. Three internal apps and one shipped product in, the pattern's held: brand a class, register a command, ship.