@growthub/cli 0.3.42 → 0.3.43

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.
Files changed (23) hide show
  1. package/README.md +87 -220
  2. package/assets/shared-templates/ad-formats/INDEX.md +94 -0
  3. package/assets/shared-templates/ad-formats/bedroom-minimic-talk.md +197 -0
  4. package/assets/shared-templates/ad-formats/frame-analysis.md +209 -0
  5. package/assets/shared-templates/ad-formats/process-specialist-medical.md +105 -0
  6. package/assets/shared-templates/ad-formats/villain-animation.md +183 -0
  7. package/assets/shared-templates/manifest.json +23 -0
  8. package/assets/shared-templates/scene-modules/INDEX.md +151 -0
  9. package/assets/shared-templates/scene-modules/body/before-after-flatlay.md +143 -0
  10. package/assets/shared-templates/scene-modules/body/minimic-problem.md +109 -0
  11. package/assets/shared-templates/scene-modules/body/product-demo-glow.md +123 -0
  12. package/assets/shared-templates/scene-modules/body/tiktok-skeptic-pivot.md +119 -0
  13. package/assets/shared-templates/scene-modules/body/villain-agitation.md +156 -0
  14. package/assets/shared-templates/scene-modules/cta/bogo-meme-bookend.md +144 -0
  15. package/assets/shared-templates/scene-modules/cta/guarantee-close.md +143 -0
  16. package/assets/shared-templates/scene-modules/hooks/dollar-amount.md +105 -0
  17. package/assets/shared-templates/scene-modules/hooks/meme-overlay.md +104 -0
  18. package/assets/shared-templates/scene-modules/hooks/pov-confession.md +92 -0
  19. package/assets/shared-templates/scene-modules/hooks/tiktok-comment.md +116 -0
  20. package/assets/shared-templates/scene-modules/hooks/villain-hook.md +134 -0
  21. package/dist/index.js +2606 -600
  22. package/package.json +1 -1
  23. package/dist/index.js.map +0 -7
package/README.md CHANGED
@@ -1,287 +1,154 @@
1
- # growthub-core — Agent Swarm Command Center
1
+ # @growthub/cli
2
2
 
3
- > Growthub is a full-featured DX platform for orchestrating AI agent swarms across sequential ticket pipelines.
3
+ `@growthub/cli` is the published CLI for Growthub Local. It covers three shipped workflows:
4
4
 
5
- ---
5
+ - full local app discovery and onboarding
6
+ - worker kit discovery, export, inspection, and validation
7
+ - shared template discovery and extraction
6
8
 
7
9
  ## Install
8
10
 
9
11
  ```bash
10
- npx create-growthub-local --profile dx
12
+ npm install -g @growthub/cli
13
+ ```
14
+
15
+ You can also install through the guided installer:
16
+
17
+ ```bash
18
+ npx create-growthub-local
11
19
  ```
12
20
 
13
- Later:
21
+ Or jump directly to a profile:
14
22
 
15
23
  ```bash
16
24
  npx create-growthub-local --profile gtm
25
+ npx create-growthub-local --profile dx
17
26
  ```
18
27
 
19
- ## Worker Kits
28
+ ## CLI Editions
20
29
 
21
- Worker kits are frozen, working-directory-ready execution environments for local AI agents.
22
- Each kit bundles prompts, templates, output standards, brand guides, setup scripts, and a
23
- `CLAUDE.md` operator contract — everything an agent needs to run a vertical workflow immediately.
30
+ The current CLI exposes three user-facing editions through `growthub discover` and direct subcommands.
24
31
 
25
- ### Discovery
32
+ ### 1. Full Local App
33
+
34
+ Use this when you want to create or reopen a full Growthub local surface.
26
35
 
27
36
  ```bash
28
- # Interactive browser — family filter → searchable selector → preview → download
29
- growthub kit
37
+ growthub
38
+ growthub discover
39
+ growthub onboard
40
+ growthub run
41
+ ```
30
42
 
31
- # All kits grouped by family with descriptions and inline download commands
32
- growthub kit list
43
+ User flow:
33
44
 
