Skip to content
A simple and colorful flat 2D image shows a geometric computer screen with the Visual Studio Code logo, next to a small 8-bit style terminal window marked by the Node.js logo, and a stylized folder tree highlighting a .vsix file box. The design uses only five bright corporate colors, lacks background, people, or text, and features only iconic shapes with no shadows or gradients in a compact square format.

Installation

GenAIScript is available as a command line or a Visual Studio Code Extension.

GenAIScript requires Node.JS to run. We recommend installing the LTS version using a node version manager.

  1. Install Node.JS (node) with a package manager. You need at least Node.JS v20.

  2. Check your installation

    Terminal window
    node -v
    npx -v

    You should see something similar or higher than the following versions:

    v20.11.1
    10.5.0

The Visual Studio Code Marketplace contains the latest stable release of the extension.

  1. Install Visual Studio Code.

    Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux.

  2. Open your project folder in Visual Studio Code.

  3. Click on the Extensions view

    Icon representing the GenAIScript view in Visual Studio Code, 
located in the activity bar on the left side of the screen.
  4. Search genaiscript and click Install.

    Visual Studio Code Marketplace listing for 'GenAIScript' extension by Microsoft, featuring a logo with 'gen AI' in yellow on a black background, followed by the text 'GenAIScript Generative AI Scripting.' with a settings gear icon to the right.
  5. If successful, you will see the icon in the Extensions view.

    Icon for genAI script view in Visual Studio Code, featuring the text 'gen AI' in white on a dark background with a red outline.
  6. (Optional) Click on the ⚙️ gearwheel icon on the extension page and select Add to Workspace Recommendations.

To install a specific version of the extension, we recommend storing the genaiscript.vsix in your repository and using the manual installation steps.

GenAIScript launches a node server in the default terminal. If the default terminal is not configured or does not support node.js, you may need to update it in your user/workspace settings.

  • Open command palette Ctrl+Shift+P and search for Terminal: Select Default Profile.
  • Select the terminal profile like Git Bash

The latest development build of the extension is also available on through the GitHub releases. This allows access to bug fixes earlier than the marketplace release.

  1. Open the latest release on GitHub

  2. Download the genaiscript.vsix into your project root folder

    • Directory.genaiscript/ folder created by the extension to store supporting files
      • Directorycache/ various cache files
      • Directoryretrieval/ retrieval database caches
      • supporting files
    • genaiscript.vsix
  3. Open your project in Visual Studio Code

  4. Right click on the .vsix file and select Install Extension VSIX…

The genaiscript command line tool lets you run your GenAIScript from any terminal.

Terminal window
npx genaiscript run my-script some/path/*.pdf

npx will automatically install and cache the CLI.

You can add this file in your project to use GenAIScript in a DevContainer, it contains a minimum of tools to get started..

.devcontainer/devcontainer.json
{
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
"customizations": {
"vscode": {
"extensions": ["genaiscript.genaiscript-vscode"]
}
}
}

The devcontainer definition will automatically be used by GitHub CodeSpaces, the devcontainer cli or various editor integrations.

Let’s configure the LLM connection information