thomasballinger's gut answers to TanStack Start CLI Questions:
should vinxi deployment targets be include in the CLI?
No, can't you build the same project multiple ways? I want to say no unless generating code specific to one of them.
what would the default deployment target be? @tannerlinsley you should probably answer this one
should we allow people to not use typescript?
No! Choice like that is expensive when multiplied over the other options.
I think if typescript is chosen the strictness should be set as it's important to the router - is that correct?
Yeah, choose good defaults — I don't want to worry about this.
should we allow for the option to choose between file based and code based routing?
my gut it no, file-based is suggested right? If I'm using code I'm fine writing a little more code
should non tanstack-start package versions in templates be automatically kept up to date?
Seems like yes, but do you mean Renovate should update them less frequently? Is there an alternative?
which CLI tool should be used? I like strict-cli - it is typesafe and feels like a logical choice for the tanstack stack
never used it, sounds fine
should the CLI allow for choosing the version of tanstack router / start to install? I think if the answer is yes then it should only be for a very basic template
no, latest stable once that exists. Devs can add flag someday for using alpha builds, or for linking to packages in the monorepo.
Implementation:
for prompts - @inquirer/prompts for cli - currently undecided. Question above ^^^^ General
usage npx create tanstack@latest add documentation to website All prompts will have an associated CLI flag so you can run the CLI without being prompted Theme to match tanstack colors ascii palm tree and TANSTACK logo with gradient at top - animate it appearing. Will be nice to share on X shows the current version of the CLI at the top detects package manager being used and uses it for install step after the final step in the prompts, visuall indicate each of the steps being completed as they're done (creating folder, adding template, installing dependencies etc) Prompt Order: directory template typescript
suggestion: skip
typescript strictness
suggestion: skip
install dependencies git update to github workflow to run tests templates should have the versions updated as router / start is updated Tests
e2e: templates should include their own tests to ensure they're working correctly when a new version is deployed unit tests Flags
--hide-logo -l - hides the logo
What's this for, CI logs? I'd skip
--silent -s - runs the cli without prompting - accepts any Y/N questoins automatically
is this usually --yes -y? --silent sounds like not printing logs
--install-dependencies -i - installs the dependencies after folder created
I'd reverse this (--no-install-dependencies) and make it the default
--initiate-git -g - initiates git
I'd reverse this (--no-initialize-git) and make it the default and s/initiate/initialize/
Flags / Prompts
directory First positional arugment in CLI Prompt Where should the project be installed? Default - two random words put together
I'd default to my-app, and offer to overwrite the directory if it already exists
Validations folder doesn't exist kebab case more than one character lower case first character is alpha Is used as the name for the project in the package.json deployment target Flag: --deployment-target -d Prompt: Deployment Target: select from list - default undecided sets the deployment target in the app.config.ts Tailwind when on - adds tailwind with postcss Flag: --tailwind -t Prompt: Tailwind: Yes / No templates need to account for tailwind being on or off Template Flag: --template -t Prompt: Template - select from list. Defaults to starter (a simple example using tailwind to showcase some features) Validations template-name must exist when using flag Inital Templates
empty - bare bones template with an empty index route sample - has some sample files to see how tanstack works
Agree on most things - here's my disagreements and why