34
- # Filter by family (studio · workflow · operator · ops)
35
- growthub kit list --family studio
36
- growthub kit list --family studio,operator
45
+ 1. Open the discovery hub.
46
+ 2. Choose `Full Local App`.
47
+ 3. Create a new `gtm` or `dx` profile, or load an existing local profile.
48
+ 4. Complete onboarding.
49
+ 5. Start the local server and finish the hosted authentication bridge.
37
50
 
38
- # Machine-readable output for scripting / agent use
39
- growthub kit list --json
51
+ ### 2. Worker Kits
40
52
 
41
- # Official family taxonomy taglines, surfaces, and examples
42
- growthub kit families
43
- ```
53
+ Use this when you want a working-directory-ready environment for an agent.
44
54
 
45
- ### Download
55
+ ### Discovery
46
56
 
47
57
  ```bash
48
- # Interactive (picker if no kit-id given)
49
- growthub kit download
58
+ # Interactive browser type filter → kit selector → actions
59
+ growthub kit
50
60
 
51
- # Fuzzy slug partial IDs resolve automatically
52
- growthub kit download higgsfield # → growthub-open-higgsfield-studio-v1
53
- growthub kit download email # → growthub-email-marketing-v1
54
- growthub kit download studio-v1 # → growthub-open-higgsfield-studio-v1
61
+ # All kits grouped by family with descriptions and inline commands
62
+ growthub kit list
55
63
 
56
- # Full ID
57
- growthub kit download growthub-open-higgsfield-studio-v1
64
+ # Filter by family
65
+ growthub kit list --family studio
66
+ growthub kit list --family studio,operator
58
67
 
59
- # Custom output directory
60
- growthub kit download higgsfield --out ~/my-kits
68
+ # Machine-readable output
69
+ growthub kit list --json
61
70
 
62
- # Skip confirmation prompt (scripting / agent use)
63
- growthub kit download higgsfield --yes
71
+ # Family taxonomy
72
+ growthub kit families
64
73
  ```
65
74
 
66
- ### Inspect & validate
75
+ ### Inspect, download, and validate
67
76
 
68
77
  ```bash
69
- # Pretty manifest output with family badge and required paths
70
- growthub kit inspect higgsfield-studio-v1
71
78
  growthub kit inspect creative-strategist-v1
72
79
  growthub kit inspect growthub-open-higgsfield-studio-v1
73
-
74
- # Raw JSON for scripting
75
80
  growthub kit inspect growthub-email-marketing-v1 --json
76
81
 
77
- # Resolve export folder path without exporting
78
- growthub kit path creative-strategist-v1
79
-
80
- # Validate a kit directory against the schema
81
- growthub kit validate /absolute/path/to/kit
82
- growthub kit validate ~/kits/growthub-open-higgsfield-studio-v1
83
- ```
84
-
85
- ```bash
86
- # Full ID download examples
87
82
  growthub kit download creative-strategist-v1
88
83
  growthub kit download growthub-open-higgsfield-studio-v1
