Releases: amims71/lara-shell
Release list
v0.2.1 — hardening
lara-shell v0.2.1 — hardening
Fixes from an adversarial hardening pass (each with a regression test; 142 tests total):
- Safety: macro steps now honor the production guard — a guarded command (e.g.
migrate:fresh --force) inside a macro is refused instead of running unconfirmed. - The shell no longer shadows PsySH's own built-ins (
clear,doc,dump, …) via fuzzy matching. helprenders the shell guide andhelp <command>shows per-command usage (both were broken by the command word leaking into the argument).- Quoted arguments with spaces (
make:model "Foo Bar") stay a single token. - Macros accept trailing input without erroring on unknown options.
- ForkingDriver purges all db/redis connections before fork (not just the default) and flushes output buffers before exit.
All validated live in a real Laravel app. Requires PHP 8.2+, Laravel 10/11/12.
v0.2.0 — fast warm-fork execution
lara-shell v0.2.0 — fast warm-fork execution
New: instant commands on Unix (ForkingDriver)
On macOS/Linux (with pcntl + posix), lara-shell now boots your app once and runs each foreground command in a pcntl_fork of the warm process — so commands execute instantly (no re-boot), inherit your real terminal (colors, make:* prompts), and a crash or exit() only kills that fork. Background jobs and the shared registry are unchanged; reload re-execs for fresh code. Windows / hosts without pcntl transparently fall back to the fresh-subprocess driver. Choose with the new driver config key: auto (default), forking, or local.
Fixes (found via live testing in a real app)
- Artisan options now pass through raw — e.g.
route:list --path=apiruns correctly instead of erroringThe "--path" option does not exist(PsySHCodeArgument). - The in-shell
help/hguide no longer shadows PsySH's built-inhelpcommand, which had broken PsySH's internal error-help path.
Also since v0.1.0
- A self-ignoring
.gitignoreis written intostorage/lara-shellso host apps ignore runtime files automatically.
Validated end-to-end in a real Laravel app. 137 tests / 363 assertions. Requires PHP 8.2+, Laravel 10/11/12.
v0.1.0 — interactive artisan shell
lara-shell v0.1.0 — first release
An interactive php artisan shell: bare words run as artisan commands, and raw PHP evaluates in the same session (Tinker fusion), with fuzzy matching, a searchable palette, background job control, aliases & macros, a production safety guard, and an in-shell help guide.
Highlights
php artisan shell(aliases:terminal,repl) with anartisan>prompt and a launch hint- Bare-word artisan dispatch (
serve→php artisan serve) +;escape to force PHP (Tinker fusion) - Fuzzy resolution (exact → prefix → colon-segment → fzf subsequence) and a searchable
palette/? - Background jobs: trailing
&, auto-backgrounded long-runners,jobs/kill <id>(process-tree) /logs <id> [-f], shared across sessions - Aliases (
alias add/rm/list) and@macros, loop-guarded, in a per-project.lara-shell.php - Production safety guard:
block/confirm(re-type the name) /allow - Built-in guide:
help/h(aliasesabout,guide) andhelp <command>usage from the live catalog - Cross-platform driver: each command runs as a fresh subprocess; runtime state is kept in a self-ignoring
storage/lara-shell/
Requirements
PHP 8.2+, Laravel 10 / 11 / 12. 126 tests passing.
Coming next
A fast persistent forking daemon (macOS/Linux) that keeps the framework booted for instant execution, shares jobs over a socket, and runs sessions under a PTY.