Overview
The GenAIScript CLI genaiscript
runs GenAIScript scripts
outside of Visual Studio.
where --yes
skips the confirmation prompt to install the package.
Installation
The CLI is a Node.JS package hosted on npm.
Install Node.JS LTS (Node.JS includes npm and npx).
Install locally as a
devDependency
in your project.or install it globally.
No Installation (npx
)
Make sure to install Node.JS as described in step 1 above.
Using npx, you can run the cli without any prior installation steps. npx will install the tool on demand. npx also takes care of tricky operating system issues where the tool is not found in the path.
Add --yes
to skip the confirmation prompt, which is useful in a CI scenario.
You can also lock this call to a particular version.
Create a new script
Creates a new script file in the genaisrc
folder.
Compile scripts
Runs the TypeScript compiler to find errors in the scripts.
Run a script
Runs a genai script on file and streams the LLM output to stdout.
where <script>
is the id or file path of the tool to run, and [files...]
is the name of the spec file to run it on.
Secrets
The CLI will load the secrets from the environment variables or a ./.env
file.
You can also specify a different .env
file using the --env
option.