@doubledigit/cli 0.7.0 → 0.8.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/README.md CHANGED
@@ -9,7 +9,7 @@ Double Digit is a pluggable Next.js/Payload developer control plane. The CLI is
9
9
  Run the published package directly:
10
10
 
11
11
  ```bash
12
- npx @doubledigit/cli init my-project
12
+ npx @doubledigit/cli@latest init my-project
13
13
  pnpm dlx @doubledigit/cli init my-project
14
14
  ```
15
15
 
@@ -77,7 +77,7 @@ dd browse # browse marketplace extensions
77
77
  ## New Project Bootstrap
78
78
 
79
79
  ```bash
80
- npx @doubledigit/cli init my-project --yes
80
+ npx @doubledigit/cli@latest init my-project --yes
81
81
  cd my-project
82
82
  pnpm onboard
83
83
  ```
@@ -113,25 +113,49 @@ dd dev --port 3000
113
113
 
114
114
  ## Action Invocations
115
115
 
116
- Use `dd actions` to discover or call enabled micro-app actions through the running app:
116
+ Use `dd actions` to discover or call enabled micro-app actions through the running app. External projects should use the published package through `npx @doubledigit/cli@latest` and should not assume a global `dd` binary exists:
117
117
 
118
118
  ```bash
119
- dd actions remotion-hub
120
- dd actions remotion-hub init temp-project
121
- dd actions remotion-hub search-components --query "animated chart" --limit 5
119
+ npx @doubledigit/cli@latest actions remotion-hub
120
+ npx @doubledigit/cli@latest actions remotion-hub init temp-project
121
+ npx @doubledigit/cli@latest actions remotion-hub list-components --limit 5
122
+ npx @doubledigit/cli@latest actions remotion-hub search-components --query "animated chart" --limit 5
123
+ npx @doubledigit/cli@latest actions remotion-hub register-component --json-file component.json
122
124
  ```
123
125
 
124
126
  Remotion Hub `init` is handled locally by the CLI because it creates files on the caller's machine. Other Remotion Hub actions, such as search and registry lookup, call the configured Double Digit app over HTTP.
125
127
 
126
128
  By default, Remotion Hub `init` creates Remotion's Hello World starter so `remotion studio` opens with a visible composition. Pass `--skip-remotion-create` or `--hub-only` only when adding Remotion Hub files to an existing Remotion project.
127
129
 
128
- After init, install Remotion AI coding skills when you want editor or agent guidance for Remotion work:
130
+ After init, the CLI attempts to install both Remotion's project skills and the Double Digit Remotion Hub auxiliary skills from the created project directory:
131
+
132
+ ```bash
133
+ npx skills add remotion-dev/skills --all
134
+ npx skills add doubledigit/remotion-hub-skills --all
135
+ ```
136
+
137
+ Pass `--skip-skills` to skip skill installation. If skill installation fails, init still completes the project scaffold and prints exact retry commands. `--non-interactive` is accepted for automation scripts; the command is already prompt-free.
138
+
139
+ Register a component with simple JSON:
129
140
 
130
141
  ```bash
131
- npx skills add remotion-dev/skills
142
+ npx @doubledigit/cli@latest actions remotion-hub register-component --json-file component.json
132
143
  ```
133
144
 
134
- Pass `--skip-skills` to omit that next-step reminder from CLI output. `--non-interactive` is accepted for automation scripts; the command is already prompt-free.
145
+ Minimal `component.json`:
146
+
147
+ ```json
148
+ {
149
+ "title": "Animated Chart",
150
+ "slug": "animated-chart",
151
+ "namespace": "doubledigit",
152
+ "kind": "component",
153
+ "description": "Animated chart scene.",
154
+ "tags": ["chart", "animation"],
155
+ "code": "export function AnimatedChart() { return null; }",
156
+ "metadata": {}
157
+ }
158
+ ```
135
159
 
136
160
  When no `--registry`, `--url`, or `--app-url` is passed, Remotion Hub init writes a registry URL from exported `DD_APP_URL`, `APP_URL`, `NEXT_PUBLIC_APP_URL`, or `BETTER_AUTH_URL`; then the release-configured hosted app URL; then `http://localhost:3111` for local development builds.
