{"id":47726964,"url":"https://github.com/saffron-health/libretto","last_synced_at":"2026-04-30T22:01:09.755Z","repository":{"id":343553557,"uuid":"1171010355","full_name":"saffron-health/libretto","owner":"saffron-health","description":"The AI toolkit for building and maintaining browser automations","archived":false,"fork":false,"pushed_at":"2026-04-30T17:37:02.000Z","size":7219,"stargazers_count":572,"open_issues_count":2,"forks_count":36,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T19:16:34.676Z","etag":null,"topics":["automation","browser","claude-code","codex","rpa"],"latest_commit_sha":null,"homepage":"https://libretto.sh","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saffron-health.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-02T19:20:56.000Z","updated_at":"2026-04-30T17:37:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/saffron-health/libretto","commit_stats":null,"previous_names":["saffron-health/libretto"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/saffron-health/libretto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saffron-health%2Flibretto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saffron-health%2Flibretto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saffron-health%2Flibretto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saffron-health%2Flibretto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saffron-health","download_url":"https://codeload.github.com/saffron-health/libretto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saffron-health%2Flibretto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32478162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","browser","claude-code","codex","rpa"],"created_at":"2026-04-02T20:45:44.021Z","updated_at":"2026-04-30T22:01:09.747Z","avatar_url":"https://github.com/saffron-health.png","language":"TypeScript","funding_links":[],"categories":["Utils","Tools"],"sub_categories":["AI"],"readme":"\u003c!-- Generated from packages/libretto/README.template.md by `pnpm sync:mirrors`. Do not edit directly. --\u003e\n\n# Libretto\n\n[![npm version](https://img.shields.io/npm/v/libretto)](https://www.npmjs.com/package/libretto)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![GitHub Discussions](https://img.shields.io/github/discussions/saffron-health/libretto)](https://github.com/saffron-health/libretto/discussions)\n[![Discord](https://img.shields.io/badge/Discord-Join%20chat-5865F2?logo=discord\u0026logoColor=white)](https://discord.gg/NYrG56hVDt)\n\nLibretto is a toolkit for building robust web integrations. It gives your coding agent a live browser and a token-efficient CLI to:\n\n- Inspect live pages with minimal context overhead\n- Capture network traffic to reverse-engineer site APIs\n- Record user actions and replay them as automation scripts\n- Debug broken workflows interactively against the real site\n\nWe 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.\n\nhttps://github.com/user-attachments/assets/9b9a0ab3-5133-4b20-b3be-459943349d18\n\n### Quick Links\n\n- Website: [libretto.sh](https://libretto.sh)\n- Docs: [libretto.sh/docs](https://libretto.sh/docs)\n- Repository: [github.com/saffron-health/libretto](https://github.com/saffron-health/libretto)\n- Discord: [discord.gg/NYrG56hVDt](https://discord.gg/NYrG56hVDt)\n\n## Installation\n\n```bash\nnpm install libretto\n\n# First-time onboarding: install skill, download Chromium, and pin the default snapshot model\nnpx libretto setup\n\n# Check workspace readiness at any time\nnpx libretto status\n\n# Manually change the snapshot analysis model (advanced override)\nnpx libretto ai configure \u003copenai | anthropic | gemini | vertex\u003e\n```\n\n`setup` detects available provider credentials (e.g. `OPENAI_API_KEY`) and automatically pins the default model to `.libretto/config.json`. Re-running `setup` on a healthy workspace shows the current configuration instead of re-prompting. If credentials are missing for a previously configured provider, `setup` offers an interactive repair flow.\n\nUse `ai configure` when you want to explicitly switch providers or set a custom model string.\n\n## Use cases\n\nLibretto is designed to be used as a skill through your coding agent. Here are some example prompts:\n\n### One-shot script generation\n\n\u003e 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.\n\nYour coding agent will open a window for you to log into LinkedIn, and then automatically start exploring.\n\n### Interactive script building\n\n\u003e 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 ...\n\nLibretto 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.\n\n### Convert browser automation to network requests\n\n\u003e 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.\n\nLibretto 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.\n\n### Fix broken integrations\n\n\u003e 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.\n\nAgents can use Libretto to reproduce the failure, pause the workflow at any point, inspect the live page, and fix issues, all autonomously.\n\n### CLI usage\n\nYou can also use Libretto directly from the command line. All commands accept `--session \u003cname\u003e` to target a specific session.\n\n```bash\nnpx libretto open \u003curl\u003e                    # launch browser and open a URL\nnpx libretto snapshot --objective \"...\"    # capture PNG + HTML and analyze with an LLM\nnpx libretto exec \"\u003ccode\u003e\"                 # execute Playwright TypeScript against the open page\nnpx libretto close                         # close the browser\n```\n\nRun `npx libretto help` for the full list of commands.\n\n## Configuration\n\nAll Libretto state lives in a `.libretto/` directory at your project root. See the [configuration docs](https://libretto.sh/docs/configuration) for details on config files, sessions, and profiles.\n\n## Join the Community\n\nJoin our Discord to connect with other developers, get help, and share what you've built:\n\n[![Discord](https://img.shields.io/badge/Discord-Join%20chat-5865F2?logo=discord\u0026logoColor=white)](https://discord.gg/NYrG56hVDt)\n\nFor 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).\n\n## License\n\n[MIT License](LICENSE) — use it freely in commercial and open-source projects.\n\n## Development\n\nFor local development in this repository:\n\n```bash\npnpm i\npnpm build\npnpm type-check\npnpm test\n```\n\nSource layout:\n\n- `packages/libretto/src/cli/` — CLI commands\n- `packages/libretto/src/runtime/` — browser runtime (network, recovery, downloads, extraction)\n- `packages/libretto/src/shared/` — shared utilities (config, LLM client, logging, state)\n- `packages/libretto/test/` — test files (`*.spec.ts`)\n- `packages/libretto/README.template.md` — source of truth for the repo and package READMEs\n- `packages/libretto/skills/libretto/` — source of truth for the Libretto skill\n\nRun `pnpm sync:mirrors` after editing `packages/libretto/README.template.md` or anything under `packages/libretto/skills/libretto/`.\n\nTo 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`.\n\n---\n\n\u003e [!NOTE]\n\u003e This is an early-stage project under active development. APIs may change before version 1.0. We recommend pinning to specific versions in production.\n\nBuilt by the team at [Saffron Health](https://saffron.health).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaffron-health%2Flibretto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaffron-health%2Flibretto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaffron-health%2Flibretto/lists"}