diff --git a/packages/cli/package.json b/packages/cli/package.json index 2817c96c91..cf6efc2afd 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -57,7 +57,7 @@ "zx": "^7.2.3" }, "scripts": { - "compile": "esbuild src/main.ts --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:pdfjs-dist --external:mammoth --external:llamaindex --external:llm-code-highlighter", + "compile": "esbuild src/main.ts --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:pdfjs-dist --external:mammoth --external:llamaindex --external:llm-code-highlighter && echo '#!/usr/bin/env node' | cat - built/genaiscript.cjs > temp && mv temp built/genaiscript.cjs", "postcompile": "cp built/genaiscript.cjs ../vscode/genaiscript.cjs && node built/genaiscript.cjs help-all > ../../docs/src/content/docs/reference/cli/commands.md", "go": "yarn compile && node built/genaiscript.cjs", "test": "node --import tsx --test src/**.test.ts", diff --git a/packages/core/src/clihelp.ts b/packages/core/src/clihelp.ts index f96cf333af..ea87c186c3 100644 --- a/packages/core/src/clihelp.ts +++ b/packages/core/src/clihelp.ts @@ -1,4 +1,4 @@ -import { RunTemplateOptions } from "." +import { CORE_VERSION, RunTemplateOptions } from "." import { Fragment } from "./ast" import { GENAISCRIPT_CLI_JS, NPM_CLI_PACKAGE } from "./constants" import { MarkdownTrace } from "./trace" @@ -14,7 +14,7 @@ export function generateCliArguments( const cli = [ "npx", "--yes", - NPM_CLI_PACKAGE, + `${NPM_CLI_PACKAGE}@^${CORE_VERSION}`, command, template.id, `"${cliInfo.spec}"`,