# [Discussion] Native terminal helpers for PHP CLI

- Thread: https://staging.externals.io/message/131374
- Original archive: https://news-web.php.net/php.internals/131374
- Started by Pratik Bhujel on 2026-06-18T12:31:28+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://staging.externals.io/search.md?q={query} · RFCs at https://staging.externals.io/rfc.md · JSON API at https://staging.externals.io/api · documentation at https://staging.externals.io/llms.txt

---

## #131374 — Pratik Bhujel — 2026-06-18T12:31:28+00:00

URL: https://staging.externals.io/message/131374#131374

Hi internals,

Quick update: I have continued iterating on this based on the feedback
here. The extension is now at v0.5.0, still pre-1.0, with the object/enum
API shape preserved (`Terminal\Terminal`, `Backend`, `Stream`, `Key`) and
Windows/Linux builds available:

https://github.com/prateekbhujel/php-terminal/releases/tag/v0.5.0

I am still treating this as PECL/ecosystem work first rather than proposing
it for core immediately. Any further feedback on the API shape, missing
primitives, or Windows behavior would be very welcome.

Thanks,
Pratik

---

## #131788 — Derick Rethans — 2026-07-07T10:15:18+00:00

URL: https://staging.externals.io/message/131374#131788 · In reply to: #131374

> Hi internals,
> 
> Quick update: I have continued iterating on this based on the feedback
> here. The extension is now at v0.5.0, still pre-1.0, with the object/enum
> API shape preserved (`Terminal\Terminal`, `Backend`, `Stream`, `Key`) and
> Windows/Linux builds available:
> 
> https://github.com/prateekbhujel/php-terminal/releases/tag/v0.5.0
> 
> I am still treating this as PECL/ecosystem work first rather than proposing
> it for core immediately. Any further feedback on the API shape, missing
> primitives, or Windows behavior would be very welcome.

I have had another look, and I believe the state of the API is now much 
nicer than it was when I looked at it first.

I suppose that you might want to have a look at adopting already streams 
in PHP (such as php://stdout na php://stderr), but I am not sure how 
that could interact.

I guess it makes sense to add it to PIE, as PECL does no longer accept 
new packages.

cheers,
Derick

-- 
https://derickrethans.nl | https://xdebug.org | https://xdebug.cloud
Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/support
mastodon: @derickr@phpc.social @xdebug@phpc.social
