Create a new package
Use this if you want Libretto to scaffold a new package with directory structure, example workflows, and dependencies. This works whether you’re starting fresh or adding Libretto as a new package to a monorepo.Scaffold the package
my-automations). You can also pass it directly:.libretto/ directory, copies agent skill files, and walks you through configuring a snapshot analysis model.Run this yourself in a terminal — not through an agent. It may prompt for
input and starts a Chromium download that takes a moment.
Set your API key
Libretto uses an AI model to analyze page snapshots during workflow generation. Add the API key for your chosen provider to a See the AI Provider Reference for the full list of supported providers and their environment variables.
.env file in your project root:Install into an existing package
If you already have a Node.js package that you plan to use for Libretto automations, you can skip the scaffolding and just install Libretto directly.Run setup
.libretto/ directory, copies agent skill files, and walks you through configuring a snapshot analysis model.Run this yourself in a terminal — not through an agent. It may prompt for
input and starts a Chromium download that takes a moment.
Set your API key
Libretto uses an AI model to analyze page snapshots during workflow generation. Add the API key for your chosen provider to a See the AI Provider Reference for the full list of supported providers and their environment variables.
.env file in your project root:Create a workflow
Create a workflow file — for example, The
src/workflows/scrape-page.ts:src/workflows/scrape-page.ts
workflow() function wraps your automation with browser lifecycle management, error handling, and session recording.CLI reference
Full reference for every Libretto command and flag.
Workflow API
Write workflow files with the typed
workflow() API.