Skip to content
Back to search

libretto

The AI toolkit for building reliable browser automations

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/cashew-labs/libretto with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/cashew-labs/libretto'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/saffron-health--libretto/badge.svg)](/listings/saffron-health--libretto)

HTML

<a href="/listings/saffron-health--libretto"><img src="/api/listings/saffron-health--libretto/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

# Add Libretto to your project. Requires Node.js and npm.
npm install libretto

# First-time onboarding: install skills and download Chromium
npx libretto setup

# Check workspace readiness at any time
npx libretto status

`setup` creates the `.libretto/` directory, installs agent skills, and downloads Chromium unless you pass `--skip-browsers`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/plugin.json · Manifest · 5 lines
  1. {
  2. "name": "libretto",
  3. "description": "Browser automation CLI for building, maintaining, and running browser automation workflows by inspecting live pages and prototyping interactions.",
  4. "version": "0.5.2"
  5. }
README.md · README · 145 lines
  1. <!-- Generated from packages/libretto/README.template.md by `pnpm sync:mirrors`. Do not edit directly. -->
  2. <p align="center">
  3. <img src="packages/libretto/assets/readme-banner.png" alt="Libretto" />
  4. </p>
  5. # Libretto
  6. [![npm version](https://img.shields.io/npm/v/libretto)](https://www.npmjs.com/package/libretto)
  7. [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
  8. [![GitHub Discussions](https://img.shields.io/github/discussions/saffron-health/libretto)](https://github.com/saffron-health/libretto/discussions)
  9. [![Discord](https://img.shields.io/badge/Discord-Join%20chat-5865F2?logo=discord&logoColor=white)](https://discord.gg/NYrG56hVDt)
  10. Libretto is a toolkit for building robust web integrations. It gives your coding agent a live browser and a token-efficient CLI to:
  11. - Inspect live pages with minimal context overhead
  12. - Capture network traffic to reverse-engineer site APIs
  13. - Record user actions and replay them as automation scripts
  14. - Debug broken workflows interactively against the real site
  15. We at [Saffron Health](https://saffron.health) built Libretto to help us maintain our browser integrations to common healthcare software. We're open-sourcing it so other teams have an easier time doing the same thing.
  16. https://github.com/user-attachments/assets/9b9a0ab3-5133-4b20-b3be-459943349d18
  17. ### Quick Links
  18. - Website: [libretto.sh](https://libretto.sh)
  19. - Docs: [libretto.sh/docs](https://libretto.sh/docs)
  20. - Repository: [github.com/saffron-health/libretto](https://github.com/saffron-health/libretto)
  21. - Discord: [discord.gg/NYrG56hVDt](https://discord.gg/NYrG56hVDt)
  22. ## Installation
  23. ```bash
  24. # Add Libretto to your project. Requires Node.js and npm.
  25. npm install libretto
  26. # First-time onboarding: install skills and download Chromium
  27. npx libretto setup
  28. # Check workspace readiness at any time
  29. npx libretto status
  30. ```
  31. `setup` creates the `.libretto/` directory, installs agent skills, and downloads Chromium unless you pass `--skip-browsers`.
  32. ## Use cases
  33. Libretto is designed to be used as a skill through your coding agent. Here are some example prompts:
  34. ### One-shot script generation
  35. > Use the Libretto skill. Go on LinkedIn and scrape the first 10 posts for content, who posted it, the number of reactions, the first 25 comments, and the first 25 reposts.
  36. Your coding agent will open a window for you to log into LinkedIn, and then automatically start exploring.
  37. ### Interactive script building
  38. > I'm gonna show you a workflow in the eclinicalworks EHR to get a patient's primary insurance ID. Use libretto skill to turn it into a playwright script that takes patient name and dob as input to get back the insurance ID. URL is ...
  39. Libretto can read your actions you perform in the browser, so you can perform a workflow, then ask it to use your actions to rebuild the workflow.
  40. ### Convert browser automation to network requests
  41. > We have a browser script at ./integration.ts that automates going to Hacker News and getting the first 10 posts. Convert it to direct network scripts instead. Use the Libretto skill.
  42. Libretto can read network requests from the browser, which it can use to reverse engineer the API and create a script that directly calls those requests. Directly making API calls is faster, and more reliable, than UI automation. You can also ask Libretto to conduct a security analysis which analyzes the requests for common security cookies, so you can understand whether a network request approach will be safe.
  43. ### Fix broken integrations
  44. > We have a browser script at ./integration.ts that is supposed to go to Availity and perform an eligibility check for a patient. But I'm getting a broken selector error when I run it. Fix it. Use the Libretto skill.
  45. Agents can use Libretto to reproduce the failure, pause the workflow at any point, inspect the live page, and fix issues, all autonomously.
  46. ### CLI usage
  47. You can also use Libretto directly from the command line. All commands accept `--session <name>` to target a specific session.
  48. ```bash
  49. npx libretto open <url> # launch browser and open a URL
  50. npx libretto run ./integration.ts --headless # run a workflow and close on success
  51. npx libretto run ./integration.ts --headless --stay-open-on-success # keep a successful run inspectable
  52. npx libretto snapshot --session <name> # capture a screenshot and compact accessibility tree
  53. npx libretto exec "<code>" # execute Playwright TypeScript against the open page
  54. npx libretto close # close the browser
  55. ```
  56. `run` sessions are inspectable through the same daemon-backed commands as `open` sessions. Successful runs close the browser by default; pass `--stay-open-on-success` to keep the browser open for `pages`, `snapshot`, and `exec`. Failed or paused workflows keep the browser open so you can inspect the exact page state before fixing or resuming the workflow.
  57. Run `npx libretto help` for the full list of commands.
  58. ## Configuration
  59. All Libretto state lives in a `.libretto/` directory at your project root. See the [configuration docs](https://libretto.sh/docs/understand-libretto/configuration) for details on config files, sessions, and profiles.
  60. ## Telemetry
  61. Libretto records CLI telemetry to help understand CLI usage and help us prioritize improvements. Each resolved command can send only an install id, timestamp, command event name such as `libretto run`, error boolean, package version, build channel (`node_modules`, `source`, or `unknown`), and, when signed into Libretto Cloud, the configured cloud user id. Libretto does not send command arguments, URLs, project paths, session cookies, API keys, error messages or details, or emails.
  62. The install id is stored in the telemetry file at `~/.libretto/telemetry.json`. The implementation lives in [`packages/libretto/src/cli/core/telemetry.ts`](packages/libretto/src/cli/core/telemetry.ts).
  63. To disable telemetry, set `LIBRETTO_TELEMETRY_DISABLED=1`, set `DO_NOT_TRACK=1`, run with `CI=1`, or edit `~/.libretto/telemetry.json` and set `"enabled": false`.
  64. ## Join the Community
  65. Join our Discord to connect with other developers, get help, and share what you've built:
  66. [![Discord](https://img.shields.io/badge/Discord-Join%20chat-5865F2?logo=discord&logoColor=white)](https://discord.gg/NYrG56hVDt)
  67. For longer-form threads, head to [GitHub Discussions](https://github.com/saffron-health/libretto/discussions). Found a bug? [Open an issue](https://github.com/saffron-health/libretto/issues/new).
  68. ## License
  69. [MIT License](LICENSE) — use it freely in commercial and open-source projects.
  70. ## Development
  71. For local development in this repository:
  72. ```bash
  73. pnpm i
  74. pnpm build
  75. pnpm type-check
  76. pnpm test
  77. ```
  78. Source layout:
  79. - `packages/libretto/src/cli/` — CLI commands
  80. - `packages/libretto/src/runtime/` — browser runtime (network, recovery, downloads)
  81. - `packages/libretto/src/shared/` — shared utilities (config, LLM client, logging, state)
  82. - `packages/libretto/test/` — test files (`*.spec.ts`)
  83. - `packages/libretto/README.template.md` — source of truth for the repo and package READMEs
  84. - `packages/libretto/skills/libretto/` — source of truth for the Libretto skill
  85. Run `pnpm sync:mirrors` after editing `packages/libretto/README.template.md` or anything under `packages/libretto/skills/libretto/`.
  86. To check that generated READMEs, skill mirrors, and skill version metadata are in sync without fixing them, run `pnpm check:mirrors`. To release, run `pnpm prepare-release`.
  87. ---
  88. > [!NOTE]
  89. > This is an early-stage project under active development. APIs may change before version 1.0. We recommend pinning to specific versions in production.
  90. Built by the team at [Saffron Health](https://saffron.health).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.