invideo 0.0.0-stage → 0.1.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 +12 -2
- package/bin/invideo.js +35 -0
- package/package.json +23 -4
package/README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# invideo CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
invideo is a professional video editor you can drive from the terminal or your
|
|
4
|
+
agent, with 250+ AI models for images, video, voice and music.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
npm install -g @invideo-ai/cli # or: npx @invideo-ai/cli
|
|
8
|
+
invideo auth login
|
|
9
|
+
invideo project list
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`invideo help` lists everything. Docs, other installers and releases:
|
|
13
|
+
[github.com/invideoio/cli](https://github.com/invideoio/cli).
|
package/bin/invideo.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the invideo binary from the package npm installed for this platform.
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require("child_process");
|
|
5
|
+
|
|
6
|
+
const packages = {
|
|
7
|
+
"darwin-arm64": "@invideo-ai/cli-darwin-universal",
|
|
8
|
+
"darwin-x64": "@invideo-ai/cli-darwin-universal",
|
|
9
|
+
"linux-arm64": "@invideo-ai/cli-linux-arm64",
|
|
10
|
+
"linux-x64": "@invideo-ai/cli-linux-x64",
|
|
11
|
+
"win32-x64": "@invideo-ai/cli-win32-x64",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
15
|
+
const name = packages[platform];
|
|
16
|
+
if (!name) {
|
|
17
|
+
console.error(`invideo: there is no build for ${platform}. See https://github.com/invideoio/cli#install.`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let binary;
|
|
22
|
+
try {
|
|
23
|
+
binary = require.resolve(`${name}/bin/invideo${process.platform === "win32" ? ".exe" : ""}`);
|
|
24
|
+
} catch {
|
|
25
|
+
console.error(`invideo: ${name} isn't installed. Reinstall without --omit=optional or --no-optional.`);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const run = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
30
|
+
if (run.error) {
|
|
31
|
+
console.error(`invideo: ${run.error.message}`);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
if (run.signal) process.kill(process.pid, run.signal);
|
|
35
|
+
process.exit(run.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "invideo",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Professional video editor and 250+ AI models, from the terminal",
|
|
5
|
+
"homepage": "https://github.com/invideoio/cli",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/invideoio/cli.git"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"invideo": "bin/invideo.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin"
|
|
15
|
+
],
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=16"
|
|
18
|
+
},
|
|
19
|
+
"optionalDependencies": {
|
|
20
|
+
"@invideo-ai/cli-darwin-universal": "0.1.0",
|
|
21
|
+
"@invideo-ai/cli-linux-x64": "0.1.0",
|
|
22
|
+
"@invideo-ai/cli-linux-arm64": "0.1.0",
|
|
23
|
+
"@invideo-ai/cli-win32-x64": "0.1.0"
|
|
24
|
+
}
|
|
25
|
+
}
|