Skip to content

Repository files navigation

StackPack

A local-first, privacy-focused, terminal-based integration builder for JavaScript and TypeScript projects.

Official tooling first · Real-world integrations · Presets stay on your device

CI npm version node license: MIT


What's new in 0.3.6

From 0.3.5

  • Scanned presets no longer store the packages shadcn/ui installs for itself: every @radix-ui/* and @base-ui/* package and the styling helpers are left to its CLI, which reinstalls them for whichever component library you pick. A real 84-package project dropped from 68 saved packages to 46.
  • Deselecting shadcn/ui still returns all of those packages to the picker, and a project using them directly, without components.json, is unaffected.
  • Saving a preset now offers the integration dashboard before writing, so a preset can gain integrations the scanned project never had.
  • Installing shadcn/ui now states that component files are never carried over, and names third-party registries as a separate case.
  • Fixed a setup that could not be finished when no integrations were selected; a plain Vite or Next.js project now completes normally.
  • Saving from the menu now checks the project before asking for a preset name and a location, instead of failing after both answers were given.

See the changelog for complete details.

From 0.3.4

  • Improved project dependency scanning when creating presets.
  • Choose which detected integrations and dependencies are saved instead of automatically including everything.
  • Custom npm dependencies are preserved when saving and reusing presets.
  • Clearer Additional npm Packages guidance during project creation.
  • Added expanded stackpack --help output with available commands and common workflows.
  • Improved handling of generated UI dependencies such as individual Radix packages.
  • Added automatic retries for interrupted npm installations caused by transient network failures.
  • Fixed post-install verification so incomplete official initializer runs are not reported as successful.
  • Normalized the npm executable path to prevent package publishing warnings.
  • Expanded unit, integration, CLI, release-matrix, and end-to-end test coverage.
  • Verified StackPack against a real Next.js project with a large dependency set.

See the changelog and 0.3.5 release validation for complete details.

Quick start

Run it anywhere, no install needed:

npx stackpack-cli

Or install it once and use stackpack as a system-wide command:

npm install -g stackpack-cli
stackpack

Open a terminal in any folder, type stackpack, and the interactive menu takes it from there — create a project, pick integrations, review the plan, install.

Uninstall

If you installed StackPack globally and no longer want it:

npm uninstall -g stackpack-cli

That removes the stackpack command from your system. (If you only ever used npx stackpack-cli, there is nothing to uninstall — npx leaves nothing installed.)

StackPack also keeps your saved presets in a small local folder. If you want a complete cleanup, delete it too:

# Windows
rmdir /s /q "%USERPROFILE%\.stackpack"

# macOS / Linux
rm -rf ~/.stackpack

Projects you created with StackPack are never touched by uninstalling — they are normal projects that belong entirely to you.

How it works

StackPack creates projects with the official tools (create-vite, create-next-app), then opens a category-based integration dashboard where you pick routing, state management, data fetching, forms, UI components, ORMs, testing, and custom packages. Everything is reviewed as one installation plan before a single package is installed.

Run StackPack
→ Choose project type and language
→ Official creator runs
→ StackPack inspects what was actually generated
→ Jump between integration categories
→ Review the full plan
→ Install with official methods
→ Verify
→ Optionally save the setup as a local preset

Official-first installation policy

Every integration uses the most official installation method available, in this priority order:

  1. Official project creator — e.g. create-vite, create-next-app. StackPack never recreates official templates by hand.
  2. Official initializer CLI — e.g. Playwright's npm init playwright@latest, which runs interactively and controls its own setup. StackPack rescans the project afterwards.
  3. Official documented package installation — e.g. Zustand, Redux Toolkit (@reduxjs/toolkit + react-redux), TanStack Query, React Hook Form with Zod (react-hook-form + zod + @hookform/resolvers).
  4. Package-only installation — for custom packages without a verified recipe. StackPack tells you clearly that no automatic configuration will happen; it never invents configuration from a package name.

Supported base creators

  • React with Vite (official create-vite)
  • Next.js (official create-next-app)

Existing React + Vite and Next.js projects are detected too (stackpack add, stackpack scan).

Curated integrations

Category Integration Method
Routing React Router (React + Vite only) package install
State Management Zustand package install
State Management Redux Toolkit (+ optional store files) package install
State Management Jotai, MobX, Valtio, XState install only
Data Fetching TanStack Query (+ optional Devtools) package install
Data Fetching Axios install only
Forms and Validation React Hook Form with Zod package install
Forms and Validation Valibot, ArkType install only
UI Components shadcn/ui (Tailwind + alias setup on Vite) official CLI
UI Components Radix UI, Base UI, React Aria package install
Database / ORM Prisma, Drizzle ORM, TypeORM, Sequelize, MikroORM install only
Testing Vitest with React Testing Library packages + config
Testing Playwright official init CLI

"Install only" means StackPack installs the official packages and stops — you write the setup files yourself, and the review says so explicitly.

The Additional npm Packages category accepts any valid npm package that is not covered by StackPack's curated integrations. Enter a package name such as nanoid, a versioned package such as lodash@^4.17.21, or a scoped package. Choose whether it belongs in dependencies or devDependencies. It appears in the final review, installs with the project, is included when the setup is saved as a preset, and is restored when that preset creates another project. These packages are install-only; StackPack does not invent configuration files for unknown packages.

Framework-specific filtering applies automatically — e.g. React Router is hidden on Next.js projects because Next.js provides routing.

Commands

stackpack                          # interactive main menu
stackpack new <project-name>       # create a project with an official creator
stackpack new my-app --preset jc-react-stack
stackpack install <preset> [name]  # express mode: whole stack in one shot
stackpack i <preset> [name]        # same, shorter
stackpack add                      # add integrations to the current project
stackpack add --dry-run            # full plan, zero changes
stackpack add --package-manager pnpm
stackpack scan                     # detect stack + installed integrations
stackpack save <name> [--local|--global]
stackpack save <name> --all-packages       # keep every portable dependency
stackpack save <name> --integrations-only  # omit all other dependencies
stackpack save <name> --exclude-integration shadcn
stackpack apply <name> [--dry-run] # apply a preset to the current project
stackpack presets list
stackpack presets show <name>
stackpack presets edit <name>      # swap integrations, save back — no project touched
stackpack presets delete <name>
stackpack --no-color

Run stackpack --help to see a compact set of ready-to-copy workflows without opening this documentation. Use stackpack <command> --help for the valid arguments and options of one command.

The dashboard

After the base project exists, StackPack does not walk you through a fixed wizard. It opens a jumpable dashboard: enter any category, select or remove an integration, come back later, edit versions, and review only when you are ready. Selections persist in memory until you install or cancel. Pressing Esc inside a category goes back one screen without losing your selections; only Esc at the dashboard itself cancels the setup.

When saving a scanned project as a preset, StackPack first lets you choose the recognized integrations, then lets you choose the other runtime and development packages to include, and finally offers the dashboard so the preset can gain integrations the scanned project never had. Use --all-packages to keep every portable dependency without a prompt, --integrations-only to omit every other package, or --exclude-integration <id...> for a repeatable integration exclusion.

Packages an official CLI installs for itself are left out of the preset entirely. With shadcn/ui selected, that covers every @radix-ui/* and @base-ui/* package and the styling helpers: shadcn init reinstalls them, and which primitive library they come from is decided by the CLI's own question at install time, not by the preset. Deselecting shadcn/ui returns them all to the package picker, and a project using those packages directly — without components.json — is never affected.

Component files themselves never travel in a preset. A new project gets the Button that shadcn init creates; the rest are restored with npx shadcn@latest add <component>, and components from third-party registries such as Magic UI have to be re-added from their own registry.

Privacy model

StackPack requires no sign-up, no login, no server, no telemetry. Presets are plain JSON stored on your device:

  • Global: ~/.stackpack/presets/<name>.json
  • Project-local (committable): <project>/.stackpack/<name>.json

Presets never contain shell commands, executable code, absolute paths, credentials, or .env values — the schema rejects anything unexpected. Internet access is only needed to run official creators/initializers and install packages.

One small exception, in the open: the interactive menu checks the npm registry (at most once per day, cached locally) to tell you when a newer StackPack version exists. It is an anonymous read-only request that sends nothing about you or your projects, never updates anything by itself, fails silently offline, and can be disabled completely by setting the STACKPACK_NO_UPDATE_CHECK environment variable.

Safety

  • Nothing is installed before you confirm the reviewed plan.
  • Backups of files StackPack will modify go to <project>/.stackpack/backups/<operation-id>/ before any change.
  • Existing files and package.json scripts are never silently overwritten — you choose keep/replace/rename per conflict.
  • package.json edits use structured JSONC editing, not string replacement.
  • All generated paths are checked to stay inside the project root.
  • Commands run without a shell; executable and arguments are always passed separately.
  • Uncommitted Git changes trigger a warning first (Git itself is optional).

Limitations

  • Curated recipes cover React + Vite and Next.js only.
  • StackPack cannot predict every file an official initializer creates; the review says so explicitly and the project is rescanned afterwards.
  • Rollback is best effort: backed-up files can be restored, but package-manager changes are not automatically reversed.
  • ORM integrations install dependencies only — schema, config, and driver choices stay in your hands.
  • No auth integrations, no monorepo automation, no cloud sync, no marketplace (by design, for now).

Development

npm install
npm run dev          # run the CLI from source
npm run check        # typecheck + lint + format check + tests + build

See CONTRIBUTING.md for the contribution process.

For network-install failures and details about how full-project scans become presets, see Troubleshooting installs and project scans. The complete real-project and automated release test record for this version is available in StackPack 0.3.5 release validation.

License

MIT

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages