browser-use is a comprehensive Python framework that enables AI agents to automate web browser interactions. It provides a unified interface for controlling browsers through Playwright/CDP, integrates with multiple LLM providers for decision-making, and includes sophisticated features like structured data extraction, security controls, token usage tracking, and sandboxed execution. The architecture is modular with clear separation between agent reasoning, browser management, tool execution, and extensibility mechanisms. Key innovations include a flexible action registry system with special parameter injection, domain-aware security watchdogs, automatic LLM cost tracking, and MCP integration for extending agent capabilities. The project demonstrates strong engineering practices with extensive testing, CI/CD pipelines, and comprehensive documentation through examples.
A well-crafted, self-contained application for analyzing and visualizing Claude Code usage logs. The system reads local JSONL transcript files (written by Claude Code regardless of subscription plan), parses them into a local SQLite database, and surfaces token counts, cost estimates, session histories, and subagent attribution through both a terminal CLI (`python cli.py today` / `stats` / `week`) and a rich single-page web dashboard (`python cli.py dashboard`). The dashboard is served by a stdlib-only Python HTTP server and bundles all HTML/JS/CSS inline, using Chart.js from CDN for visualizations. A companion VS Code extension embeds the same dashboard as a sidebar webview, auto-discovering the Python runtime via a flexible install-mode resolution chain (bundled `.py` sources, Homebrew shim, workspace clone, or explicit path). Architecturally, the code is split into three top-level Python modulesβ`scanner.py` (JSONL parsing, SQLite schema management, incremental scanning with deduplication by message ID), `cli.py` (CLI dispatch with per-turn cost calculation using a tiered pricing lookup), and `dashboard.py` (HTTP server with an embedded SPA). There are no third-party Python runtime dependencies; the VS Code extension uses TypeScript with minimal Node.js dependencies (only `@vscode/vsce` for packaging). The test suite is comprehensive, covering unit, integration, and HTTP-level scenarios across all three Python modules plus the entire TypeScript extension. A strict version parity test (`test_version.py`) enforces lockstep between the Python constant, the CHANGELOG heading, and the extension's `package.json`. Notable craftsmanship includes: the incremental scan engine that tracks file mtimes and line counts, processes only new/changed lines, and deduplicates streaming events via a conditional unique index on `message_id`; the one-time topic backfill mechanism for schema upgrades that re-reads only title records without touching token totals; and the VS Code extension's server-manager with configurable readiness probes that distinguishes the dashboard's JSON response shape from arbitrary HTTP 200s. The project is actively maintained with frequent releases, a weekly triage automation, and a detailed AGENTS.md that documents non-obvious invariants (streaming dedup, session model priority, cost calculation per-turn).
This repository provides `claude-monitor`, a privacy-first CLI application for real-time monitoring of Claude Code usage. It reads local JSONL session logs, computes token consumption, costs, and burn rates, and displays them via a Rich-based terminal UI. The tool supports multiple subscription plans (Pro, Max5, Max20, Custom), integrates with Claude Code's official rate limits via statusline capture, and offers an opt-in persistent usage warehouse for historical analysis. It is distributed as a PyPI package with command aliases `cmonitor` and `ccm`. The architecture is modular, with separate packages for CLI, core logic, data ingestion/analysis, monitoring, output formatting, terminal management, UI components, and utilities. Key entry points include the CLI main module (`cli/main.py`), snapshot builder (`output/snapshots.py`), and monitoring orchestrator (`monitoring/orchestrator.py`). The application is well-tested with over 700 tests covering snapshot, trust-layer, warehouse, UI, timezone, and CLI paths. While primarily an application, it incorporates data engineering patterns such as sessionization, percentile-based limit estimation, and a versioned JSON warehouse. The codebase demonstrates strong craftsmanship with reusable components like the P90Calculator, PricingCalculator, TimezoneHandler, and UsageWarehouse. However, it has some technical drift risks due to hardcoded pricing rates, dependency on Claude Code's internal log format, and experimental API features that may change.