A collection of practical exercises to learn and master GenAIScript.
- Node.js v20+
nvm install 20.12.0
- pnpm v9+
npm install -g pnpm
- An Anthropic API key
-
Install dependencies:
pnpm install
-
Create a
.env
file in the root directory with your Anthropic API key:ANTHROPIC_API_KEY=your-api-key-here
-
Install GenAIScript VSCode Extension (1.72.0)
code --install-extension genaiscript.genaiscript-vscode@1.72.0
-
Make sure everything is working by running the first exercise:
$ pnpm genaiscript run ex0
If successful, you should see a creative poem generated by Claude.
Each exercise is contained in a separate file in the genaisrc
directory named exN.genai.mts
where N is the exercise number.
To run an exercise:
$ pnpm genaiscript run exN
Or by using VSCode Extension