Skip to content

Releases: amims71/lara-shell

v0.2.1 — hardening

Choose a tag to compare

@amims71 amims71 released this 01 Jul 12:20

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.
  • help renders the shell guide and help <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

Choose a tag to compare

@amims71 amims71 released this 01 Jul 11:58

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=api runs correctly instead of erroring The "--path" option does not exist (PsySH CodeArgument).
  • The in-shell help/h guide no longer shadows PsySH's built-in help command, which had broken PsySH's internal error-help path.

Also since v0.1.0

  • A self-ignoring .gitignore is written into storage/lara-shell so 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

Choose a tag to compare

@amims71 amims71 released this 01 Jul 10:56

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 an artisan> prompt and a launch hint
  • Bare-word artisan dispatch (servephp 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 (aliases about, guide) and help <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.

Docs: https://amims71.github.io/lara-shell/