cashew-labs/libretto
A daemon-backed browser CLI for agent-authored workflows and live debugging
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Libretto is a TypeScript monorepo built around a CLI and a daemon-backed browser session. Both open and run create sessions that can be inspected through the same commands, and --session <name> selects the target. The browser runtime uses Chromium, and exec evaluates Playwright TypeScript against the open page.
packages/libretto/src/cli/ contains the command layer, src/runtime/ handles browser networking, recovery, and downloads, and src/shared/ houses configuration, logging, and state utilities. Project configuration, sessions, and profiles live under .libretto/. The coding-agent interface is concretely a skill plus CLI; no MCP transport or tool schema is established here.
Key Capabilities & Differentiators
The strongest workflow is to demonstrate a task in a live browser, use the recorded actions to author a script, and inspect the same browser when the script breaks. snapshot returns a screenshot and a compact accessibility tree, while exec lets an engineer test Playwright code on the open page. Browser network capture adds request-level visibility when diagnosing an authorized integration.
run --headless supports unattended execution without a visible browser window. Failed or paused workflows retain the browser for inspection. Successful runs close it by default, but --stay-open-on-success preserves the final state for commands such as pages, snapshot, and exec. This is particularly useful when the fault depends on a logged-in session or a specific navigation sequence.
Trade-offs & Limitations
Compared with direct Playwright, Libretto adds a shared session lifecycle for the agent and engineer, so both can inspect the exact failure state instead of trying to recreate it in a fresh browser. That benefit comes with another CLI, daemon-managed browser state, and a pre-1.0 API surface. Pin versions in production. For a small, stable script, direct Playwright is simpler; when a supported API covers the task, it avoids selector maintenance altogether.
Treat profiles, screenshots, and network captures as potentially sensitive, especially for authenticated or healthcare workflows. The CLI telemetry payload excludes URLs, command arguments, session cookies, and API keys, and telemetry can be disabled. That narrow payload does not remove the need to control access to local browser artifacts or to review hosted workflows separately.
Hardware & Deployment Guide
For local use, install Node.js and npm, then run npm install libretto, npx libretto setup, and npx libretto status. Setup creates .libretto/, installs skills, and downloads Chromium unless --skip-browsers is passed. Skipping the download does not remove the need for a usable browser. Source development uses pnpm for the build, type checks, and tests.
Size CPU and memory against representative pages and concurrent Chromium sessions; headless mode still runs a browser. Cloud is a distinct deployment path: v0.6.43 added dedicated Open and Hosted workflows API documentation, v0.6.44 added claimSmsOtp for provisioned Cloud inboxes, and v0.6.45 fixed hosted runtime auth forwarding. These changes establish hosted capabilities, not a self-hostable Cloud stack.
--session <name>.snapshot captures a screenshot and compact accessibility tree; exec evaluates Playwright TypeScript against the open page.--stay-open-on-success is set.setup creates .libretto/, installs agent skills, and downloads Chromium unless --skip-browsers is passed.LIBRETTO_TELEMETRY_DISABLED=1 or DO_NOT_TRACK=1, or disable telemetry in ~/.libretto/telemetry.json.Teams maintaining authorized browser integrations that need to turn human demonstrations into scripts and debug failures in the original browser session.
A supported API already covers the task, direct Playwright meets your needs, or you require a verified MCP endpoint or a self-hostable Cloud stack.
Quick Start & Installation
# 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
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| libretto ★ | 914 | +2 | TypeScript | MIT | A daemon-backed browser CLI for agent-authored workflows and live debugging |
| chrome-devtools-mcp | 60.4k | +760 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| agent-browser | 55.4k | +1k | Rust | Apache-2.0 | Rust CLI and stdio MCP for agents that read and act on live web pages |
| graphify | 156.8k | +2.4k | Python | Apache-2.0 | Local AST graphs for dependency tracing, with CLI and MCP access. |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/cashew-labs/libretto.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about libretto
How does a coding agent connect, and is this a drop-in MCP server?
libretto CLI. The CLI targets named browser sessions with --session <name>, and the same inspection commands work for sessions created by open or run. Do not assume the package exposes an MCP transport or tool schema; verify that separately if your agent requires MCP.What should I budget for hardware and runtime overhead?
Can we use it commercially and keep sensitive workflows local?
When should we choose Libretto over direct Playwright or a supported API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy