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

Laravel Laravel Package

grok-php/laravel

Laravel integration for the GrokPHP client. Add Grok AI chat and vision to Laravel apps with a clean facade API, configurable defaults (model, temperature, timeout), streaming responses, and simple install via artisan. Supports Laravel 10–12, PHP 8.2+.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package integrates seamlessly with Laravel's service container and facade pattern, providing idiomatic Laravel syntax (GrokAI::chat(), GrokAI::vision()) and config-driven setup. It leverages Laravel's dependency injection for service binding and follows PSR standards for clean separation of concerns. The dependency on grok-php/client creates a well-defined layering where Laravel-specific concerns (config, service provider) are abstracted from core API interactions.

Integration feasibility: High feasibility for Laravel 10+ projects. Installation is trivial via Composer and artisan command (php artisan grok:install), which auto-publishes config and .env variables. The facade-based API requires minimal boilerplate code for common use cases (chat/vision), with clear examples in documentation. However, absence of built-in caching, retry logic, or rate-limiting handling in the package may require custom application-level implementation for production workloads.

Technical risk: Moderate risk due to low adoption metrics (163 stars, 0 dependents) and limited third-party validation. The package depends on an unverified upstream client (grok-php/client), which has no public metrics or documentation in the provided materials. Security vulnerability reporting relies solely on a personal email (thefeqy@gmail.com) rather than GitHub's security advisories, raising concerns about vulnerability response maturity. PHP 8.2+ requirement excludes legacy environments, and vision model support appears limited to specific experimental Grok versions without clear version compatibility guarantees.

Key questions:

  • What is the SLA for the underlying Grok API service?
  • How does the package handle API rate limits, retries, and circuit-breaking?
  • Are there known limitations with streaming responses (e.g., memory usage, timeout handling)?
  • What test coverage exists for edge cases like network failures, invalid API keys, or malformed responses?
  • How frequently is the upstream grok-php/client updated relative to Grok API changes?

Integration Approach

Stack fit: Ideal for modern Laravel stacks (10-12) with PHP 8.2+. The package's dependency on Laravel's service container and config system ensures compatibility with standard Laravel patterns (e.g., service providers, env variables). It complements common Laravel patterns like repository layers (for API abstraction) and middleware (for authentication/authorization of AI requests). However, it lacks built-in integration with Laravel-specific tools like Horizon for job queuing or Telescope for debugging, requiring manual implementation.

Migration path: Zero migration complexity for new projects. For existing projects:

  1. Verify PHP 8.2+ and Laravel 10+ compatibility
  2. Install via Composer (composer require grok-php/laravel)
  3. Run php artisan grok:install to generate config and .env template
  4. Add GROK_API_KEY to .env
  5. Replace direct HTTP client calls with GrokAI facade usage No legacy code cleanup is needed since it's a new integration point.

Compatibility: Fully compatible with Laravel 10, 11, and 12. Requires PHP 8.2+ (no PHP 8.1 support). No known conflicts with common Laravel packages (e.g., Sanctum, Breeze) based on provided docs. However, compatibility with non-standard HTTP clients (e.g

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests