Skip to content

feat(create): let you type to filter starter templates - #87

Open
nerdchanii wants to merge 1 commit into
solidjs-community:mainfrom
nerdchanii:feat/fuzzy-template-search
Open

feat(create): let you type to filter starter templates#87
nerdchanii wants to merge 1 commit into
solidjs-community:mainfrom
nerdchanii:feat/fuzzy-template-search

Conversation

@nerdchanii

@nerdchanii nerdchanii commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

The problem

Picking a template meant arrow-keying through a long list. As we've added more starters (with-tailwindcss, with-tanstack-router-file-based, with-authjs, with-strict-csp, ...), finding the one you want takes a fair amount of scrolling, with no way to just type what you're after.

What changed

The template picker is now an autocomplete prompt, so you can type to narrow the list down.

  • Type auth and you get with-auth — normal substring matches work and show up first.
  • Typos and partial input still work: typing wath finds with-auth, since the letters appear in that order.
  • Closer matches sort to the top, so the one you meant is usually the first option.
  • If nothing matches, the prompt shows a short "No matching template." message instead of an empty list.
  • Pressing Tab (which fills the placeholder text into the search box) no longer confuses the filter.
  • The template marked as the default in the templates list is still the one preselected when you just hit Enter.

The matching is a small helper in packages/create/src/utils/fuzzy.ts — no new dependencies. Added tests for the matching/ranking and for how the CLI wires up the prompt.

Note

This wasn't filed as an issue first — it's a small quality-of-life change I put together while using the CLI locally. Happy to adjust the wording or behavior if you'd rather it work differently.

Replace the plain select prompt with autocomplete backed by an
in-order fuzzy matcher, so typing "wath" finds "with-auth" instead
of requiring exact substrings. Reworked against the manifest-based
template list (ManifestTemplate[]) now used on main.
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