PHPackages                             jrmgx/interactive-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. jrmgx/interactive-bundle

ActiveSymfony-bundle[CLI &amp; Console](/categories/cli)

jrmgx/interactive-bundle
========================

Interact with your Symfony project from the command line.

v1.1.0(4mo ago)053MITPHPPHP &gt;=8.2CI failing

Since Feb 20Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/jrmgx/InteractiveBundle)[ Packagist](https://packagist.org/packages/jrmgx/interactive-bundle)[ Docs](https://github.com/jrmgx/InteractiveBundle)[ RSS](/packages/jrmgx-interactive-bundle/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (10)Versions (4)Used By (0)

InteractiveBundle
=================

[](#interactivebundle)

A bundle to use the php REPL [PsySH](https://psysh.org/) with [Symfony](https://symfony.com/), learn more at [psysh.org](https://psysh.org/).

What this Bundle do exactly?

- Boots [PsySH](https://psysh.org/) with your application dependencies
- Exposes helpers commands to ease the use of your application

Quick Look
----------

[](#quick-look)

To start:

```
$ bin/console interactive
- or -
$ bin/interactive
```

### `service` helper

[](#service-helper)

`service $your_variable_name = the_service_identifier`

You don't have to put the full service name, the helper will do its best to find out.

```
service $repo = BlogPostRepo
var_dump($repo)
object(App\Repository\BlogPostRepository) { ... }

```

### `instance` helper

[](#instance-helper)

`instance $your_variable_name = the_class_name`

You don't have to put the full class name, the helper will do its best to find out.

```
instance $post = BlogPost
var_dump($post)
object(App\Entity\BlogPost) { ... }

```

### Full Example

[](#full-example)

```
$ bin/console interactive
This is an enhanced interactive PHP prompt for your Symfony project!

You can use those command to get class instances and services easily:
 - instance $i = YourClass will give you an instance of the class
 - service $s = ServiceName will give you the service

if any of those fail, you will have a prompt with a list of entries that could match,
pass *null* to be prompted from all
Psy Shell v0.11.12 (PHP 8.1.12 — cli) by Justin Hileman
> instance $post = blogPost

   FOUND  Class "\App\Entity\BlogPost" found for identifier: blogPost

- $post = resolved_class('\App\Entity\BlogPost');
= App\Entity\BlogPost {#8136}

> $post->setTitle('My Title')->setDate(new \DateTime())->setContent('Content');
= App\Entity\BlogPost {#8136}

> service $repo = blogpostRepository

   FOUND  Service "App\Repository\BlogPostRepository" found for identifier: blogpostRepository

- $repo = resolved_service('App\Repository\BlogPostRepository');
= App\Repository\BlogPostRepository {#8212}

> $repo->save($post, true);
= null

>

```

That's it! You now have a new entry in your database.

Aside from that it's the plain old [PsySH](https://psysh.org/)! You can also [customize it](#customize-psysh) to add your own commandes and variables.

Install
-------

[](#install)

You should use [Composer](https://getcomposer.org/) to install the bundle to your project:

```
$ composer require --dev jrmgx/interactive-bundle
```

Usage
-----

[](#usage)

```
$ bin/console interactive
- or -
$ bin/interactive
```

Customize PsySH
---------------

[](#customize-psysh)

### Adding a custom command

[](#adding-a-custom-command)

Adding a custom command for PsySH is as simple as inheriting from `Psy\Command\Command`.

### Adding custom variables

[](#adding-custom-variables)

It is possible to add custom variables to the shell via configuration. Variables can be of any type, container parameters references (e.g. `%kernel.debug%`) or even services (prefixed with `@`, e.g. `"@my_service"`).

```
# config/psysh.yml

psysh:
    variables:
        foo: bar
        router: "@router"
        some: [thing, else]
        debug: "%kernel.debug%"
```

Now if you run `bin/interactive` and then `ls`, you will see the variables `$foo`, `$router`, `$some` and `$debug`.

```
> ls
Variables: $foo, $router, $some, $debug...

```

Credits
-------

[](#credits)

This bundle is developed by [Jerome Gangneux](https://jerome.gangneux.net)

This project has been made possible thanks to:

- [Théo FIDRY](https://github.com/theofidry): main author of this Bundle before the fork ([found here](https://github.com/theofidry/PsyshBundle))
- [Justin Hileman](https://github.com/bobthecow): author of [PsySH](https://psysh.org/) and [all the contributors of the PsySH project](https://github.com/bobthecow/psysh/graphs/contributors)
- [Adrian Palmer](https://github.com/navitronic): gave the lead for porting [PsySH](https://psysh.org/) on [Symfony](https://symfony.com/)

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance76

Regular maintenance activity

Popularity8

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 72.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~544 days

Total

3

Last Release

132d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.4

v1.1.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5556f480403bebb5e759f156ecc1aa7296ed0082944bfbd591e3637985ec36ca?d=identicon)[jrmgx](/maintainers/jrmgx)

---

Top Contributors

[![theofidry](https://avatars.githubusercontent.com/u/5175937?v=4)](https://github.com/theofidry "theofidry (94 commits)")[![Chris53897](https://avatars.githubusercontent.com/u/7104259?v=4)](https://github.com/Chris53897 "Chris53897 (10 commits)")[![navitronic](https://avatars.githubusercontent.com/u/180519?v=4)](https://github.com/navitronic "navitronic (5 commits)")[![maxhelias](https://avatars.githubusercontent.com/u/12966574?v=4)](https://github.com/maxhelias "maxhelias (3 commits)")[![msheakoski](https://avatars.githubusercontent.com/u/4156?v=4)](https://github.com/msheakoski "msheakoski (3 commits)")[![jrmgx](https://avatars.githubusercontent.com/u/42989?v=4)](https://github.com/jrmgx "jrmgx (3 commits)")[![soullivaneuh](https://avatars.githubusercontent.com/u/1698357?v=4)](https://github.com/soullivaneuh "soullivaneuh (2 commits)")[![roverwolf](https://avatars.githubusercontent.com/u/210211?v=4)](https://github.com/roverwolf "roverwolf (1 commits)")[![SebSept](https://avatars.githubusercontent.com/u/2592502?v=4)](https://github.com/SebSept "SebSept (1 commits)")[![vanputten](https://avatars.githubusercontent.com/u/6943823?v=4)](https://github.com/vanputten "vanputten (1 commits)")[![yched](https://avatars.githubusercontent.com/u/193080?v=4)](https://github.com/yched "yched (1 commits)")[![dlancea](https://avatars.githubusercontent.com/u/227576?v=4)](https://github.com/dlancea "dlancea (1 commits)")[![lolautruche](https://avatars.githubusercontent.com/u/313528?v=4)](https://github.com/lolautruche "lolautruche (1 commits)")[![mihaileu](https://avatars.githubusercontent.com/u/54336101?v=4)](https://github.com/mihaileu "mihaileu (1 commits)")[![Nek-](https://avatars.githubusercontent.com/u/972456?v=4)](https://github.com/Nek- "Nek- (1 commits)")[![oradwell](https://avatars.githubusercontent.com/u/5054896?v=4)](https://github.com/oradwell "oradwell (1 commits)")[![rainbow-alex](https://avatars.githubusercontent.com/u/613752?v=4)](https://github.com/rainbow-alex "rainbow-alex (1 commits)")

---

Tags

consolesymfonyREPLpsyshshellinteractive

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jrmgx-interactive-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/jrmgx-interactive-bundle/health.svg)](https://phpackages.com/packages/jrmgx-interactive-bundle)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[psy/psysh

An interactive shell for modern PHP.

9.8k569.8M785](/packages/psy-psysh)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M462](/packages/pimcore-pimcore)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54642.4k4](/packages/jolicode-castor)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k16.8k](/packages/prestashop-prestashop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
