Download the PHP package gometap/larai-tracker without Composer
On this page you can find all versions of the php package gometap/larai-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gometap/larai-tracker
More information about gometap/larai-tracker
Files in gometap/larai-tracker
Package larai-tracker
Short Description A standalone dashboard to track AI token usage and API costs for Laravel applications.
License Apache-2.0
Informations about the package larai-tracker
Larai Tracker ๐
Larai Tracker is a powerful, standalone dashboard for tracking AI token usage and API costs in Laravel applications. It "invisibly" intercepts AI responses via Laravel's native HTTP Client events, meaning it works with OpenAI, Gemini, Azure, and OpenRouter out of the box with zero code changes to your application logic.
Supports Laravel 10, 11, and 12.
Screenshots
Dashboard
![]()
Logs
![]()
Features
- ๐ต๏ธ Invisible Tracking: Automatically logs AI responses via Laravel's
ResponseReceivedevent. - ๐ Premium Dashboard: Access a high-end AI analytics center at
/larai-tracker. - ๏ฟฝ Singleton Authentication: Secure password-protected dashboard (Config > ENV > DB).
- ๏ฟฝ๐ฐ Cost Calculation: Real-time USD cost estimation for GPT-4o, Gemini Flash, and more.
- ๐ Multi-Provider Support: Seamlessly tracks OpenAI, Azure, Gemini, and OpenRouter.
- โ๏ธ Dynamic Pricing: Sync latest prices or manually override model costs from the UI.
Installation
Install the package via composer:
Publish and run the migrations:
(Optional) Publish the configuration:
Usage
๐ต๏ธ Automatic Tracking
Once installed, the package starts working immediately. Every time your application uses the Laravel Http facade to call an AI provider (OpenAI, Gemini, etc.), Larai Tracker intercepts the response, parses the token usage, and logs it to the database.
๐ Accessing the Dashboard
Navigate to your application's URL at:
https://your-domain.com/larai-tracker
The dashboard features a premium dark-mode interface with:
- Total Investment: Your overall API spent.
- Burn Rate: Today's AI cost.
- Token Metrics: Total computation used.
- Live Stream: A real-time log of the latest AI calls.
Configuration
Authentication (Singleton Auth)
Larai Tracker uses a simple yet secure singleton authentication system. You can set the password in three ways (ordered by priority):
- Database: Change it directly from the Security section in the dashboard settings.
- Environment: Set
LARAI_TRACKER_PASSWORDin your.envfile. - Config: Set it in
config/larai-tracker.php.
If no password is set and you are in a non-local environment, you will be prompted to set up a password upon your first visit.
๐งช Testing
The package includes a comprehensive test suite powered by Pest.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The Apache License 2.0. Please see License File for more information.