Guide for contributing to TanStack CLI.
If you have questions about implementation details, help or support, please use our dedicated community forum at GitHub Discussions. Issues opened for questions will be closed and redirected to the forum.
If you have found what you think is a bug, please file an issue. Issues identified as implementation questions or non-issues will be closed and redirected to GitHub Discussions.
To suggest a feature, first create an issue if it doesn't already exist. We'll discuss use-cases and then how it could be implemented.
- Node.js 18+
- pnpm 8+
git clone https://github.com/TanStack/cli.git
cd cli
pnpm install# Build the CLI package
pnpm build:cli
# Or watch mode
cd packages/cli && pnpm build --watch# Type checking
pnpm test:types
# Unit tests
pnpm test:lib
# All tests
pnpm testcli/
├── packages/cli/ # Main CLI package (@tanstack/cli)
│ ├── src/
│ │ ├── bin.ts # CLI entry point
│ │ ├── api/ # Integration fetching
│ │ ├── commands/ # CLI commands
│ │ ├── engine/ # Compilation engine
│ │ └── templates/ # Base templates
│ └── package.json
│
├── integrations/ # Integration definitions
│ ├── manifest.json # Integration catalog
│ └── {id}/ # Individual integrations
│
└── docs/ # Documentation
Before proceeding with development, ensure you match one of the following criteria:
- Fixing a small bug
- Fixing a larger issue that has been previously discussed and agreed-upon by maintainers
- Adding a new feature that has been previously discussed and agreed-upon by maintainers
# Build the CLI
cd packages/cli && pnpm build
# Run directly
node dist/bin.mjs create test-app
# Or link globally
pnpm link --global
tanstack create test-app# Use the integrations/ folder directly
tanstack create test-app --integrations-path ./integrations
# Or test a specific integration
tanstack create test-app --integrations my-integration --integrations-path ./integrations# Start in stdio mode
node packages/cli/dist/bin.mjs mcp
# Start in SSE mode
node packages/cli/dist/bin.mjs mcp --sse --port 3000- Create the integration folder:
mkdir -p integrations/my-integration/assets/src/integrations/my-feature- Create
info.json:
{
"name": "My Integration",
"description": "What it does",
"type": "integration",
"phase": "integration",
"category": "tooling",
"modes": ["file-router"]
}-
Add asset files to
assets/ -
Add dependencies to
package.json(optional) -
Update
integrations/manifest.json:
{
"integrations": [
{
"id": "my-integration",
"name": "My Integration",
"description": "What it does",
"type": "integration",
"category": "tooling",
"modes": ["file-router"],
"dependsOn": [],
"conflicts": [],
"hasOptions": false
}
]
}- Test:
tanstack create test-app --integrations my-integration --integrations-path ./integrations- TypeScript strict mode
- ESLint + Prettier
- No
anytypes (useunknownand narrow) - Prefer functional patterns
pnpm formatpnpm test:eslint- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run tests:
pnpm test - Document your changes in the appropriate documentation markdown pages
- Create a changeset for your changes:
pnpm changeset - Commit and push
- Open a pull request
- Tests pass (
pnpm test) - Types check (
pnpm test:types) - Lint passes (
pnpm test:eslint) - Documentation updated (if needed)
- Changeset added (if user-facing change)
For user-facing changes, create a changeset:
pnpm changesetSelect the packages affected and describe the change.
- GitHub Discussions - Questions and ideas
- GitHub Issues - Bug reports
- Discord - Real-time chat