Date: 2026-03-08 Version: 2.1.0 Branch: feature/copy-paste-improvements
Add clipboard capabilities to the web terminal: copy-all button, per-block copy on hover, and multi-line paste with confirmation dialog.
navigator.clipboard.writeText() with legacy fallbackcommand-type line + all subsequent output lines until the next command-type lineposition: relative and group class for hover detectionpaste event on the input field\n):
# after trimming)All clipboard interactions are client-side only (Alpine.js). No Livewire round-trips needed for copy operations. The paste confirmation triggers Livewire calls sequentially for execution.
The Blade template groups output lines into blocks at render time. A block starts when a command-type line appears and includes all subsequent non-command lines. Lines before the first command form their own block (system/info messages).
When confirmed, multi-line paste calls $wire.executeCommand() for each line. A queue mechanism in Alpine.js sends lines one at a time, waiting for the Livewire response before sending the next. This respects rate limiting and ensures proper ordering.
resources/views/partials/header.blade.php — Copy All buttonresources/views/partials/output.blade.php — Block grouping + per-block copy buttonresources/views/partials/input.blade.php — Paste event interceptionresources/views/terminal.blade.php — Paste confirmation modal, Alpine.js clipboard helpersresources/css/index.css — Hover/transition styles for copy buttonssrc/Livewire/WebTerminal.php — Method to return plain-text output for copy-allclipboard-document) and switch to checkmark (clipboard-document-check) on successHow can I help you explore Laravel packages today?