Open History to see the last commit
Contributing#
Setup#
gh repo clone TanStack/cli
cd cli
pnpm install
pnpm build
Development#
pnpm dev # Build and watch all packages
Testing the CLI#
Run from a peer directory (not inside the monorepo):
# Create an app
node ../cli/packages/cli/dist/index.js create my-app
# With specific package manager
npm_config_user_agent=pnpm node ../cli/packages/cli/dist/index.js create my-app
# With local add-on
node ../cli/packages/cli/dist/index.js create my-app --add-ons http://localhost:9080/info.json
Testing Add-ons Locally#
# In your add-on directory
npx serve .add-on -l 9080
# Create app with local add-on
node ../cli/packages/cli/dist/index.js create my-app --add-ons http://localhost:9080/info.json
Testing Templates Locally#
# In your template directory
npx serve .template -l 9080
# Create app with local template
node ../cli/packages/cli/dist/index.js create my-app --template http://localhost:9080/template.json
Dev Mode#
Create a sandbox app, watch built-in framework templates/add-ons, and run the sandbox dev server:
rm -rf test-app && node packages/cli/dist/index.js dev \
test-app --framework React --add-ons shadcn
The legacy create --dev-watch <path> flow still works for direct watch path control.
Submitting Changes#
- Run tests:
pnpm test - Run build:
pnpm build - Create a PR with a clear description
Project Structure#
packages/
├── cli/ # @tanstack/cli - CLI commands
├── create/ # @tanstack/create - Engine + frameworks
Useful Scripts#
pnpm build # Build all packages
pnpm test # Run tests
pnpm dev # Watch mode
pnpm cleanNodeModules # Clean all node_modules