137
161
 
@@ -142,20 +166,22 @@ The published CLI embeds a hosted default from `DD_ACTIONS_DEFAULT_APP_URL` duri
142
166
  The hosted Double Digit app is the default for npm users:
143
167
 
144
168
  ```bash
145
- dd actions remotion-hub
169
+ npx @doubledigit/cli@latest actions remotion-hub
146
170
  ```
147
171
 
148
172
  This hosted default does not require a local checkout or running app.
149
173
 
174
+ Before relying on the hosted default in automation, run discovery as a preflight. If the hosted action endpoint returns HTTP 500 or is unreachable, use `DD_APP_URL` or `--url` to target a local or self-hosted Double Digit app until the hosted Remotion Hub is healthy.
175
+
150
176
  Local development or self-hosted environments should override the target explicitly:
151
177
 
152
178
  ```bash
153
- DD_APP_URL=http://localhost:3111 dd actions remotion-hub
179
+ DD_APP_URL=http://localhost:3111 npx @doubledigit/cli@latest actions remotion-hub
154
180
  ```
155
181
 
156
182
  In GitHub Actions or another CI/CD runner, provide `DD_ACTIONS_DEFAULT_APP_URL` or `DD_APP_URL` through the runner environment, variables, or secrets when building or publishing the CLI package. Do not rely on a local env file being present in CI.
157
183
 
158
- GitHub or Infisical secrets are CI/CD inputs only. A local `npx @doubledigit/cli ...` command sees your shell environment and local env files, not repository secrets.
184
+ GitHub or Infisical secrets are CI/CD inputs only. A local `npx @doubledigit/cli@latest ...` command sees your shell environment and local env files, not repository secrets.
159
185
 
160
186
  ## Links
161
187
 
package/dist/codegen.js CHANGED
@@ -7,7 +7,7 @@
7
7
  import fs from 'node:fs';
8
8
  import path from 'node:path';
9
9
  const HEADER = `// ⚠️ AUTO-GENERATED by @doubledigit/cli sync
10
- // Do not edit manually. Run \`dd sync\` or \`npx @doubledigit/cli sync\` to regenerate.
10
+ // Do not edit manually. Run \`dd sync\` or \`npx @doubledigit/cli@latest sync\` to regenerate.
11
11
  `;
