Download the PHP package hassanjrao/laravel-ai-log-search without Composer

On this page you can find all versions of the php package hassanjrao/laravel-ai-log-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-ai-log-search

Laravel AI Log Search

AI-assisted, natural-language search over your Laravel log files — built for very large logs (hundreds of MB) that normal log viewers choke on.

Ask in plain language:

"errors that happened today" · "entries mentioning PaymentJob after 2 pm" · "critical entries related to user 4521"

The AI turns your request into a structured filter (levels, keywords, date range) — it never reads your log file. A deterministic streaming scanner then applies that filter to the file:

The UI is a single self-contained page (vanilla JS, no build step, no frontend framework required).

Demo

🎥 Watch a quick demo on Loom

Requirements

Installation

The service provider is auto-discovered. Visit /ai-log-search (in the local environment it works immediately).

Authorization (required outside local)

Like Telescope, the page is open in the local environment only. Anywhere else you must define a viewAiLogSearch gate (e.g. in AuthServiceProvider::boot()):

Enable AI interpretation (optional)

Pick a driver in .env:

If the AI call fails or returns garbage, the package silently falls back to searching the raw prompt as a keyword — the page keeps working.

Custom AI provider

Bind your own implementation of Hassanjrao\AiLogSearch\Contracts\AiClient in a service provider:

completeJson(string $instruction): ?array receives the interpretation prompt and must return the decoded JSON filter (or null).

Configuration

Key options in config/ai-log-search.php:

Option Default Description
route_prefix ai-log-search URL prefix for the page and its API.
middleware ['web'] Middleware stack (the authorize middleware is always appended).
log_dir storage/logs Directory scanned for *.log files.
driver none gemini, openai, or none (keyword-only).
limits.entries_per_page 200 Max matching entries per request.
limits.byte_budget 50 MB Max bytes scanned per request.
redact true Mask likely PII/secrets in returned entries.

To customize the page itself:

HTTP API

All endpoints live under the configured prefix and honor the same authorization.

Method Endpoint Body Returns
GET /files {files: [{name, size, size_human, modified}]}
POST /query {file, prompt} interpreted filter, explanation, plus the first result page
POST /results {file, filter, offset} {entries, next_offset, eof, file_size, scanned_bytes}

offset is the byte position returned as next_offset by the previous page (0 = start from the end of the file). filter shape:

Security notes

Testing

License

MIT — see LICENSE.


All versions of laravel-ai-log-search with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5|^8.0
ext-json Version *
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^6.5|^7.0
nesbot/carbon Version ^2.0|^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hassanjrao/laravel-ai-log-search contains the following files

Loading the files please wait ...