tinkerbench is a browser based REPL for any project linked in Laravel Herd.
Write a PHP snippet, run it against that project's own app context, and see the output immediately, no separate setup per project.
A take on Laravel's tinker, inspired by Tinkerwell.
- Runs snippets against any Herd linked project, switch projects without leaving the page.
- Saves multiple named snippets per project. Create, rename, and delete them as needed.
- Command palette (
⌘P) to jump between snippets and projects, similar to an editor's quick open. - Monaco based editor with PHP syntax highlighting, autosave, and a run shortcut (
⌘Enter). - PHP autocompletion, hover documentation, and signature help for the target project's own code, powered by intelephense (the same language server VS Code uses).
- Raw or rendered output. Rendered mode shows
dump()/dd()calls with Symfony's interactive VarDumper, syntax highlights JSON, and renders HTML output in a sandboxed frame. - A debug tab next to the output, showing the queries, timing, and dumps a snippet run touched, and any exception it threw.
tinkerbench runs locally on your own machine through Herd. It's a personal dev tool.
- A light theme alongside the current dark one, with a way to switch between them.
Clone the repository and run the setup script:
git clone git@github.com:moessimple/tinkerbench.git
cd tinkerbench
composer setupcomposer setup installs dependencies, configures the environment, and links the project to Herd at https://tinkerbench.test.
Open https://tinkerbench.test. It opens the scratch snippet in the tinkerbench project by default.
- Write PHP in the editor and run it with the play button or
⌘Enter. - Press
⌘Pto search snippets and projects, scope the search to snippets (#prefix) or another Herd project (/prefix), or create a new snippet by typing a name that doesn't exist yet. - Toggle raw/rendered output, clear the output, or maximize the editor from the sidebar icons.
Pull the latest changes and rerun the setup script to bring dependencies and migrations back in sync:
git pull
composer setupRun the full quality gate (formatting, static analysis, type coverage, and the test suite):
composer testThe MIT License (MIT). Please see License File for more information.