12
12
  function toImportSpecifier(outputPath, entryFile) {
13
13
  const relativePath = path.relative(path.dirname(outputPath), entryFile);
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/commands/actions.ts"],"names":[],"mappings":"AAmCA,wBAAgB,uBAAuB,WAKtC;AAkED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE;WACf,MAAM;WAAS,MAAM;IAuBxD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,WAGrD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,WAGpD;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,EAAE,YAI7D;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,EAAE,YAI5D;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC3D"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/commands/actions.ts"],"names":[],"mappings":"AAoCA,wBAAgB,uBAAuB,WAKtC;AAoED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE;WACf,MAAM;WAAS,MAAM;IAuBxD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,WAGrD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,WAGpD;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,EAAE,YAI7D;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,EAAE,YAI5D;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC3D"}
@@ -16,6 +16,7 @@ const actionValueOptions = new Set([
16
16
  '--namespace',
17
17
  '--preview-type',
18
18
  '--query',
19
+ '--json-file',
19
20
  '--registry',
20
21
  '--slug',
21
22
  '--tag',
@@ -39,6 +40,7 @@ Usage:
39
40
  Options:
40
41
  --url, --app-url <url> App URL (default: DD_APP_URL, APP_URL, BETTER_AUTH_URL, or ${getDefaultActionsAppUrl()})
41
42
  --json <json> JSON request body to send to the action
43
+ --json-file <path> Read the JSON request body from a file
42
44
  --query <text> Set input.query
43
45
  --limit <number> Set input.limit
44
46
  --namespace <namespace> Set input namespace/filter
@@ -49,13 +51,14 @@ Options:
49
51
  --tag, --tags <tags> Add one tag or comma-separated tags to filters.tags
50
52
 
51
53
  Examples:
52
- dd actions remotion-hub
53
- dd actions remotion-hub init my-video --non-interactive
54
- dd actions remotion-hub init my-video --skip-skills
55
- dd actions remotion-hub add terminal-scene --dir my-video
56
- dd actions remotion-hub search-components --query "animated chart" --limit 5
57
- dd actions remotion-hub get-component --namespace doubledigit --slug motion-strip
58
- dd actions remotion-hub get-registry-payload --json '{"namespace":"doubledigit","slug":"motion-strip"}'
54
+ npx @doubledigit/cli@latest actions remotion-hub
55
+ npx @doubledigit/cli@latest actions remotion-hub init my-video --non-interactive
56
+ npx @doubledigit/cli@latest actions remotion-hub init my-video --skip-skills
57
+ npx @doubledigit/cli@latest actions remotion-hub list-components --limit 5
58
+ npx @doubledigit/cli@latest actions remotion-hub add terminal-scene --dir my-video
59
+ npx @doubledigit/cli@latest actions remotion-hub search-components --query "animated chart" --limit 5
60
+ npx @doubledigit/cli@latest actions remotion-hub register-component --json-file component.json
61
+ npx @doubledigit/cli@latest actions remotion-hub get-registry-payload --json '{"namespace":"doubledigit","slug":"motion-strip"}'
59
62
  `;
60
63
  }
61
64
  function readActionEnvFiles(paths) {
@@ -96,9 +99,9 @@ export function getActionPositionals(args) {
96
99
  continue;
97
100
  if (arg.startsWith('--')) {
98
101
  const [flag, inlineValue] = arg.split(/=(.*)/s, 2);
99
- if (flag === '--json' && inlineValue === undefined) {
102
+ if ((flag === '--json' || flag === '--json-file') && inlineValue === undefined) {
100
103
  const next = args[i + 1];
101
- if (next && /^[{[]/.test(next.trim()))
104
+ if (next && !next.startsWith('--'))
102
105
  i++;
103
106
  }
104
107
  else if (inlineValue === undefined && actionValueOptions.has(flag)) {
@@ -78,9 +78,9 @@ Options:
78
78
  --json Print machine-readable JSON
79
79
 
80
80
  Examples:
81
- dd actions remotion-hub add terminal-scene
82
- dd actions remotion-hub add doubledigit/terminal-scene --dir ./my-video
83
- dd actions remotion-hub add terminal-scene --registry https://double-digit.example --skip-install
81
+ npx @doubledigit/cli@latest actions remotion-hub add terminal-scene
82
+ npx @doubledigit/cli@latest actions remotion-hub add doubledigit/terminal-scene --dir ./my-video
83
+ npx @doubledigit/cli@latest actions remotion-hub add terminal-scene --registry https://double-digit.example --skip-install
84
84
  `;
85
85
  }
86
86
  function printAdd(result) {
@@ -1 +1 @@
1
- {"version":3,"file":"remotion-hub-init.d.ts","sourceRoot":"","sources":["../../src/commands/remotion-hub-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAgFhG,wBAAgB,wBAAwB,WA4BvC;AAmBD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,wBAAwB,GAAG,SAAS,CA2B9F"}
1
+ {"version":3,"file":"remotion-hub-init.d.ts","sourceRoot":"","sources":["../../src/commands/remotion-hub-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAgFhG,wBAAgB,wBAAwB,WA4BvC;AAgCD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,wBAAwB,GAAG,SAAS,CA2B9F"}
@@ -78,17 +78,17 @@ Options:
78
78
  --namespace <name> Registry namespace (default: doubledigit)
79
79
  --skip-remotion-create Only add Remotion Hub files; do not run create-video
80
80
  --hub-only Alias for --skip-remotion-create
81
- --skip-skills Do not print the Remotion AI coding skills next step
81
+ --skip-skills Do not install agent skills
82
82
  --non-interactive Compatibility flag; init is already prompt-free
83
83
  --force Overwrite existing generated files
84
84
  --json Print machine-readable JSON
85
85
 
86
86
  Examples:
87
- dd actions remotion-hub init
88
- dd actions remotion-hub init my-video
89
- dd actions remotion-hub init my-video --non-interactive
90
- dd actions remotion-hub init my-video --skip-skills
91
- dd actions remotion-hub init my-video --registry https://double-digit.example
87
+ npx @doubledigit/cli@latest actions remotion-hub init
88
+ npx @doubledigit/cli@latest actions remotion-hub init my-video
89
+ npx @doubledigit/cli@latest actions remotion-hub init my-video --non-interactive
90
+ npx @doubledigit/cli@latest actions remotion-hub init my-video --skip-skills
91
+ npx @doubledigit/cli@latest actions remotion-hub init my-video --registry https://double-digit.example
92
92
  `;
93
93
  }
94
94
  function printInit(result) {
@@ -102,9 +102,22 @@ function printInit(result) {
102
102
  console.log('');
103
103
  console.log(`Registry: ${result.config.registry}`);
104
104
  if (!result.skills.skipped) {
105
+ const installed = result.skills.commands.filter((command) => command.success);
106
+ const failed = result.skills.commands.filter((command) => !command.success);
105
107
  console.log('');
106
- console.log('Install Remotion AI coding skills:');
107
- console.log(` ${result.skills.display}`);
108
+ if (installed.length > 0) {
109
+ console.log('Installed agent skills:');
110
+ for (const command of installed) {
111
+ console.log(` ${command.display}`);
112
+ }
113
+ }
114
+ if (failed.length > 0) {
115
+ console.log('Skill installation did not complete. The project scaffold is ready.');
116
+ console.log('Retry from the project directory:');
117
+ for (const command of failed) {
118
+ console.log(` ${command.display}`);
119
+ }
120
+ }
108
121
  }
109
122
  }
110
123
  export function runRemotionHubInitCommand(args) {
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * without importing the full extension-management dependency graph first.
7
7
  */
8
8
  declare const command: string, args: string[];
9
- declare const HELP = "\n@doubledigit/cli \u2014 Manage extensions and local setup\n\nCommands:\n doctor Check local prerequisites and project health\n onboard Prepare local development and start the app\n run Start the local app with automatic DB bootstrap\n dev Start DB + app without migrations or seed data\n db <subcommand> Database helpers (status, migrate, create)\n actions <app> [action] Discover and invoke micro-app actions\n create <name> Scaffold a new micro-app from the template\n init <project-name> Scaffold a new Double Digit project\n add|install <source> Install an extension from GitHub or a marketplace\n sync Regenerate micro-apps.ts from dd-apps.config.json\n enable <name> Enable a micro-app (updates config + runs sync)\n disable <name> Disable a micro-app (updates config + runs sync)\n uninstall|remove <name> Completely remove a micro-app\n list List all discovered micro-apps with enabled/disabled status\n info <name> Show detailed info about an installed extension\n outdated Check for outdated marketplace extensions\n reconcile Detect drift between lock file, marketplace, and local files\n marketplace <sub> Manage marketplace registrations (add/list/update/remove)\n browse [marketplace] Browse available extensions in registered marketplaces\n\nOptions:\n --help, -h Show this help message\n\nExamples:\n dd doctor\n dd onboard --yes\n dd onboard # setup + start the dev server\n dd onboard --no-run # setup only\n dd init my-project # scaffold and bootstrap a fresh project\n dd init my-project --run # scaffold + bootstrap + start\n dd init my-project --skip-install --no-git\n dd run\n dd dev\n dd db status\n dd actions remotion-hub init my-video --non-interactive\n dd actions remotion-hub init my-video --skip-skills\n dd actions remotion-hub search-components --query \"animated chart\"\n dd create invoice-tracker\n dd add gh:owner/repo/extensions/micro-apps/habit-tracker\n dd add habit-tracker@community\n dd info habit-tracker\n dd reconcile\n dd marketplace add digitaldouble/dd-marketplace\n dd browse community\n DD_APPS=tasks,agent-v2 dd sync\n";
9
+ declare const HELP = "\n@doubledigit/cli \u2014 Manage extensions and local setup\n\nCommands:\n doctor Check local prerequisites and project health\n onboard Prepare local development and start the app\n run Start the local app with automatic DB bootstrap\n dev Start DB + app without migrations or seed data\n db <subcommand> Database helpers (status, migrate, create)\n actions <app> [action] Discover and invoke micro-app actions\n create <name> Scaffold a new micro-app from the template\n init <project-name> Scaffold a new Double Digit project\n add|install <source> Install an extension from GitHub or a marketplace\n sync Regenerate micro-apps.ts from dd-apps.config.json\n enable <name> Enable a micro-app (updates config + runs sync)\n disable <name> Disable a micro-app (updates config + runs sync)\n uninstall|remove <name> Completely remove a micro-app\n list List all discovered micro-apps with enabled/disabled status\n info <name> Show detailed info about an installed extension\n outdated Check for outdated marketplace extensions\n reconcile Detect drift between lock file, marketplace, and local files\n marketplace <sub> Manage marketplace registrations (add/list/update/remove)\n browse [marketplace] Browse available extensions in registered marketplaces\n\nOptions:\n --help, -h Show this help message\n\nExamples:\n dd doctor\n dd onboard --yes\n dd onboard # setup + start the dev server\n dd onboard --no-run # setup only\n dd init my-project # scaffold and bootstrap a fresh project\n dd init my-project --run # scaffold + bootstrap + start\n dd init my-project --skip-install --no-git\n dd run\n dd dev\n dd db status\n npx @doubledigit/cli@latest actions remotion-hub init my-video --non-interactive\n npx @doubledigit/cli@latest actions remotion-hub init my-video --skip-skills\n npx @doubledigit/cli@latest actions remotion-hub search-components --query \"animated chart\"\n dd create invoice-tracker\n dd add gh:owner/repo/extensions/micro-apps/habit-tracker\n dd add habit-tracker@community\n dd info habit-tracker\n dd reconcile\n dd marketplace add digitaldouble/dd-marketplace\n dd browse community\n DD_APPS=tasks,agent-v2 dd sync\n";
10
10
  declare function requireArg(value: string | undefined, usage: string): string;
11
11
  declare function runAddCommand(rawArgs: string[]): Promise<void>;
12
12
  declare function main(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,QAAA,MAAW,OAAO,UAAK,IAAI,UAAgB,CAAC;AAE5C,QAAA,MAAM,IAAI,2zEAiDT,CAAC;AAEF,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAOpE;AAED,iBAAe,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB7D;AAED,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAsInC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,QAAA,MAAW,OAAO,UAAK,IAAI,UAAgB,CAAC;AAE5C,QAAA,MAAM,IAAI,s4EAiDT,CAAC;AAEF,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAOpE;AAED,iBAAe,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB7D;AAED,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAsInC"}
package/dist/index.js CHANGED
@@ -45,9 +45,9 @@ Examples:
45
45
  dd run
46
46
  dd dev
47
47
  dd db status
48
- dd actions remotion-hub init my-video --non-interactive
49
- dd actions remotion-hub init my-video --skip-skills
50
- dd actions remotion-hub search-components --query "animated chart"
48
+ npx @doubledigit/cli@latest actions remotion-hub init my-video --non-interactive
49
+ npx @doubledigit/cli@latest actions remotion-hub init my-video --skip-skills
50
+ npx @doubledigit/cli@latest actions remotion-hub search-components --query "animated chart"
51
51
  dd create invoice-tracker
52
52
  dd add gh:owner/repo/extensions/micro-apps/habit-tracker
53
53
  dd add habit-tracker@community
@@ -1 +1 @@
1
- {"version":3,"file":"actions-client.d.ts","sourceRoot":"","sources":["../../src/lib/actions-client.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;CACpB;AAOD,MAAM,WAAW,iCAAiC;IAChD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,GAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,EAAE,iCAAiC,UAKnC;AAED,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,GAAiB,EACjB,OAAY,EACZ,UAAU,GACX,EAAE,0BAA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,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,GAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,EAAE,iCAAiC,UAKnC;AAED,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,GAAiB,EACjB,OAAY,EACZ,UAAU,GACX,EAAE,0BAA0B,UAS5B;AA4ED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,iBAAiB,CA6DlE;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,UAS7C;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,WAK3C;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,YAAY,GAAG,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAoBtI;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAiCjF"}
@@ -1,3 +1,4 @@
1
+ import { readFileSync } from 'node:fs';
1
2
  function readUrlValue(value) {
2
3
  const trimmed = value?.trim();
3
4
  return trimmed || undefined;
@@ -25,14 +26,30 @@ function requireValue(args, index, flag) {
25
26
  }
26
27
  return value;
27
28
  }
28
- function parseJson(value) {
29
+ function parseJson(value, label = '--json') {
29
30
  try {
30
31
  return JSON.parse(value);
31
32
  }
32
33
  catch {
33
- throw new Error('--json must be valid JSON');
34
+ throw new Error(`${label} must be valid JSON`);
34
35
  }
35
36
  }
37
+ function readJsonFile(filePath) {
38
+ try {
39
+ return readFileSync(filePath, 'utf8');
40
+ }
41
+ catch (error) {
42
+ const detail = error instanceof Error ? error.message : String(error);
43
+ throw new Error(`Unable to read JSON file ${filePath}: ${detail}`);
44
+ }
45
+ }
46
+ function parseJsonValue(value, label) {
47
+ if (value.startsWith('@') && value.length > 1) {
48
+ const filePath = value.slice(1);
49
+ return parseJson(readJsonFile(filePath), `${label} ${value}`);
50
+ }
51
+ return parseJson(value, label);
52
+ }
36
53
  function asFilters(input) {
37
54
  const filters = input.filters;
38
55
  if (filters && typeof filters === 'object' && !Array.isArray(filters)) {
@@ -78,52 +95,55 @@ export function parseActionsArgs(args) {
78
95
  const arg = args[i];
79
96
  if (arg === '--help' || arg === '-h') {
80
97
  help = true;
98
+ continue;
81
99
  }
82
- else if (arg === '--url' || arg === '--app-url') {
83
- appUrl = requireValue(args, i, arg);
84
- i++;
100
+ if (!arg.startsWith('--')) {
101
+ positional.push(arg);
102
+ continue;
85
103
  }
86
- else if (arg === '--json') {
87
- Object.assign(input, parseJson(requireValue(args, i, arg)));
104
+ const [flag, inlineValue] = arg.split(/=(.*)/s, 2);
105
+ const readValue = () => {
106
+ if (inlineValue !== undefined)
107
+ return inlineValue;
108
+ const value = requireValue(args, i, flag);
88
109
  i++;
110
+ return value;
111
+ };
112
+ if (flag === '--url' || flag === '--app-url') {
113
+ appUrl = readValue();
89
114
  }
90
- else if (arg === '--query') {
91
- setInputValue(input, 'query', requireValue(args, i, arg));
92
- i++;
115
+ else if (flag === '--json') {
116
+ Object.assign(input, parseJsonValue(readValue(), '--json'));
93
117
  }
94
- else if (arg === '--limit') {
95
- setInputValue(input, 'limit', requireValue(args, i, arg));
96
- i++;
118
+ else if (flag === '--json-file') {
119
+ Object.assign(input, parseJson(readJsonFile(readValue()), '--json-file'));
97
120
  }
98
- else if (arg === '--namespace') {
99
- setInputValue(input, 'namespace', requireValue(args, i, arg));
100
- i++;
121
+ else if (flag === '--query') {
122
+ setInputValue(input, 'query', readValue());
101
123
  }
102
- else if (arg === '--slug') {
103
- setInputValue(input, 'slug', requireValue(args, i, arg));
104
- i++;
124
+ else if (flag === '--limit') {
125
+ setInputValue(input, 'limit', readValue());
105
126
  }
106
- else if (arg === '--id-or-slug') {
107
- setInputValue(input, 'idOrSlug', requireValue(args, i, arg));
108
- i++;
127
+ else if (flag === '--namespace') {
128
+ setInputValue(input, 'namespace', readValue());
109
129
  }
110
- else if (arg === '--kind') {
111
- setInputValue(input, 'kind', requireValue(args, i, arg));
112
- i++;
130
+ else if (flag === '--slug') {
131
+ setInputValue(input, 'slug', readValue());
113
132
  }
114
- else if (arg === '--preview-type') {
115
- setInputValue(input, 'previewType', requireValue(args, i, arg));
116
- i++;
133
+ else if (flag === '--id-or-slug') {
134
+ setInputValue(input, 'idOrSlug', readValue());
117
135
  }
118
- else if (arg === '--tag' || arg === '--tags') {
119
- addTag(input, requireValue(args, i, arg));
120
- i++;
136
+ else if (flag === '--kind') {
137
+ setInputValue(input, 'kind', readValue());
121
138
  }
122
- else if (arg.startsWith('--')) {
123
- throw new Error(`Unknown option: ${arg}`);
139
+ else if (flag === '--preview-type') {
140
+ setInputValue(input, 'previewType', readValue());
141
+ }
142
+ else if (flag === '--tag' || flag === '--tags') {
143
+ addTag(input, readValue());
124
144
  }
125
145
  else {
126
- positional.push(arg);
146
+ throw new Error(`Unknown option: ${flag}`);
127
147
  }
128
148
  }
129
149
  return {
@@ -181,7 +201,18 @@ export async function fetchActionRequest(request) {
181
201
  'Set DD_APP_URL to the running Double Digit app URL, or pass --url.');
182
202
  }
183
203
  const text = await response.text();
184
- const payload = text ? JSON.parse(text) : null;
204
+ let payload = null;
205
+ if (text) {
206
+ try {
207
+ payload = JSON.parse(text);
208
+ }
209
+ catch {
210
+ if (!response.ok) {
211
+ throw new Error(`Request failed with HTTP ${response.status}`);
212
+ }
213
+ throw new Error(`Expected JSON response from ${request.url}`);
214
+ }
215
+ }
185
216
  if (!response.ok) {
186
217
  const error = payload && typeof payload === 'object' && 'error' in payload
187
218
  ? String(payload.error)
@@ -1,8 +1,14 @@
1
1
  import { spawnSync } from 'node:child_process';
2
2
  type RemotionSkillsCommand = {
3
3
  command: 'npx';
4
- args: ['skills', 'add', 'remotion-dev/skills'];
5
- display: 'npx skills add remotion-dev/skills';
4
+ args: string[];
5
+ display: string;
6
+ };
7
+ type RemotionSkillsInstallResult = RemotionSkillsCommand & {
8
+ skipped: boolean;
9
+ success: boolean;
10
+ status: number | null;
11
+ error?: string;
6
12
  };
7
13
  export interface RemotionHubConfig {
8
14
  $schema: string;
@@ -60,8 +66,9 @@ export interface RunRemotionHubInitResult {
60
66
  command: string;
61
67
  args: string[];
62
68
  };
63
- skills: RemotionSkillsCommand & {
69
+ skills: {
64
70
  skipped: boolean;
71
+ commands: RemotionSkillsInstallResult[];
65
72
  };
66
73
  }
67
74
  export interface RunRemotionHubAddOptions {
@@ -93,11 +100,11 @@ export interface ResolveRemotionHubRegistryOptions {
93
100
  localDefaultRegistry?: string;
94
101
  }
95
102
  export declare function resolveRemotionHubRegistry({ registry, env, generatedDefaultRegistry, localDefaultRegistry, }?: ResolveRemotionHubRegistryOptions): string;
96
- export declare function buildRemotionSkillsCommand(): {
97
- args: RemotionSkillsCommand["args"];
103
+ export declare function buildRemotionSkillsCommands(): {
104
+ args: string[];
98
105
  command: "npx";
99
- display: "npx skills add remotion-dev/skills";
100
- };
106
+ display: string;
107
+ }[];
101
108
  export declare function runRemotionHubInit(options?: RunRemotionHubInitOptions): RunRemotionHubInitResult;
102
109
  export declare function runRemotionHubAdd(options: RunRemotionHubAddOptions): Promise<RunRemotionHubAddResult>;
103
110
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"remotion-hub-init.d.ts","sourceRoot":"","sources":["../../src/lib/remotion-hub-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,oBAAoB,CAAC;AAkBtE,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,KAAK,CAAC;IACf,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC;IAC/C,OAAO,EAAE,oCAAoC,CAAC;CAC/C,CAAC;AAQF,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAA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,GAAE,yBAA8B,GAAG,wBAAwB,CAoDpG;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAuFlC"}
@@ -7,11 +7,18 @@ const CONFIG_FILE = 'remotion-hub.json';
7
7
  const LOCK_FILE = 'remotion-hub.lock.json';
8
8
  const DEFAULT_REGISTRY = 'http://localhost:3111';
9
9
  const DEFAULT_NAMESPACE = 'doubledigit';
10
- const REMOTION_SKILLS_COMMAND = {
11
- command: 'npx',
12
- args: ['skills', 'add', 'remotion-dev/skills'],
13
- display: 'npx skills add remotion-dev/skills',
14
- };
10
+ const REMOTION_SKILLS_COMMANDS = [
11
+ {
12
+ command: 'npx',
13
+ args: ['skills', 'add', 'remotion-dev/skills', '--all'],
14
+ display: 'npx skills add remotion-dev/skills --all',
15
+ },
16
+ {
17
+ command: 'npx',
18
+ args: ['skills', 'add', 'doubledigit/remotion-hub-skills', '--all'],
19
+ display: 'npx skills add doubledigit/remotion-hub-skills --all',
20
+ },
21
+ ];
15
22
  function toJson(value) {
16
23
  return `${JSON.stringify(value, null, 2)}\n`;
17
24
  }
@@ -179,11 +186,35 @@ function buildRemotionCreateCommand(projectDir) {
179
186
  args: ['create-video@latest', '--yes', '--hello-world', projectDir],
180
187
  };
181
188
  }
182
- export function buildRemotionSkillsCommand() {
183
- return {
184
- ...REMOTION_SKILLS_COMMAND,
185
- args: [...REMOTION_SKILLS_COMMAND.args],
186
- };
189
+ export function buildRemotionSkillsCommands() {
190
+ return REMOTION_SKILLS_COMMANDS.map((command) => ({
191
+ ...command,
192
+ args: [...command.args],
193
+ }));
194
+ }
195
+ function runRemotionSkillsInstall(projectDir, options) {
196
+ const commands = buildRemotionSkillsCommands();
197
+ if (options.skipSkills) {
198
+ return commands.map((command) => ({
199
+ ...command,
200
+ skipped: true,
201
+ success: false,
202
+ status: null,
203
+ }));
204
+ }
205
+ return commands.map((command) => {
206
+ const result = (options.spawnImpl ?? spawnSync)(command.command, command.args, {
207
+ cwd: projectDir,
208
+ stdio: options.quiet ? 'pipe' : 'inherit',
209
+ });
210
+ return {
211
+ ...command,
212
+ skipped: false,
213
+ success: !result.error && result.status === 0,
214
+ status: result.status,
215
+ error: result.error?.message,
216
+ };
217
+ });
187
218
  }
188
219
  function assertRemotionCreateSucceeded(result, command, args) {
189
220
  if (result.error) {
@@ -400,6 +431,7 @@ export function runRemotionHubInit(options = {}) {
400
431
  const lock = readJsonFile(lockPath, defaultLock());
401
432
  writeRegistryFile(projectDir, config, lock);
402
433
  created.push(config.paths.registry);
434
+ const skills = runRemotionSkillsInstall(projectDir, options);
403
435
  return {
404
436
  projectDir,
405
437
  configPath,
@@ -408,8 +440,8 @@ export function runRemotionHubInit(options = {}) {
408
440
  config,
409
441
  remotionCreate,
410
442
  skills: {
411
- ...buildRemotionSkillsCommand(),
412
443
  skipped: options.skipSkills === true,
444
+ commands: skills,
413
445
  },
414
446
  };
415
447
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doubledigit/cli",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "description": "CLI for Double Digit local setup and extension management.",
6
6
  "license": "MIT",