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

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 carries the shared parts.
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 as well as internal tools. Photo Curator CLI is that proof:
- Automated shortlisting, not manual triage. Point it at a shoot folder and it scores every frame and ranks a keep/reject shortlist, so the first pass is done before you’d have finished scrubbing through the near-duplicates by eye.
- Thresholds you set, not a black box. Keep/reject cutoffs are configurable, so you decide how strict the pass is.
- Built on the same branded shell as everything else. It ships as a command-line tool on ClassicCottrell CLI, so it inherits the same welcome page, terminal styling, and fallback behavior as ccasset, ccsync, and cctokens for free.
The first tool built on a framework proves little; the fifth is the real test. Three internal apps and one shipped product in, the pattern’s held: brand a class, register a command, ship.