89
- ```
90
-
91
- ### After download
84
+ growthub kit download higgsfield --yes
92
85
 
93
- ```
94
- 1. Point Growthub local Working Directory at the exported folder
95
- (or Claude Code Working Directory as an alternative)
96
- 2. cp .env.example .env → add your API key
97
- 3. bash setup/clone-fork.sh → boot local fork (studio kits only)
98
- 4. Open a new session — the operator agent loads automatically from CLAUDE.md
86
+ growthub kit path creative-strategist-v1
87
+ growthub kit validate /absolute/path/to/kit
99
88
  ```
100
89
 
101
- ### Kit families
90
+ ### After download
102
91
 
103
- | Family | Description | Default surface |
104
- |---|---|---|
105
- | 🎬 **studio** | AI generation studio backed by a local fork | local-fork |
106
- | 🔄 **workflow** | Multi-step pipeline operator across tools or APIs | browser-hosted |
107
- | 🤖 **operator** | Domain vertical specialist — structured deliverables | browser-hosted |
108
- | ⚙️ **ops** | Infrastructure / toolchain operator | local-fork |
92
+ 1. Point Growthub local or your local adapter `Working directory` at the exported folder.
93
+ 2. Add runtime-only environment variables required by the kit.
94
+ 3. Start a new session so the operator contract loads from `CLAUDE.md`.
109
95
 
110
- ### Available kits
96
+ ### Available bundled kits
111
97
 
112
98
  | Kit | Family | Description |
113
99
  |---|---|---|
114
- | `growthub-open-higgsfield-studio-v1` | studio | Open Higgsfield AI visual production (image, video, lip sync, cinema) |
115
- | `growthub-email-marketing-v1` | operator | Brand-aware email campaigns, nurture sequences, and content pillar plans |
116
100
  | `creative-strategist-v1` | workflow | Video creative briefs and campaign strategy |
101
+ | `growthub-email-marketing-v1` | operator | Brand-aware email campaigns, sequences, and campaign planning |
102
+ | `growthub-open-higgsfield-studio-v1` | studio | Open Higgsfield visual production workflows |
117
103
 
118
104
  ### How local adapters use worker kits
119
105
 
120
- Local adapters (Claude Code, Codex, Cursor, Gemini, OpenCode) execute inside the agent
121
- `Working directory` path. Worker kits are designed to plug into that path directly:
122
-
123
- 1. `growthub kit download <id>` — exports the kit as a folder + zip
124
- 2. Point the agent `Working directory` at the exported folder path
125
- 3. The agent reads `CLAUDE.md` on session start and runs the operator workflow automatically
126
-
127
- ### Adding new kits
128
-
129
- Each new kit should be:
130
-
131
- 1. A self-contained kit folder in `cli/assets/worker-kits/`
132
- 2. A `kit.json` manifest (schema v2) with `family`, `frozenAssetPaths`, and `outputStandard`
133
- 3. A bundle manifest in `bundles/`
134
- 4. A catalog entry in `cli/src/kits/catalog.ts`
135
- 5. Validated with `growthub kit validate ./path/to/kit`
136
-
137
- The kit family factory layer (`cli/src/kits/core/factory/`) provides typed `createStudioKitConfig()`,
138
- `createWorkflowKitConfig()`, `createOperatorKitConfig()`, and `createOpsKitConfig()` builders that
139
- assemble a fully validated `ForkAdapterCoreConfig` from a small set of options.
140
-
141
- ## What this is
142
-
143
- **growthub-core** is an opinionated, self-hosted developer experience platform that treats every unit of work as a **Ticket** — a sequential pipeline of stages (planning → execution → review → qa → human) — where each stage is owned by a specific AI agent. Designed for **parallel multi-ticket execution** with real-time agent status, live heartbeat tracking, and full pipeline control from a single command center dashboard.
144
-
145
- ---
146
-
147
- ## Architecture
148
-
149
- ```
150
- ┌──────────────────────────────────────────────────────────┐
151
- │ growthub-core │
152
- │ │
153
- │ ┌───────────────────────────────────────────────────┐ │
154
- │ │ Ticket Command Center (Dashboard) │ │
155
- │ │ Kanban │ List │ Roadmap (Week / Month) │ │
156
- │ └───────────────────────────────────────────────────┘ │
157
- │ │ │
158
- │ ┌──────────┴─────────┐ │
159
- │ │ Ticket TKT-N │ │
160
- │ │ stageOrder[] │ │
161
- │ │ currentStage │ │
162
- │ └──────────┬─────────┘ │
163
- │ │ │
164
- │ ┌──────────────────┼──────────────────┐ │
165
- │ │ │ │ │
166
- │ Planning Execution Review / QA │
167
- │ Agent Codex / Claude / │
168
- │ (pm role) Claude Code Codex │
169
- │ │ │
170
- │ Issues (GRO-NNN) per stage │
171
- │ assigned to specific agents │
172
- │ │
173
- │ ┌───────────────────────────────────────────────────┐ │
174
- │ │ Embedded PostgreSQL (port 54329) │ │
175
- │ │ Drizzle ORM — auto-migration on startup │ │
176
- │ │ TanStack Query + queryKeys registry │ │
177
- │ │ Vite dev middleware + tsx watch hot-reload │ │
178
- │ └───────────────────────────────────────────────────┘ │
179
- └──────────────────────────────────────────────────────────┘
180
- ```
181
-
182
- ### Stack
183
-
184
- | Layer | Technology |
185
- |---|---|
186
- | Server | Node.js + Fastify, TypeScript, `tsx` watch |
187
- | Database | Embedded PostgreSQL via `embedded-postgres` (port 54329) |
188
- | ORM | Drizzle ORM — SQL migrations in `packages/db/src/migrations/` |
189
- | UI | React 18, Vite, TailwindCSS, shadcn/ui |
190
- | Data fetching | TanStack Query v5 — single `queryKeys.ts` registry |
191
- | Agents | Claude Code (local), Codex (local), HTTP adapter |
192
- | Auth | Local trusted mode (no auth wall in dev) |
193
-
194
- ---
195
-
196
- ## Ticket Pipeline
197
-
198
- Tickets are the primary organizing unit. Each ticket has a fully user-configurable `stageOrder` array:
199
-
200
- ```
201
- planning → execution → review → qa → human
202
- ```
106
+ Local adapters execute inside the agent `Working directory` path. Worker kits are designed to plug into that path directly:
203
107
 
204
- - Stage **colors** are assigned by index position in `stageOrder` never keyed by name
205
- - **Issues** (tasks) are spawned per stage and assigned to specific agents
206
- - Pipeline is **sequential** only the active stage has live work; future stages are "up next"
207
- - **Advancing** moves `currentStage` forward; completed stages remain as history
208
- - Stage names, colors, and order are **fully editable inline** from the ticket detail page
108
+ 1. `growthub kit download <id>` exports the kit as a folder plus zip.
109
+ 2. Point the agent `Working directory` at the exported folder.
110
+ 3. Start a new session so the agent reads the kit contract from `CLAUDE.md`.
209
111
 
210
- | Status | Meaning |
211
- |---|---|
212
- | `active` | Work in progress |
213
- | `paused` | Manually paused |
214
- | `done` | All stages completed |
215
- | `cancelled` | Abandoned |
112
+ ### 3. Shared Templates
216
113
 
217
- ---
218
-
219
- ## Canonical Agents
220
-
221
- | Agent | Role | Adapter | Purpose |
222
- |---|---|---|---|
223
- | **Planning Agent** | `pm` | `claude_local` | Breaks tickets into issues, writes specs |
224
- | **Execution — Codex** | `general` | `codex_local` | Implements features from issues |
225
- | **Execution — Claude Code** | `general` | `claude_local` | Implements features, debugging |
226
- | **Review — Claude** | `qa` | `claude_local` | Code review, correctness checks |
227
- | **QA/Debugger — Codex** | `qa` | `codex_local` | Test runs, regression debugging |
228
-
229
- All agents have `canCreateAgents: true` and `canAssignTasks: true` for sub-agent spawning.
230
-
231
- ---
232
-
233
- ## Running locally
114
+ Use this when you need a reusable artifact primitive without exporting a full kit.
234
115
 
235
116
  ```bash
236
- pnpm install
237
- npm run dev
238
- # Server + UI: http://localhost:3100
117
+ growthub template
118
+ growthub template list
119
+ growthub template list --type ad-formats
120
+ growthub template list --type scene-modules --subtype hooks
121
+ growthub template get villain-animation
122
+ growthub template get meme-overlay --out ~/kit/hooks/
123
+ growthub template get villain-animation --json
239
124
  ```
240
125
 
241
- **No manual migrations.** Auto-migrates on every startup. To add a migration: create a `.sql` file in `packages/db/src/migrations/` and update `_journal.json` — never run `drizzle-kit push`.
242
-
243
- ---
126
+ User flow:
244
127
 
245
- ## Key directories
128
+ 1. Browse by family and artifact group.
129
+ 2. Preview the selected artifact.
130
+ 3. Print it, copy it to a local workspace, or use the slug in another workflow.
246
131
 
247
- ```
248
- packages/
249
- db/src/
250
- schema/ Drizzle table definitions
251
- migrations/ SQL files (hand-written, never generated)
252
- shared/src/
253
- types/ TypeScript types (Ticket, Issue, Agent, ...)
254
- validators/ Zod schemas
255
- constants.ts TICKET_STAGES, TICKET_STATUSES, ...
256
-
257
- server/src/
258
- routes/ Fastify route handlers
259
- services/ Business logic
260
- app.ts Route registration
261
-
262
- ui/src/
263
- pages/ React pages (Dashboard, TicketDetail, Tickets, Archive, ...)
264
- components/ Shared UI (NewTicketModal, Sidebar, ...)
265
- api/ API client (tickets.ts, issues.ts, agents.ts, ...)
266
- lib/
267
- queryKeys.ts Single source of truth for all query keys
268
- company-routes.ts Route prefix logic
269
-
270
- agents/ Agent config markdown files
271
- ```
132
+ ## Contribution Model
272
133
 
273
- ---
134
+ The CLI has two extension surfaces for content:
274
135
 
275
- ## Archive
136
+ - worker kits in `cli/assets/worker-kits/`
137
+ - shared templates in `cli/assets/shared-templates/`
276
138
 
277
- Issues support soft-delete via `hiddenAt`. `/archive` page supports bulk archive and restore.
139
+ Use shared templates for reusable cross-kit primitives. Use worker kits for full opinionated environments with prompts, standards, examples, and runtime assumptions.
278
140
 
279
- ## GitHub PR binding
141
+ For the agent-facing extension workflow, see [docs/CLI_TEMPLATE_CONTRIBUTION_EXTENSION_WORKFLOWS.md](../docs/CLI_TEMPLATE_CONTRIBUTION_EXTENSION_WORKFLOWS.md).
280
142
 
281
- New Ticket modal fetches open PRs from your GitHub repos and binds them to tickets. PR context is stored in `ticket.metadata.pr` and surfaced to agents as part of ticket instructions.
143
+ ## Development Notes
282
144
 
283
- ---
145
+ - `@growthub/cli` version: `0.3.43`
146
+ - Node.js: `>=20`
147
+ - Source of truth repo: [Growthub Local](https://github.com/Growthub-ai/growthub-local)
284
148
 
285
- ## Contributing
149
+ ## Links
286
150
 
287
- See [CONTRIBUTING.md](./CONTRIBUTING.md).
151
+ - [GitHub README](https://github.com/Growthub-ai/growthub-local#readme)
152
+ - [Contributing](https://github.com/Growthub-ai/growthub-local/blob/main/CONTRIBUTING.md)
153
+ - [Worker Kits](https://github.com/Growthub-ai/growthub-local/blob/main/docs/WORKER_KITS.md)
154
+ - [CLI Template Contribution Extension Workflows](https://github.com/Growthub-ai/growthub-local/blob/main/docs/CLI_TEMPLATE_CONTRIBUTION_EXTENSION_WORKFLOWS.md)
@@ -0,0 +1,94 @@
1
+ # Ad Format Template Library — INDEX
2
+ > Read this file first. It tells you every frozen format and scene module available.
3
+ > Pull the format file for full scene structure, JS stubs, and adaptation rules.
4
+
5
+ ---
6
+
7
+ ## HOW TO USE THIS LIBRARY
8
+
9
+ **In a brief session:**
10
+ 1. User provides a muse or concept → check this index for matching format
11
+ 2. If a match exists → load that format file → it replaces Steps 2b–2b5 in `skills.md`
12
+ 3. If no match → extract frames as normal (Step 2b) → freeze new format after the brief
13
+
14
+ **Interoperability rule:** Every format file + every scene module shares the same placeholder schema:
15
+ `[BRAND_NAME]` `[PRODUCT_NAME]` `[PRICE]` `[OFFER]` `[LANDING_PAGE]` `[AI_ACTOR_AGE]`
16
+ Swap these from the brand-kit.md and the module is production-ready.
17
+
18
+ ---
19
+
20
+ ## FORMAT LIBRARY
21
+
22
+ | ID | Format Name | Length | Scenes | Category | Muse | Status |
23
+ |----|-------------|--------|--------|----------|------|--------|
24
+ | `bedroom-minimic-talk` | Bedroom Mini-Mic Talk | 23s | 6 | Skincare / Beauty Tech / Any | @frankyshaw Korean skincare Reel | ✅ PROVEN |
25
+ | `villain-animation` | Villain Object Animation | 98s | 9 | Pet / Home / Supplement | TheraPet AI Animation | ✅ PROVEN |
26
+ | `process-specialist-medical` | The Process Specialist | ~50s | 5 | Medical / Regenerative Medicine / Healthcare Authority | Greentree Medical Center original | ✅ PROVEN |
27
+
28
+ **No match? → Use frame extraction methodology:** `templates/ad-formats/frame-analysis.md`
29
+ After completing the brief, freeze the new format using that file's Phase 6 instructions.
30
+
31
+ **Format files:** `templates/ad-formats/<ID>.md`
32
+
33
+ ---
34
+
35
+ ## SCENE MODULE LIBRARY
36
+
37
+ Modules are plug-in components. Mix across formats. Each module has a JS stub ready to paste.
38
+
39
+ ### HOOKS (Scene 1 — swap per variation)
40
+
41
+ | ID | Hook Name | Best Format | Trigger |
42
+ |----|-----------|-------------|---------|
43
+ | `meme-overlay` | Meme Overlay Hook | `bedroom-minimic-talk` | Relatable lifestyle meme (tired, broke, stressed) |
44
+ | `tiktok-comment` | TikTok Comment "Is this legit?" | `bedroom-minimic-talk` | Skepticism-first, high-objection categories |
45
+ | `pov-confession` | POV Mirror Confession | `bedroom-minimic-talk` | Mirror + candid skin moment |
46
+ | `dollar-amount` | Dollar Amount Confession | `bedroom-minimic-talk` + `villain-animation` | "Spent $X. Didn't work." |
47
+ | `villain-hook` | Villain Character Hook | `villain-animation` | Product objects as animated villain characters |
48
+
49
+ **Module files:** `templates/scene-modules/hooks/<ID>.md`
50
+
51
+ ### BODY SCENES (Scenes 2–N)
52
+
53
+ | ID | Module Name | Best Format | Beat |
54
+ |----|-------------|-------------|------|
55
+ | `minimic-problem` | Mini-Mic Problem Confession | `bedroom-minimic-talk` | Authority + failed solutions |
56
+ | `tiktok-skeptic-pivot` | TikTok Skeptic Pivot | `bedroom-minimic-talk` | "Is this legit?" disarm + product intro |
57
+ | `product-demo-glow` | Product Demo (Light/Glow) | `bedroom-minimic-talk` | Device with visible effect (red light, UV, glow) |
58
+ | `villain-agitation` | Villain Agitation Stack | `villain-animation` | 1–4× stacked agitation scenes with villain objects |
59
+ | `before-after-flatlay` | Before/After + Flat Lay | `bedroom-minimic-talk` | Split screen + product flat lay + "this is the real deal." |
60
+
61
+ **Module files:** `templates/scene-modules/body/<ID>.md`
62
+
63
+ ### CTAs (Final Scene)
64
+
65
+ | ID | CTA Name | Best Format | Offer Type |
66
+ |----|----------|-------------|------------|
67
+ | `bogo-meme-bookend` | BOGO + Meme Bookend Close | `bedroom-minimic-talk` | Buy 1 Get 1 / % Off / Flash Offer |
68
+ | `guarantee-close` | Guarantee Calendar Close | `villain-animation` | 30/60-day satisfaction guarantee |
69
+
70
+ **Module files:** `templates/scene-modules/cta/<ID>.md`
71
+
72
+ ---
73
+
74
+ ## QUICK BRIEF ASSEMBLY GUIDE
75
+
76
+ | Brief Type | Start With | Hook Module | Body Modules | CTA Module |
77
+ |------------|------------|-------------|--------------|------------|
78
+ | Skincare UGC (23s) | `bedroom-minimic-talk` | `meme-overlay` OR `tiktok-comment` | `minimic-problem` + `tiktok-skeptic-pivot` + `product-demo-glow` + `before-after-flatlay` | `bogo-meme-bookend` |
79
+ | Pet/Home Device (90s+) | `villain-animation` | `villain-hook` | `villain-agitation` × 3–4 + product reveal | `guarantee-close` |
80
+ | Any brand, new muse | Extract frames → build new format → freeze here | — | — | — |
81
+
82
+ ---
83
+
84
+ ## FREEZING A NEW FORMAT
85
+
86
+ After completing a muse-based brief, freeze the format:
87
+ 1. Create `templates/ad-formats/<new-id>.md` using the schema in any existing format file
88
+ 2. Add a row to this INDEX table
89
+ 3. Extract the reusable scene modules → add to `scene-modules/` if not already there
90
+ 4. Update `skills.md` QUICK REFERENCE table to include the new format
91
+
92
+ ---
93
+
94
+ *Template Library — Creative Strategy Worker Kit — April 2026*