@motionharness/cli 0.0.23 → 0.0.26

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 CHANGED
@@ -1,201 +1,19 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
1
+ MotionHarness
2
+ Copyright 2026 MH contributors. All rights reserved.
4
3
 
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
4
+ Unless a file is expressly covered by a separate license, no open-source license
5
+ is granted for MotionHarness-authored material by this repository or distribution.
6
+ Use is subject to a separate authorization from the applicable rights holders.
6
7
 
7
- 1. Definitions.
8
+ The standalone FFmpeg rebuild materials identified in
9
+ products/cli/release/media/LICENSE carry the 0BSD license. Distributions include
10
+ that notice at licenses/media/rebuild/LICENSE. This scoped grant does not cover
11
+ the MotionHarness host, SDK, Studio or other application source.
8
12
 
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
13
+ Third-party software, fonts, assets and adapted components remain subject to
14
+ their respective licenses and notices, including THIRD_PARTY_NOTICES.md,
15
+ SHADCN_PROVENANCE.md, OPENFX_LICENSE and adjacent font license files where
16
+ provided. This notice does not restrict rights granted under those licenses.
11
17
 
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [yyyy] [name of copyright owner]
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
18
+ Rights already granted for previously distributed versions, including under the
19
+ Apache License, Version 2.0, are unaffected.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # MH CLI
1
+ # MotionHarness CLI
2
2
 
3
3
  Install the CLI with npm on macOS Apple Silicon / arm64 or Windows 10/11 x64:
4
4
 
@@ -24,35 +24,66 @@ or manage them. Project initialization needs registry access to the matching
24
24
  `@motionharness/sdk` and project dependencies. Run `mh skill` for the authoring
25
25
  and Agent guide.
26
26
 
27
+ Use `mh render ./clip.wav --project ./my-project` to export the audio mix, or
28
+ `mh render ./frames.zip --project ./my-project` for a numbered PNG sequence.
29
+ The CLI includes standalone LGPL FFmpeg and ffprobe, extracted automatically on
30
+ first use; no separate FFmpeg installation or download is needed. Corresponding
31
+ sources, licenses and the rebuild recipe are included under licenses/media in
32
+ the runtime resource directory reported by mh doctor. MH_FFMPEG and MH_FFPROBE
33
+ can select user-built replacements. PNG, APNG, PNG sequences and WAV use native
34
+ writers. Studio also offers MP4
35
+ (H.264 or HEVC), ProRes MOV, GIF and WebP when the host supports the encoder.
36
+
27
37
  For automatic AI marker delivery, ask your Agent to explain the feature and run
28
38
  `mh hook install --agent codex` (or `claude-code` / `kimi-code` for that Agent).
29
- Each new user message can then include the current MH project's pending markers
39
+ Each new user message can then include the current MotionHarness project's pending markers
30
40
  and layer deletion requests. This does not start conversations. Complete any
31
41
  platform trust or session-reload step reported by the command. Studio shows
32
42
  configuration status and an off switch; reinstalling preserves a previous opt-out.
33
43
 
34
44
  `@motionharness/cli` provides the `mh` command and selects an exactly matching
35
- platform package. `@motionharness/cli-darwin-arm64` contains the macOS arm64 native
36
- binary; `@motionharness/cli-win32-x64` contains `mh.exe`. Install the main package
45
+ platform package. `@motionharness/cli-darwin-arm64` contains `MotionHarness`;
46
+ `@motionharness/cli-win32-x64` contains `MotionHarness.exe`. The native process uses
47
+ this full product name; the command remains `mh`. Install the main package
37
48
  for the command. Windows ARM64, WSL and Linux packages are not provided; Linux
38
49
  can run from source. Keep optional dependencies enabled. Installation works with
39
50
  `--ignore-scripts`: there are no postinstall hooks or extra binary downloads.
40
51
 
52
+ For installations predating this native filename, update with
53
+ `npm install -g @motionharness/cli@latest --include=optional`.
54
+
41
55
  The npm command verifies the platform package and its version. On macOS it uses
42
56
  experimental `process.execve()` to replace Node with Rust; unavailable API support
43
- produces an upgrade prompt. On Windows it starts and waits for `mh.exe`, preserving
57
+ produces an upgrade prompt. On Windows it starts and waits for `MotionHarness.exe`, preserving
44
58
  arguments, stdin/stdout/stderr and exit status.
45
- `mh open [directory]` returns a Studio URL and exits without opening a browser.
46
- Use `--browser` to open it explicitly. Project commands default to the current
47
- working directory (`--project` selects another) and start sessions on demand.
59
+ `mh open [directory]` returns a Studio URL and exits. Project commands default to
60
+ the current working directory (`--project` selects another) and start sessions
61
+ on demand. Normal opening/editing commands automatically open or reuse Studio
62
+ once per session, initially paused, without waiting for its connection. `preview`,
63
+ `render` and `render plan` stay in the background even on first preparation; a
64
+ later normal command can still open Studio once. Use `mh open` to present a new
65
+ runnable project. Edits and exports keep the
66
+ user's page open and do not reopen a closed tab. Set `MH_NO_BROWSER=1` for batch
67
+ or server use. `mh open --browser` explicitly reopens or reuses Studio and waits
68
+ for its connection, even with automatic opening disabled. Browser launch failure
69
+ reports the Studio URL without failing preparation or export.
48
70
  `mh status` and `mh close` inspect or release the current project; `mh daemon
49
71
  status` lists all projects and `mh daemon stop` explicitly stops everything.
