Skip to content

feat(cli): auto-install TanStack Intent during scaffolding#442

Merged
tannerlinsley merged 3 commits intomainfrom
claude/add-tanstack-intent-cli-gJkqJ
May 1, 2026
Merged

feat(cli): auto-install TanStack Intent during scaffolding#442
tannerlinsley merged 3 commits intomainfrom
claude/add-tanstack-intent-cli-gJkqJ

Conversation

@tannerlinsley
Copy link
Copy Markdown
Member

@tannerlinsley tannerlinsley commented May 1, 2026

Summary

  • Adds a new --intent / --no-intent flag (default on) to tanstack create and tanstack add
  • After dependencies install, the CLI runs npx @tanstack/intent install via the project's package manager so coding agents get skill mappings out of the box
  • Choice is persisted to .cta.json so subsequent add invocations honor the original setting; failures surface as warnings instead of aborting the scaffold
  • Dev-watch sandbox runs are forced to intent: false

Test plan

  • pnpm build succeeds across all packages
  • pnpm test:unit — 278 unit tests pass (84 in @tanstack/cli, 194 in @tanstack/create)
  • Manual tanstack create my-app (default) writes AGENTS.md with the <!-- intent-skills:start --> block and persists intent: true
  • Manual tanstack create my-app --no-intent skips the step and persists intent: false
  • Manual tanstack add tanstack-query --intent --forced sets up intent on an existing project
  • Manual tanstack add tanstack-query --no-intent --forced skips it
  • CI green

https://claude.ai/code/session_01KZU2LM3E8hncoXxZguUu8P


Generated by Claude Code

Summary by CodeRabbit

Release Notes

  • New Features
    • Added --intent / --no-intent flags to the create and add commands to control automatic TanStack Intent setup (enabled by default).
    • Auto-executes npx @tanstack/intent install after dependencies are installed.
    • Saves your intent preference to configuration for future commands.
    • Intent installation failures now emit warnings instead of blocking the scaffolding process.

claude added 3 commits April 30, 2026 21:57
Run `npx @tanstack/intent install` after `tanstack create` and
`tanstack add`, gated by a new `--intent` / `--no-intent` flag (default
on). Failures are reported as warnings so they don't block scaffolding.

https://claude.ai/code/session_01KZU2LM3E8hncoXxZguUu8P
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Introduces automatic TanStack Intent installation during tanstack create and tanstack add operations via new --intent/--no-intent CLI flags (enabled by default), persisting user preference to .cta.json for consistency across subsequent commands, with intent setup failures surfaced as warnings rather than aborting the scaffolding process.

Changes

Cohort / File(s) Summary
Type Definitions
packages/cli/src/types.ts, packages/create/src/types.ts
Added optional intent: boolean field to CliOptions interface and required intent: boolean field to Options interface.
CLI Configuration & Telemetry
packages/cli/src/cli.ts, packages/cli/src/command-line.ts
Introduced --intent/--no-intent CLI flags for create and add commands; extended telemetry payloads with intent field; normalized options to default intent to true.
Core Scaffolding Flows
packages/create/src/create-app.ts, packages/create/src/add-to-app.ts
Integrated setupIntent invocation into post-dependency-install workflows; added optional intent override to addToApp function signature.
Intent Integration Implementation
packages/create/src/integrations/intent.ts
New setupIntent handler that conditionally executes intent package installation via package manager, converting installation failures to warnings with recovery instructions.
Option Persistence
packages/create/src/custom-add-ons/shared.ts
Updated option serialization functions to persist intent field with false default when absent from stored configuration.
Development Mode
packages/cli/src/dev-watch.ts
Dev watch manager now passes intent: false when instantiating app creation in development scenarios.
Release Documentation
.changeset/intent-auto-install.md
Changeset documenting new automatic intent installation feature and CLI option behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 ✨ Intent flows through commands with care,
Auto-installed with flags to spare,
Settings saved in JSON's keep,
Through create and add, preferences run deep!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: introducing automatic TanStack Intent installation during the scaffolding process via CLI commands.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/add-tanstack-intent-cli-gJkqJ

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@tannerlinsley tannerlinsley merged commit 37e83fb into main May 1, 2026
3 of 4 checks passed
@tannerlinsley tannerlinsley deleted the claude/add-tanstack-intent-cli-gJkqJ branch May 1, 2026 19:04
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.

2 participants