- How do I install Orca in a Laravel 12 project?
- Run `composer require make-dev/orca` and execute `php artisan migrate`. Orca auto-injects into local pages, but for WebTerm (in-browser terminal), start the WebSocket server with `php artisan orca:webterm`. Ensure your queue worker is running for WebTerm sessions to work.
- Does Orca work with Laravel 11 or older versions?
- No, Orca requires PHP 8.4+ and Laravel 12. If you're on Laravel 10 or earlier, you’ll need to upgrade first. The package leverages PHP 8.4 features like named arguments and new attributes, which aren’t available in older versions.
- Can I use Orca in production?
- Orca is designed for local development only. It injects a widget into every page in local environments, but it’s not intended for production use. The package explicitly states it’s local-only to avoid security risks or unintended behavior in live apps.
- How does Orca capture Laravel context like routes or Livewire components?
- Orca automatically captures the current route name, Livewire component (if applicable), and authenticated user data. It uses Laravel’s built-in helpers like `Route::currentRouteName()` and `Auth::user()` to enrich the context sent to Claude Code. You can also extend this with custom data via `Orca::addContext()`.
- What happens if the Claude Code API fails or times out?
- Orca includes a fallback mechanism to degrade gracefully. If the Claude Code API fails, it defaults to local PHP CLI execution (e.g., `exec('php artisan tinker')`). You can configure retry logic or error handling via the package’s configuration or middleware.
- Is Orca compatible with Livewire 3 or non-Livewire Blade apps?
- Orca is optimized for Livewire 4 and Laravel 12, but it can work with Blade apps too. However, Livewire context (like component names or state) won’t be available in pure Blade apps. For Livewire 3, compatibility isn’t guaranteed due to potential API changes.
- Can I restrict Orca to specific routes or pages?
- Yes, Orca supports middleware-based injection. You can wrap specific routes with `OrcaMiddleware::class` to control where the widget appears. Alternatively, use environment checks (e.g., `app()->environment('local')`) to limit it to local development.
- Does Orca work with frontend frameworks like Inertia.js or Vue?
- Orca’s widget is framework-agnostic but assumes a server-rendered Laravel environment. Inertia.js or SPA frameworks (Vue/React) may cause conflicts due to hydration or JavaScript injection timing. Test thoroughly in your specific setup, especially if using Livewire alongside SPAs.
- How do I integrate Orca with Laravel’s task scheduler?
- Orca isn’t directly tied to Laravel’s scheduler, but you can trigger Claude Code sessions via custom commands or events. For async operations, use Laravel’s `dispatch()` to run tasks in the background, then interact with them via Orca’s in-browser terminal or API.
- Are there alternatives to Orca for running Claude Code in Laravel?
- If you’re looking for alternatives, consider using the Claude Code CLI directly in your terminal or integrating Anthropic’s API via a custom Laravel command. Tools like Laravel Debugbar or Tinker also provide debugging capabilities, though none offer the same in-browser, context-aware workflow as Orca.