Skip to content
abhineet-saha
Profound work log

May 2026 · Profound

A scaffolding CLI that only scaffolded one framework

Making 'framework-agnostic' true at the point a developer first types a command.

create-profound-app is a published npm CLI that scaffolds an app pre-wired to the CMS. I did not create it and I do not maintain it — a colleague owns roughly three quarters of it. I contributed one feature, and it is the one that made the tool stop contradicting the product.

The contradiction

We told people the renderer was framework-agnostic. The CLI produced Next.js apps and nothing else. That is the first thing a developer touches, so whatever it does is what they believe.

What I built

  • Restructured the template tree into per-framework namespaces, so adding a third framework is additive rather than a rewrite of the CLI.
  • A three-tier framework resolution layer: an explicit --framework flag, else inference from which of the three published binaries invoked the process, else an interactive prompt.
  • TanStack Start as the second target, including wiring its splat routing to the CMS's parametric route helper.

The fiddly part

Binary-name inference. The package ships three bins, so running create-profound-tanstack has already answered the framework question and prompting again is rude. Working out how you were invoked is annoying because npm and bun expose that differently, so the CLI checks several sources. Flag coverage also has to be complete, or the tool hangs on a prompt in CI.

What I'd do differently

I shipped it without tests. The resolution logic branches across flags, binary names and two template registries — precisely the shape unit tests exist for. I hold a much higher bar in product code and I applied a lower one here because it was 'just tooling'. That was not a good reason.