feat(cli): extract Obelisk runtime into npm package

Add @obelisk-apps/cli with the existing build, search, query, and attune contract plus official skill installation.

Separate the docs-only skill artifact, bootstrap installer, release layout, cross-platform CI, and package-level regression coverage.
This commit is contained in:
tommy0103
2026-07-16 17:26:23 +08:00
parent 49158e9b9c
commit 90191e4604
64 changed files with 1112 additions and 745 deletions
+18
View File
@@ -0,0 +1,18 @@
import { spawnSync } from 'node:child_process';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
export const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
export const cliEntry = join(repoRoot, 'packages', 'cli', 'dist', 'cli', 'src', 'obelisk.js');
export function runCli(args, { home, env = {}, cwd = repoRoot } = {}) {
return spawnSync(process.execPath, [cliEntry, ...args], {
cwd,
env: {
...process.env,
...(home ? { HOME: home, USERPROFILE: home } : {}),
...env,
},
encoding: 'utf8',
});
}