Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Web Terminal Laravel Package

mwguerra/web-terminal

View on GitHub
Deep Wiki
Context7

Design: allowInteractiveMode Flag

Date: 2026-03-08 Branch: fix/artisan-interactive-commands

Problem

Laravel artisan commands like tinker, reverb:start, queue:work, and horizon don't work in the web terminal because:

  1. Whitelist mode executes commands synchronously — no stdin, 10s timeout, no streaming
  2. allowAllCommands mode enables interactive execution but disables the entire security whitelist
  3. There's no middle ground: secure whitelist OR interactive execution, never both

Solution

Add allowInteractiveMode boolean that decouples interactive execution from the allowAllCommands security bypass.

Changes

  1. WebTerminal.php: New $allowInteractiveMode property
  2. WebTerminal.php: Update shouldUseInteractiveMode() to check both flags
  3. TerminalBuilder.php: New allowInteractiveMode() builder method

Execution Flow (After Fix)

User enters command
  → Validate against whitelist (unchanged)
  → Sanitize input (unchanged)
  → Rate limit check (unchanged)
  → shouldUseInteractiveMode()?
      YES if allowAllCommands=true OR allowInteractiveMode=true
      → Start interactive session (tmux/process)
      → Stream output, accept stdin
      NO → Execute synchronously (existing behavior)

What Stays the Same

  • Command whitelist validation
  • Command sanitization
  • Rate limiting
  • TUI detection (still kills alternate screen apps)
  • All existing tests

Usage

Terminal::local()
    ->allowedCommands(['php *', 'node *', 'npm *'])
    ->allowAllShellOperators()
    ->allowInteractiveMode()
    ->render();
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata