@yourai/cli 0.0.0-stage → 0.0.2

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 (3) hide show
  1. package/README.md +16 -2
  2. package/bin/yourai.js +42 -0
  3. package/package.json +33 -4
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
- # Temporary Holding Version
1
+ # yourai
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Build and run your own local AI from the terminal.
4
+
5
+ ```bash
6
+ npm install -g @yourai/cli
7
+ yourai doctor # check this computer
8
+ yourai init # guided setup
9
+ cd my-ai && yourai build && yourai start
10
+ yourai chat
11
+ ```
12
+
13
+ This package only contains a small launcher. The prebuilt `yourai` binary for your platform comes
14
+ from one of the `@yourai/cli-*` optional dependencies; nothing is compiled or downloaded at install time.
15
+ Models are downloaded later by `yourai build`, after you confirm the license.
16
+
17
+ Docs: https://yourai.bdtren.com
package/bin/yourai.js ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+ // Launcher: runs the prebuilt yourai binary from the matching platform package.
3
+ const { spawnSync } = require("child_process");
4
+
5
+ const platforms = {
6
+ "darwin-arm64": "@yourai/cli-darwin-arm64",
7
+ "darwin-x64": "@yourai/cli-darwin-x64",
8
+ "linux-x64": "@yourai/cli-linux-x64",
9
+ "linux-arm64": "@yourai/cli-linux-arm64",
10
+ "win32-x64": "@yourai/cli-win32-x64",
11
+ "win32-arm64": "@yourai/cli-win32-arm64",
12
+ };
13
+
14
+ const key = `${process.platform}-${process.arch}`;
15
+ const pkg = platforms[key];
16
+ if (!pkg) {
17
+ console.error(`yourai: unsupported platform ${key}`);
18
+ process.exit(1);
19
+ }
20
+
21
+ const exe = process.platform === "win32" ? "yourai.exe" : "yourai";
22
+ let binary;
23
+ try {
24
+ binary = require.resolve(`${pkg}/bin/${exe}`);
25
+ } catch {
26
+ console.error(
27
+ `yourai: the platform package ${pkg} is missing.\n` +
28
+ `Reinstall without --omit=optional, or use the curl/PowerShell installer:\n` +
29
+ ` https://yourai.bdtren.com/cli/install.sh`
30
+ );
31
+ process.exit(1);
32
+ }
33
+
34
+ const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
35
+ if (result.error) {
36
+ console.error(`yourai: ${result.error.message}`);
37
+ process.exit(1);
38
+ }
39
+ if (result.signal) {
40
+ process.kill(process.pid, result.signal);
41
+ }
42
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@yourai/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.2",
4
+ "description": "Build and run your own local AI",
5
+ "homepage": "https://yourai.bdtren.com",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/bdtren/yourai-cli.git"
9
+ },
10
+ "bin": {
11
+ "yourai": "bin/yourai.js"
12
+ },
13
+ "files": [
14
+ "bin"
15
+ ],
16
+ "engines": {
17
+ "node": ">=16"
18
+ },
19
+ "keywords": [
20
+ "ai",
21
+ "llm",
22
+ "local",
23
+ "llama.cpp",
24
+ "cli"
25
+ ],
26
+ "optionalDependencies": {
27
+ "@yourai/cli-darwin-arm64": "0.0.2",
28
+ "@yourai/cli-darwin-x64": "0.0.2",
29
+ "@yourai/cli-linux-x64": "0.0.2",
30
+ "@yourai/cli-linux-arm64": "0.0.2",
31
+ "@yourai/cli-win32-x64": "0.0.2",
32
+ "@yourai/cli-win32-arm64": "0.0.2"
33
+ },
34
+ "license": "Apache-2.0"
35
+ }