# bobthecow/psysh

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/bobthecow-psysh).**

9,829 stars · 317 forks · PHP · MIT

## Links

- GitHub: https://github.com/bobthecow/psysh
- Homepage: https://psysh.org
- awesome-repositories: https://awesome-repositories.com/repository/bobthecow-psysh.md

## Topics

`cli` `php` `psysh` `repl` `shell`

## Description

PsySH is an interactive read-eval-print loop and shell environment for PHP. It functions as a runtime debugger and application inspector, allowing for the execution of PHP code in real-time to experiment with snippets and inspect live application state.

The project is distinguished by its ability to be embedded directly into running PHP applications for live troubleshooting. It provides specialized tools for state manipulation, including the ability to bypass visibility restrictions to inspect private or protected object members and the capacity to reload code without restarting the session.

The tool covers broad capability areas including runtime debugging, execution profiling, and source code inspection. It includes integrated language documentation retrieval and supports a configurable console environment with custom command extensions and data casting.

The environment supports project-specific configuration overrides and automatic integration of external libraries and autoloaders during startup.

## Tags

### Development Tools & Productivity

- [Read-Eval-Print Loops](https://awesome-repositories.com/f/development-tools-productivity/read-eval-print-loops.md) — Provides an interactive read-eval-print loop for executing and testing PHP code snippets in real-time.
- [Runtime Debugging](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/debugging-diagnostics/debugging-inspection-tools/debugging-and-inspection-tools/runtime-debugging.md) — Inspects live application state and analyzes call stacks to identify bugs in active PHP processes.
- [Interactive REPLs](https://awesome-repositories.com/f/development-tools-productivity/interactive-repls.md) — Implements an interactive read-eval-print loop for real-time PHP code execution and state inspection.
- [Object Inspection Tools](https://awesome-repositories.com/f/development-tools-productivity/object-inspection-tools.md) — Allows listing variables, methods, and constants of a class or instance to analyze object structure. ([source](https://github.com/bobthecow/psysh/wiki/Commands))
- [Runtime Object Inspectors](https://awesome-repositories.com/f/development-tools-productivity/runtime-object-inspectors.md) — Provides tools for browsing class members and viewing source code of objects during runtime.
- [Source Code Viewers](https://awesome-repositories.com/f/development-tools-productivity/source-code-viewers.md) — Displays the underlying source code for specific objects, classes, or methods for immediate inspection. ([source](https://github.com/bobthecow/psysh/wiki/Commands))
- [Shell Environments](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/terminal-cli-enhancements/shell-terminal-utilities/configuration-environment-management/shell-environments.md) — Offers a console interface that combines PHP execution with system shell commands and session history.
- [Breakpoint Managers](https://awesome-repositories.com/f/development-tools-productivity/breakpoint-managers.md) — Pauses execution at defined breakpoints to examine variables within the current runtime context. ([source](https://github.com/bobthecow/psysh/wiki/Usage))
- [Command Line Extensions](https://awesome-repositories.com/f/development-tools-productivity/command-line-extensions.md) — Supports adding custom commands to the interactive session to perform specialized tasks via configuration. ([source](https://github.com/bobthecow/psysh/wiki/Configuration))
- [Environment Bootstrapping](https://awesome-repositories.com/f/development-tools-productivity/environment-bootstrapping.md) — Provides automated loading of external files and autoloaders to prepare the runtime state upon startup.
- [External Editor Integrations](https://awesome-repositories.com/f/development-tools-productivity/external-editor-integrations.md) — Integrates with external system editors to allow the composition of complex code blocks before execution. ([source](https://github.com/bobthecow/psysh/wiki/Commands))
- [Hot Code Reloading](https://awesome-repositories.com/f/development-tools-productivity/hot-code-reloading.md) — Refreshes loaded classes and functions without restarting the session to test logic changes immediately. ([source](https://github.com/bobthecow/psysh/wiki/Home))
- [Integrated Documentation](https://awesome-repositories.com/f/development-tools-productivity/integrated-documentation.md) — Retrieves core PHP language manuals directly within the interactive console. ([source](https://github.com/bobthecow/psysh/wiki/PHP-manual))
- [Shell Command Runners](https://awesome-repositories.com/f/development-tools-productivity/shell-command-runners.md) — Provides an interface for executing native operating system commands directly from within the interactive PHP environment.
- [Execution Profiling](https://awesome-repositories.com/f/development-tools-productivity/shell-execution-environments/execution-profiling.md) — Measures the execution time of specific code blocks to identify performance bottlenecks. ([source](https://github.com/bobthecow/psysh/wiki/Commands))

### Programming Languages & Runtimes

- [Live Code Evaluation](https://awesome-repositories.com/f/programming-languages-runtimes/live-code-evaluation.md) — Enables real-time evaluation of PHP code and object inspection within a running application without restarting the process. ([source](https://github.com/bobthecow/psysh/wiki/Tutorials))
- [Embedded Interactive Shells](https://awesome-repositories.com/f/programming-languages-runtimes/embedded-interactive-shells.md) — Enables the integration of an interactive command line directly into running PHP applications for live troubleshooting.
- [Execution State Analysis](https://awesome-repositories.com/f/programming-languages-runtimes/execution-state-analysis.md) — Provides the ability to inspect the current call stack and exception backtraces during runtime. ([source](https://github.com/bobthecow/psysh/wiki/Commands))
- [Interactive PHP Environments](https://awesome-repositories.com/f/programming-languages-runtimes/interactive-php-environments.md) — Quickly prototyping PHP logic and exploring library behavior within a configurable console environment.
- [Runtime Debuggers](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-debuggers.md) — Enables pausing execution to examine variables and analyze the call stack within a live PHP environment.
- [Automatic Import Resolution](https://awesome-repositories.com/f/programming-languages-runtimes/automatic-import-resolution.md) — Automatically adds use statements for unqualified class references when a single match is found in configured namespaces. ([source](https://github.com/bobthecow/psysh/wiki/Sample-config))
- [Dependency Integration](https://awesome-repositories.com/f/programming-languages-runtimes/dependency-integration.md) — Automatically integrates external libraries and autoloader files upon startup based on the working directory. ([source](https://github.com/bobthecow/psysh/wiki/Configuration))
- [Exception Renderers](https://awesome-repositories.com/f/programming-languages-runtimes/php-exception-handlers/exception-renderers.md) — Transforms intercepted exceptions into structured, human-readable stack traces and diagnostic data.
- [Reflection-Based State Inspection](https://awesome-repositories.com/f/programming-languages-runtimes/reflection-based-state-inspection.md) — PsySH evaluates code while ignoring private or protected access modifiers to inspect the internal state of objects. ([source](https://github.com/bobthecow/psysh/wiki/Commands))
- [Runtime Bootstrapping](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-bootstrapping.md) — Provides the ability to load specific files and autoloaders at session start to prepare the runtime state. ([source](https://github.com/bobthecow/psysh/wiki/Config-options))
- [System Shell Integrations](https://awesome-repositories.com/f/programming-languages-runtimes/system-shell-integrations.md) — Allows running external operating system commands from the interactive prompt to manage files and processes. ([source](https://github.com/bobthecow/psysh/wiki/Home))

### Software Engineering & Architecture

- [Reflection-Based Property Accessors](https://awesome-repositories.com/f/software-engineering-architecture/reflection-based-unmarshallers/reflection-based-property-accessors.md) — Uses reflection to bypass visibility modifiers and inspect private or protected object properties at runtime.
- [Runtime Shell Embedding](https://awesome-repositories.com/f/software-engineering-architecture/application-embedding-interfaces/runtime-shell-embedding.md) — Allows the integration of the interactive shell directly into existing PHP applications for live experimentation. ([source](https://github.com/bobthecow/psysh/wiki/Integrations))
- [Runtime State Namespaces](https://awesome-repositories.com/f/software-engineering-architecture/namespace-management/runtime-state-namespaces.md) — Automatically resolves unqualified class names by searching configured namespaces within the live execution environment.
- [Input Processing Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/transformation-pipelines/input-processing-pipelines.md) — Allows modifying the validation and transformation pipeline to change how user input is processed before execution. ([source](https://github.com/bobthecow/psysh/wiki/Config-options))

### Data & Databases

- [Object Casting Chains](https://awesome-repositories.com/f/data-databases/data-transformation-functions/transformation-chains/log-formatting-chains/object-casting-chains.md) — Implements a chain of registered formatter functions to transform complex objects into human-readable strings.
- [Output Casting Functions](https://awesome-repositories.com/f/data-databases/data-type-definitions/scalar-types/custom-scalar-marshaling/output-casting-functions.md) — Enables defining how specific objects and scalars are formatted for output by registering custom casters. ([source](https://github.com/bobthecow/psysh/wiki/Sample-config))
- [Code Documentation Retrieval](https://awesome-repositories.com/f/data-databases/semantic-information-retrieval/code-documentation-retrieval.md) — Retrieves documentation and type information for classes, methods, and properties based on the active namespace. ([source](https://github.com/bobthecow/psysh/wiki/Commands))

### DevOps & Infrastructure

- [Configuration Overrides](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-resolution-engines/configuration-overrides.md) — Applies project-specific configuration settings from a local file to override global environment behavior. ([source](https://github.com/bobthecow/psysh/wiki/Configuration))

### Part of an Awesome List

- [Command Line Tools](https://awesome-repositories.com/f/awesome-lists/devtools/command-line-tools.md) — Interactive REPL for testing and debugging code.
