UNPKG

genaiscript

Version:

A CLI for GenAIScript, a generative AI scripting framework.

15 lines (12 loc) 525 B
system({ title: "Information about the current project", }) export default async function (ctx: ChatGenerationContext) { const { $ } = ctx const { stdout: nodeVersion } = await host.exec("node", ["--version"]) const { stdout: npmVersion } = await host.exec("npm", ["--version"]) const { name, version } = (await workspace.readJSON("package.json")) || {} if (nodeVersion) $`- node.js v${nodeVersion}` if (npmVersion) $`- npm v${npmVersion}` if (name) $`- package ${name} v${version || ""}` }