Skip to content

Repository files navigation

Tesseract Collector

Tesseract Collector connects a Laravel application to the Tesseract desktop debugger. It captures framework telemetry, serves the browser inspection runtime, and exposes local MCP tools for debugging application state.

Warning

This is a development dependency. It can expose logs, database access, storage files, source snippets, mail previews, and Tinker execution to an authenticated Tesseract desktop session. Do not enable it in production or expose its transport routes to an untrusted network.

Requirements

  • PHP 8.3 or newer
  • Laravel 12.41.1 or newer, or Laravel 13
  • Laravel MCP 0.8.2 or any 0.9 release
  • A running Tesseract desktop debugger

Livewire and Volt are optional. When installed, the collector adds component telemetry, checkpoint support, and source tracking. Laravel Boost is also optional; when present, Tesseract's MCP tools join Boost's existing MCP server.

Installation

Install the package as a development dependency:

composer require --dev stillat/tesseract-collector

Laravel discovers TesseractCollectorServiceProvider automatically. Start the Tesseract desktop debugger and then run the Laravel application normally.

To publish the configuration:

php artisan vendor:publish --tag=tesseract-collector-config

The package includes its compiled browser assets. Applications installing the package do not need Node.js or a separate frontend build.

Commands

Check the collector, desktop connection, runtime assets, and optional integrations:

php artisan tesseract:doctor

Run the dedicated local MCP server, or print its MCP configuration entry:

php artisan tesseract:mcp
php artisan tesseract:mcp --json

When Laravel Boost is installed and its MCP command is available, the package adds the Tesseract tools to Boost instead of registering a second connection.

Configuration

The most commonly used environment variables are:

Variable Default Purpose
TESSERACT_COLLECTOR_ENABLED true Master collector switch. Set to false outside local development.
TESSERACT_COLLECTOR_ENABLED_DURING_TESTS false Opts tests into collection; tests are excluded by default.
TESSERACT_COLLECTOR_DESKTOP_LOOPBACK_URL http://127.0.0.1:61230 Desktop relay endpoint.
TESSERACT_COLLECTOR_ROUTE_PREFIX __tesseract/transport Internal HTTP route prefix.
TESSERACT_COLLECTOR_BROWSER_BOOTSTRAP true Injects the browser collector runtime.
TESSERACT_COLLECTOR_MCP_ENABLED true Enables local MCP registration.
TESSERACT_COLLECTOR_BOOST_ENABLED true Enables optional Laravel Boost integration.
TESSERACT_COLLECTOR_INSTRUMENTATION_ENABLED true Enables Blade source instrumentation.
TESSERACT_COLLECTOR_BLADE_STATE_ENABLED true Enables Blade render-state checkpoints.
TESSERACT_COLLECTOR_PROFILING_ENABLED false Enables self-profiling.

See config/tesseract-collector.php for all telemetry, mail-preview, performance, retry, and size-limit settings.

For production deployments, set at minimum:

TESSERACT_COLLECTOR_ENABLED=false

Development

Install PHP and browser-runtime dependencies:

composer install
npm install

Run the package checks:

composer test
composer format:check
npm test
npm run types:check
npm run build

The browser-runtime build is owned by this package. Run npm run dev here for concurrent runtime, inline-bootstrap, and pulse watch builds. The parent Tesseract repository retains build:collector-runtime, dev:collector-runtime, test:collector-runtime, and types:check:collector-runtime only as aliases to these package commands.

Node.js 22 or newer is required for the browser-runtime toolchain. Commit the generated bootstrap-inline.js, runtime.js, runtime.js.map, pulse.js, and pulse.js.map files whenever their TypeScript sources change.

Support and security

Please report suspected security vulnerabilities privately to support@stillat.com instead of opening a public issue.

License

Tesseract Collector is open-sourced software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages