Download Latest Version PsySH v0.12.22 source code.tar.gz (348.3 kB)
Email in envelope

Get an email when there's a new version of PsySH

Home / v0.12.21
Name Modified Size InfoDownloads / Week
Parent folder
psysh-v0.12.21.tar.gz 2026-03-06 2.2 MB
PsySH v0.12.21 source code.tar.gz 2026-03-06 318.0 kB
PsySH v0.12.21 source code.zip 2026-03-06 583.5 kB
README.md 2026-03-06 2.4 kB
Totals: 4 Items   3.1 MB 0

Added an experimental interactive readline: a from-scratch pure-PHP readline replacement built specifically for PsySH. Instead of delegating to ext-readline or ext-libedit, this gives PsySH full control over input, editing, completion, and rendering.

This is opt-in and experimental. Default behavior is completely unchanged. Enable it in your config or from the command line:

:::php
'useExperimentalReadline' => true,

:::bash
psysh --experimental-readline

See the interactive readline wiki page for more!

Completions that actually understand your code

The new completion engine is syntax-aware, type-aware, and runtime-value-aware. It parses your input, resolves types from live objects in scope, and completes based on what your code actually is, not just string matching on symbol names.

Type $user-> and see that object's actual methods and properties. Chain through $repo->find(1)-> and get completions for the return type. Fuzzy matching means asum finds array_sum and stl finds strtolower. Completions show in a navigable multi-column menu.

Multi-line editing

Press Enter on an incomplete statement and the input continues on the next line with proper indentation. Closing brackets auto-dedent. Shift+Enter always inserts a newline. No more fighting the shell to write a multi-line closure.

History

  • Reverse history search (Ctrl+R) with an overlay showing match highlighting, smart-case filtering, deduplication, and keyboard navigation.
  • Filtered history navigation: type part of a previous command, then press Up/Down to cycle through matching history entries.

And more

  • Fish-style inline autosuggestions from your history. This one's still a bit rough; enable it separately with 'useSuggestions' => true.
  • Bracket and quote auto-pairing with smart backspace.
  • Bracketed paste mode: pastes multi-line code verbatim without executing line-by-line.
  • No ext-readline or ext-libedit required. Works with any terminal.
  • Ctrl+L to clear the screen.

This addresses a bunch of long-standing issues: [#234], [#254], [#309], [#346], [#506], [#561], [#668], [#732], [#769], [#869].

We'd love your feedback! Give it a try, and let us know what works and what doesn't. The goal is to make this the default. Help us get it there. 🧪

Source: README.md, updated 2026-03-06