stackpack-cli 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +148 -0
- package/dist/cli.js +8 -0
- package/dist/program-D9mgsLIa.js +4702 -0
- package/package.json +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 StackPack contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# StackPack
|
|
2
|
+
|
|
3
|
+
**A local-first, privacy-focused, terminal-based integration builder for JavaScript and TypeScript projects.**
|
|
4
|
+
|
|
5
|
+
Official tooling first · Real-world integrations · Presets stay on your device
|
|
6
|
+
|
|
7
|
+
[](https://github.com/espinajc2004-max/StackPack/actions/workflows/ci.yml)
|
|
8
|
+
[](https://www.npmjs.com/package/stackpack-cli)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Quick start
|
|
15
|
+
|
|
16
|
+
Run it anywhere, no install needed:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx stackpack-cli
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or install it once and use `stackpack` as a system-wide command:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g stackpack-cli
|
|
26
|
+
stackpack
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
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.
|
|
30
|
+
|
|
31
|
+
## How it works
|
|
32
|
+
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Run StackPack
|
|
37
|
+
→ Choose project type and language
|
|
38
|
+
→ Official creator runs
|
|
39
|
+
→ StackPack inspects what was actually generated
|
|
40
|
+
→ Jump between integration categories
|
|
41
|
+
→ Review the full plan
|
|
42
|
+
→ Install with official methods
|
|
43
|
+
→ Verify
|
|
44
|
+
→ Optionally save the setup as a local preset
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Official-first installation policy
|
|
48
|
+
|
|
49
|
+
Every integration uses the most official installation method available, in this priority order:
|
|
50
|
+
|
|
51
|
+
1. **Official project creator** — e.g. `create-vite`, `create-next-app`. StackPack never recreates official templates by hand.
|
|
52
|
+
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.
|
|
53
|
+
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`).
|
|
54
|
+
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.
|
|
55
|
+
|
|
56
|
+
## Supported base creators
|
|
57
|
+
|
|
58
|
+
- React with Vite (official `create-vite`)
|
|
59
|
+
- Next.js (official `create-next-app`)
|
|
60
|
+
|
|
61
|
+
Existing React + Vite and Next.js projects are detected too (`stackpack add`, `stackpack scan`).
|
|
62
|
+
|
|
63
|
+
## Curated integrations
|
|
64
|
+
|
|
65
|
+
| Category | Integration | Method |
|
|
66
|
+
| -------------------- | ------------------------------------------------- | ----------------- |
|
|
67
|
+
| Routing | React Router (React + Vite only) | package install |
|
|
68
|
+
| State Management | Zustand | package install |
|
|
69
|
+
| State Management | Redux Toolkit (+ optional store files) | package install |
|
|
70
|
+
| State Management | Jotai, MobX, Valtio, XState | install only |
|
|
71
|
+
| Data Fetching | TanStack Query (+ optional Devtools) | package install |
|
|
72
|
+
| Data Fetching | Axios | install only |
|
|
73
|
+
| Forms and Validation | React Hook Form with Zod | package install |
|
|
74
|
+
| Forms and Validation | Valibot, ArkType | install only |
|
|
75
|
+
| UI Components | shadcn/ui (Tailwind + alias setup on Vite) | official CLI |
|
|
76
|
+
| UI Components | Radix UI, Base UI, React Aria | package install |
|
|
77
|
+
| Database / ORM | Prisma, Drizzle ORM, TypeORM, Sequelize, MikroORM | install only |
|
|
78
|
+
| Testing | Vitest with React Testing Library | packages + config |
|
|
79
|
+
| Testing | Playwright | official init CLI |
|
|
80
|
+
|
|
81
|
+
"Install only" means StackPack installs the official packages and stops — you write the setup files yourself, and the review says so explicitly.
|
|
82
|
+
|
|
83
|
+
Plus custom npm packages (installed only, never auto-configured). Custom packages you type in are remembered locally so future setups can re-add them in one step.
|
|
84
|
+
|
|
85
|
+
Framework-specific filtering applies automatically — e.g. React Router is hidden on Next.js projects because Next.js provides routing.
|
|
86
|
+
|
|
87
|
+
## Commands
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
stackpack # interactive main menu
|
|
91
|
+
stackpack new <project-name> # create a project with an official creator
|
|
92
|
+
stackpack new my-app --preset jc-react-stack
|
|
93
|
+
stackpack add # add integrations to the current project
|
|
94
|
+
stackpack add --dry-run # full plan, zero changes
|
|
95
|
+
stackpack add --package-manager pnpm
|
|
96
|
+
stackpack scan # detect stack + installed integrations
|
|
97
|
+
stackpack save <name> [--local|--global]
|
|
98
|
+
stackpack apply <name> [--dry-run] # apply a preset to the current project
|
|
99
|
+
stackpack presets list
|
|
100
|
+
stackpack presets show <name>
|
|
101
|
+
stackpack presets delete <name>
|
|
102
|
+
stackpack --no-color
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## The dashboard
|
|
106
|
+
|
|
107
|
+
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.
|
|
108
|
+
|
|
109
|
+
## Privacy model
|
|
110
|
+
|
|
111
|
+
StackPack requires **no sign-up, no login, no server, no telemetry**. Presets are plain JSON stored on your device:
|
|
112
|
+
|
|
113
|
+
- Global: `~/.stackpack/presets/<name>.json`
|
|
114
|
+
- Project-local (committable): `<project>/.stackpack/<name>.json`
|
|
115
|
+
|
|
116
|
+
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.
|
|
117
|
+
|
|
118
|
+
## Safety
|
|
119
|
+
|
|
120
|
+
- Nothing is installed before you confirm the reviewed plan.
|
|
121
|
+
- Backups of files StackPack will modify go to `<project>/.stackpack/backups/<operation-id>/` before any change.
|
|
122
|
+
- Existing files and `package.json` scripts are never silently overwritten — you choose keep/replace/rename per conflict.
|
|
123
|
+
- `package.json` edits use structured JSONC editing, not string replacement.
|
|
124
|
+
- All generated paths are checked to stay inside the project root.
|
|
125
|
+
- Commands run without a shell; executable and arguments are always passed separately.
|
|
126
|
+
- Uncommitted Git changes trigger a warning first (Git itself is optional).
|
|
127
|
+
|
|
128
|
+
## Limitations
|
|
129
|
+
|
|
130
|
+
- Curated recipes cover React + Vite and Next.js only.
|
|
131
|
+
- StackPack cannot predict every file an official initializer creates; the review says so explicitly and the project is rescanned afterwards.
|
|
132
|
+
- Rollback is best effort: backed-up files can be restored, but package-manager changes are not automatically reversed.
|
|
133
|
+
- ORM integrations install dependencies only — schema, config, and driver choices stay in your hands.
|
|
134
|
+
- No auth integrations, no monorepo automation, no cloud sync, no marketplace (by design, for now).
|
|
135
|
+
|
|
136
|
+
## Development
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm install
|
|
140
|
+
npm run dev # run the CLI from source
|
|
141
|
+
npm run check # typecheck + lint + format check + tests + build
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution process.
|
|
145
|
+
|
|
146
|
+
## License
|
|
147
|
+
|
|
148
|
+
[MIT](LICENSE)
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
//#region src/cli.ts
|
|
3
|
+
if (process.argv.includes("--no-color")) process.env.NO_COLOR = "1";
|
|
4
|
+
const { runCli } = await import("./program-D9mgsLIa.js");
|
|
5
|
+
await runCli(process.argv);
|
|
6
|
+
process.exit(process.exitCode ?? 0);
|
|
7
|
+
//#endregion
|
|
8
|
+
export {};
|