psy/psysh
PsySH is a runtime developer console, interactive debugger, and REPL for PHP. Inspect variables, evaluate expressions, and debug live code from your terminal, with configurable themes, history, and integrations like Laravel Tinker.
$_), clipboard/pager support, and runtime config commands mean you can layer product-specific commands (e.g. tenant:inspect, queue:peek) on top rather than forking.trustProject: prompt|always|never, PSYSH_TRUST_PROJECT, --trust-project) directly informs policy: whether a console may be run against untrusted working directories, whether it's permitted in production, and what your pinned-version floor must be.doc command, ls, show, and inline manual lookups make PsySH a teaching surface — supporting decisions to ship "learn the codebase in the console" guides.Adopt when:
@method/@property included), and live runtime values.Shell you configure and drive programmatically), not just a standalone binary.Look elsewhere or proceed with caution when:
0.x; minor releases have shipped behavior changes (e.g. config/copy now resolving to shell commands before PHP functions) and features labeled experimental.For executives (one paragraph): PsySH is a free, MIT-licensed, battle-tested interactive console for PHP — the engine behind Laravel Tinker and Drush, with nearly 10,000 GitHub stars and near-monthly releases. Adopting it gives our engineers a production-grade "talk to the running app" tool at effectively zero licensing cost and no build effort, and it lets us ship a developer console as a product feature rather than a maintenance liability. The main governance item is security hygiene: we pin a version at or above the Restricted Mode release and set an explicit trust policy so the console never loads config from untrusted directories.
For engineering leadership:
config).Shell, register product-specific commands, ship a thin binary. Upstream maintains downstream smoke tests for Laravel and MediaWiki, which lowers integration risk.For security and platform:
trustProject explicitly rather than relying on interactive prompts, and define whether consoles are permitted in production and under what guardrails.Risks to flag: 0.x versioning with occasional behavior changes; experimental features can shift; single-maintainer concentration; and the inherent reality that a REPL executes arbitrary code, which is a feature, not a defect — but must be scoped by policy.
How can I help you explore Laravel packages today?