Skip to content
Source
Sign inSign up
TanStack/cli

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

Mergedtannerlinsleymerged 3 commits intomain fromrefs/pull/442/headmerged by tannerlinsley

tannerlinsleycommented

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.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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 nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring 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 nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title check✅ PassedThe title directly and clearly summarizes the main change: introducing automatic TanStack Intent installation during the scaffolding process via CLI commands.
      Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes check✅ PassedCheck 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.
    2. tannerlinsley merged this37e83fb

    3. tannerlinsley closed this

Sign in to join this conversation.