UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

41 lines (35 loc) 1.01 kB
#!/usr/bin/env node /** * AIWG Version Script * * Outputs version and channel information. * Called by `aiwg sync` (step 2) to record the current version before updating. * * @issue #685 */ import { importImpl } from '../_resolve-impl.mjs'; const { getVersionInfo } = await importImpl(import.meta.url, 'channel/manager.mjs'); const args = process.argv.slice(2); const json = args.includes('--json'); try { const info = await getVersionInfo(); const channelLabel = info.channel !== 'stable' ? ` [${info.channel}]` : ''; if (json) { console.log(JSON.stringify({ version: info.version, channel: info.channel, packageRoot: info.packageRoot, devMode: info.devMode, })); } else { console.log(` ${info.version}${channelLabel}`); console.log(` path: ${info.packageRoot}`); } } catch (err) { if (json) { console.log(JSON.stringify({ error: err.message })); } else { console.error(`Version check failed: ${err.message}`); } process.exit(1); }