# Repository Briefing: cashew-labs/libretto
> Source: https://repoforai.com/repo/cashew-labs/libretto (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/cashew-labs/libretto
- **Official Docs / Website**: https://libretto.sh
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A (81/100 · Maintenance 31/35 · Adoption 13/25 · Releases 17/20 · License 20/20)
- **Latest Release**: v0.6.45 (2026-08-14) — https://github.com/cashew-labs/libretto/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: CLI
- **Momentum**: 914 ★ total (+0 24h / +2 7d) · 71 forks
- **Topics**: `automation`, `browser`, `claude-code`, `codex`, `rpa`
- **When to Use**: Best for: Teams maintaining authorized browser integrations that need to turn human demonstrations into scripts and debug failures in the original browser session. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Agent integration: The coding-agent skill drives a CLI that selects named browser sessions with `--session <name>`.
- Live inspection: `snapshot` captures a screenshot and compact accessibility tree; `exec` evaluates Playwright TypeScript against the open page.
- Failure recovery: Failed or paused runs leave the browser open; successful runs close it unless `--stay-open-on-success` is set.
- Workflow authoring: Human browser actions can be recorded as the basis for scripts, alongside network capture for authorized integration diagnostics.
- Workspace setup: `setup` creates `.libretto/`, installs agent skills, and downloads Chromium unless `--skip-browsers` is passed.
- Telemetry controls: Set `LIBRETTO_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1`, or disable telemetry in `~/.libretto/telemetry.json`.
```

## Quick Start / Clone
```bash
# 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
```
