@vivary/create 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.
Files changed (3) hide show
  1. package/README.md +27 -0
  2. package/index.js +41 -0
  3. package/package.json +34 -0
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # @vivary/create
2
+
3
+ **The `create-t3-app` for agent-native workspaces.** Scaffold a complete Vivary
4
+ workspace — typed knowledge graph (tropo), agent OS (strato), and starter graph — in
5
+ one command.
6
+
7
+ ```bash
8
+ npm create @vivary my-workspace -- --preset coding
9
+ # or
10
+ npx @vivary/create my-workspace --preset coding
11
+ ```
12
+
13
+ Presets: `coding` · `second-brain` · `writing`.
14
+
15
+ ## How it works
16
+
17
+ This package is a thin launcher: it runs the Python `create-vivary` scaffolder via
18
+ [uv](https://docs.astral.sh/uv/) (`uvx`) or [pipx](https://pipx.pypa.io/), so the
19
+ scaffolder stays one source of truth in Python while you get a Node-native entry
20
+ point. **Python 3.11+ and uv (or pipx) must be installed.**
21
+
22
+ Prefer Python directly? `uvx create-vivary my-workspace --preset coding` or
23
+ `pip install create-vivary`.
24
+
25
+ ## License
26
+
27
+ MIT.
package/index.js ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ // create-vivary (npm): a thin launcher for the Python `create-vivary` scaffolder.
3
+ // `npm create vivary` / `npx create-vivary` -> runs the published PyPI package via
4
+ // uv (uvx) or pipx, so users get the create-t3-app experience without a manual
5
+ // `pip install`. The scaffolder itself is one source of truth in Python.
6
+ "use strict";
7
+
8
+ const { spawnSync } = require("node:child_process");
9
+
10
+ const args = process.argv.slice(2);
11
+ const onWindows = process.platform === "win32";
12
+
13
+ // VIVARY_FROM lets dev/CI point at a local wheel or path instead of PyPI.
14
+ const from = process.env.VIVARY_FROM;
15
+
16
+ function run(cmd, cmdArgs) {
17
+ return spawnSync(cmd, cmdArgs, { stdio: "inherit", shell: onWindows });
18
+ }
19
+
20
+ // 1) uv (uvx) — preferred, fast, no global install.
21
+ let result = run("uvx", from
22
+ ? ["--from", from, "create-vivary", ...args]
23
+ : ["create-vivary", ...args]);
24
+
25
+ // 2) pipx fallback if uv is not installed.
26
+ if (result.error && result.error.code === "ENOENT") {
27
+ result = run("pipx", from
28
+ ? ["run", "--spec", from, "create-vivary", ...args]
29
+ : ["run", "create-vivary", ...args]);
30
+ }
31
+
32
+ // 3) Neither runner present — guide the user.
33
+ if (result.error && result.error.code === "ENOENT") {
34
+ console.error(
35
+ "create-vivary needs Python tooling to run the scaffolder.\n" +
36
+ "Install uv (https://docs.astral.sh/uv/) or pipx, then re-run `npm create vivary`."
37
+ );
38
+ process.exit(1);
39
+ }
40
+
41
+ process.exit(result.status == null ? 1 : result.status);
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@vivary/create",
3
+ "version": "0.1.0",
4
+ "description": "Scaffold a complete Vivary agent workspace — the create-t3-app for agent-native workspaces. Runs the Python create-vivary via uv/pipx.",
5
+ "bin": {
6
+ "create-vivary": "index.js"
7
+ },
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "type": "commonjs",
12
+ "engines": {
13
+ "node": ">=18"
14
+ },
15
+ "keywords": [
16
+ "vivary",
17
+ "agents",
18
+ "workspace",
19
+ "scaffold",
20
+ "create-app",
21
+ "knowledge-graph"
22
+ ],
23
+ "license": "MIT",
24
+ "author": "Jeff Kazzee",
25
+ "homepage": "https://github.com/vivary-dev/vivary",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/vivary-dev/vivary.git"
29
+ },
30
+ "files": [
31
+ "index.js",
32
+ "README.md"
33
+ ]
34
+ }