PsySH
Runtime developer console, interactive debugger and REPL for PHP, with configurable themes, history management and system shell integration.
PsySH is an interactive PHP console and REPL. Running psysh opens a prompt where you can evaluate expressions, define functions, and inspect results without creating a separate script for each experiment. The manual also covers command history, session variables, shell integration, and configurable themes.
It can be embedded in a PHP program with eval(\Psy\sh()). Execution pauses at that point and opens a shell with access to the surrounding program state. A debugging context can also be passed explicitly to \Psy\debug(), including a bound object for inspecting the current class context.
This is interactive inspection rather than a step-through debugger. The documented embedding workflow supports command-line scripts and PHP's built-in web server; it does not support debugging through Apache, nginx, or PHP-FPM. It suits PHP developers exploring code and investigating application state from the terminal.
Installation
# via Homebrew
brew install psysh
# via Composer (project dependency)
composer require psy/psysh:@stable
Alternatives & related tools
reviewdog
Parses linter output and posts findings in changed lines as review comments on GitHub, GitLab, and Bitbucket, or filters lint results by diff locally.
serve
Node.js CLI that serves a static site, single page application, or single file over HTTP, with a browsable directory listing UI.
Terragrunt
Orchestration tool for OpenTofu/Terraform infrastructure code, used to scale and manage Infrastructure as Code across many modules and environments.
hexyl
Terminal hex viewer that colors bytes by category: NULL, printable ASCII, whitespace, other ASCII, and non-ASCII.
npm-check-updates
CLI that upgrades package.json dependencies to their latest versions, preserving semver range operators. Works with npm, yarn, pnpm, deno, and bun.
add a badge to your README
Maintain PsySH? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/psysh?utm_source=badge)<a href="https://www.trmn.sh/tools/psysh?utm_source=badge"><img src="https://www.trmn.sh/badge/psysh.svg" alt="Featured on trmn" height="20"></a>