50
- A session closes after 15 minutes without connected Studios or running work.
72
+ A session closes after 30 idle minutes without connected Studios or running work.
51
73
  An empty daemon exits after 10 minutes. Busy projects and failed saves prevent
52
74
  normal close/reclamation. Node runs only for transient build/dependency tasks;
53
75
  Chrome automation uses Rust chromiumoxide.
76
+ Keep the user's Studio open after creation; `close` and `daemon stop` are explicit
77
+ management commands, not routine creation cleanup.
78
+
79
+ Routine verification uses background project frames and, when necessary, short
80
+ clips or WAV mixes. Read clips/audio with capable tools without playing through
81
+ the user's Studio or speakers. Report viewed frames, analyzed audio and actual
82
+ motion review/listening separately; metadata, nonzero levels and successful play
83
+ commands do not establish perceptual quality. Use Studio controls only for requested
84
+ viewing/interaction or Studio-specific diagnostics, preserving later user actions.
54
85
 
55
- The binary embeds MH's fixed runtime resources. On first use these expand into
86
+ The binary embeds MotionHarness's fixed runtime resources. On first use these expand into
56
87
  `~/Library/Caches/mh/runtime/<payload-sha256>/` on macOS or
57
88
  `%LOCALAPPDATA%\mh\cache\runtime\<payload-sha256>\` on Windows. Windows authentication
58
89
  and daemon state use separate `auth` and `daemon` directories under `%LOCALAPPDATA%\mh`.
@@ -112,7 +143,7 @@ installs the exact checked version with its matching platform package. Automatic
112
143
  installation requires the current package to be directly inside the active npm
113
144
  global root with a matching prefix; linked packages and detected pnpm/yarn layouts
114
145
  are excluded. If a different Node/npm installation is active, switch back to the
115
- one that owns MH. Project-local, npx and other package-manager installs receive
146
+ one that owns MotionHarness. Project-local, npx and other package-manager installs receive
116
147
  manual instructions. Standalone binaries must be replaced manually.
117
148
 
118
149
  Close active sessions and finish exports before updating. Idle daemons stop
package/bin/mh CHANGED
@@ -14,7 +14,7 @@ async function run(binary,args,env,watchParent=false) {
14
14
  // libuv's default Windows Job kills Node children abruptly on parent exit.
15
15
  // The updater must survive just long enough to cancel npm and unlock.
16
16
  const child=spawn(binary,args,{env,stdio:watchParent?['inherit','inherit','inherit','ipc']:'inherit',detached:watchParent,windowsHide:true});
17
- // Native MH receives the console signal; the detached updater receives IPC.
17
+ // Native MotionHarness receives the console signal; the detached updater receives IPC.
18
18
  // Keep the wrapper alive until either finishes cancellation and cleanup.
19
19
  const interrupted=()=>{if(watchParent&&child.connected)child.send({type:'cancel'},()=>{});};
20
20
  process.on('SIGINT',interrupted);
@@ -24,7 +24,7 @@ async function run(binary,args,env,watchParent=false) {
24
24
  }
25
25
  try {
26
26
  const [major,minor]=process.versions.node.split('.').map(Number);
27
- if(major<22||major===22&&minor<15) throw new Error('MH CLI requires Node.js 22.15 or later. Upgrade Node.js and retry.');
27
+ if(major<22||major===22&&minor<15) throw new Error('MotionHarness CLI requires Node.js 22.15 or later. Upgrade Node.js and retry.');
28
28
  const binary=resolveBinary(packageJson);
29
29
  const env={...process.env,MH_NPM_PACKAGE_JSON:packageJson,MH_NODE_EXEC_PATH:process.execPath};
30
30
  delete env.MH_WINDOWS_UPDATE_REQUEST;
@@ -11,7 +11,7 @@ export function resolveBinary(packageJson, platform = process.platform, arch = p
11
11
  const supported = Object.keys(platforms).filter(id => Object.hasOwn(entry.optionalDependencies ?? {}, platforms[id]));
12
12
  const name = platforms[`${platform}-${arch}`];
13
13
  if (!name || !supported.includes(`${platform}-${arch}`)) {
14
- throw new Error(`MH ${entry.version} does not support ${platform}-${arch}. Supported platforms for this version: ${supported.join(', ') || 'none'}. Install a version that includes your platform.`);
14
+ throw new Error(`MotionHarness ${entry.version} does not support ${platform}-${arch}. Supported platforms for this version: ${supported.join(', ') || 'none'}. Install a version that includes your platform.`);
15
15
  }
16
16
  let manifestPath, installed;
17
17
  try {
@@ -23,8 +23,8 @@ export function resolveBinary(packageJson, platform = process.platform, arch = p
23
23
  throw new Error(`Missing ${name}@${entry.version}. Reinstall @motionharness/cli with optional dependencies enabled (npm install -g @motionharness/cli@${entry.version} --include=optional).`);
24
24
  }
25
25
  if (installed.name !== name || installed.version !== entry.version || entry.optionalDependencies?.[name] !== entry.version)
26
- throw new Error(`MH platform package version mismatch: expected ${name}@${entry.version}, found ${installed.name}@${installed.version}. Reinstall @motionharness/cli.`);
27
- return join(dirname(manifestPath), 'bin', platform==='win32'?'mh.exe':'mh');
26
+ throw new Error(`MotionHarness platform package version mismatch: expected ${name}@${entry.version}, found ${installed.name}@${installed.version}. Reinstall @motionharness/cli.`);
27
+ return join(dirname(manifestPath), 'bin', platform==='win32'?'MotionHarness.exe':'MotionHarness');
28
28
  }
29
29
 
30
30
  // Optional diagnostic entry; the unified Node launcher imports this resolver.
@@ -64,16 +64,16 @@ try {
64
64
  if(manifest.name!=='@motionharness/cli')throw new Error('Invalid npm entry package');
65
65
  summary.currentVersion=manifest.version;summary.updateAvailable=newer(latest,manifest.version);
66
66
  if(!summary.updateAvailable) {
67
- console.log(json?JSON.stringify(summary):`MH is up to date (${manifest.version})`);
67
+ console.log(json?JSON.stringify(summary):`MotionHarness is up to date (${manifest.version})`);
68
68
  } else {
69
69
  // A stopping daemon may remove its descriptor just before exiting. Verify
70
70
  // Windows has released the old image before asking npm to replace it.
71
71
  const platformManifest = () => createRequire(packageJson).resolve('@motionharness/cli-win32-x64/package.json');
72
- const oldBinary=join(dirname(platformManifest()),'bin/mh.exe');
72
+ const oldBinary=join(dirname(platformManifest()),'bin/MotionHarness.exe');
73
73
  while(true) {
74
74
  available();
75
75
  try {const file=await open(oldBinary,'r+');await file.close();break;}
76
- catch(error) {if(!['EBUSY','EPERM','EACCES'].includes(error.code))throw error;if(Date.now()>=deadline)throw new Error('Close other MH commands before updating; the executable is still in use');await pause();}
76
+ catch(error) {if(!['EBUSY','EPERM','EACCES'].includes(error.code))throw error;if(Date.now()>=deadline)throw new Error('Close other MotionHarness commands before updating; the executable is still in use');await pause();}
77
77
  }
78
78
  installedStarted=true;
79
79
  await npm(['install','--global','--prefix',prefix,`@motionharness/cli@${latest}`,'--include=optional','--ignore-scripts','--no-audit','--no-fund']);
@@ -81,9 +81,9 @@ try {
81
81
  const platformJson=platformManifest();
82
82
  const platform=JSON.parse(await readFile(platformJson,'utf8'));
83
83
  if(installed.version!==latest||platform.name!=='@motionharness/cli-win32-x64'||platform.version!==latest||installed.optionalDependencies?.[platform.name]!==latest)throw new Error('Installed package versions differ');
84
- if(await run(join(dirname(platformJson),'bin/mh.exe'),['--version'])!==`mh ${latest}`)throw new Error('Installed binary version differs');
84
+ if(await run(join(dirname(platformJson),'bin/MotionHarness.exe'),['--version'])!==`mh ${latest}`)throw new Error('Installed binary version differs');
85
85
  summary.updated=true;summary.installedVersion=latest;
86
- console.log(json?JSON.stringify(summary):`MH updated: ${summary.currentVersion} → ${latest}`);
86
+ console.log(json?JSON.stringify(summary):`MotionHarness updated: ${summary.currentVersion} → ${latest}`);
87
87
  }
88
88
  } catch(error) {
89
89
  const repair=`npm install -g --prefix "${prefix}" @motionharness/cli@${latest} --include=optional --ignore-scripts`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.0.23",
3
- "license": "Apache-2.0",
2
+ "version": "0.0.26",
3
+ "license": "UNLICENSED",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22.15.0"
@@ -10,7 +10,7 @@
10
10
  "registry": "https://registry.npmjs.org/"
11
11
  },
12
12
  "name": "@motionharness/cli",
13
- "description": "MH motion graphics CLI",
13
+ "description": "MotionHarness motion graphics CLI",
14
14
  "bin": {
15
15
  "mh": "bin/mh"
16
16
  },
@@ -23,8 +23,8 @@
23
23
  "x64"
24
24
  ],
25
25
  "optionalDependencies": {
26
- "@motionharness/cli-darwin-arm64": "0.0.23",
27
- "@motionharness/cli-win32-x64": "0.0.23"
26
+ "@motionharness/cli-darwin-arm64": "0.0.26",
27
+ "@motionharness/cli-win32-x64": "0.0.26"
28
28
  },
29
29
  "files": [
30
30
  "bin/mh",