iambateman/speedrun

A GPT-powered tool for Laravel apps.

0.0.8 2023-07-26 03:59 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Instead of typing php artisan make:model Keyword -m, use Speedrun to remember the syntax for you. Just ask for what you want and we will use GPT to figure it out!

Installation

composer require iambateman/speedrun
# Set an OpenAI API Key in your .env
SPEEDRUN_OPENAI_API_KEY=sk-...

Once installed, run php artisan speedrun:demo

Usage

# Speedrun is a fancy Laravel command, so
# out of the box, you would write...

php artisan speedrun how many articles are there

# But if you alias it to `sr`, you get...

sr how many articles are there

# You can write the worst Eloquent queries ever
sr "query family(12)->members get name"

Example commands to try

I was blown away the first time I tried these...it's wild.

# COMPOSER REQUIRE
sr install laravel excel
sr install filament

# PHP ARTISAN
sr make keyword model with migration and factory
sr start queue

# CUSTOM APP COMMANDS (contextual to your app)
sr generate sitemap
sr write articles for city 2

# QUERY YOUR DATABASE (contextual, as well)
sr when did the newest user sign up
sr how many articles are attached to city 2

Testing

Tests are coming soon. Don't judge me, I have a six-month old baby.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

  • Speedrun: iambateman
  • None of this would be possible without the wonderful work of so many people on Artisan, Tinker, Composer, and Laravel in general. Thank you for what you do.
  • All Contributors

Config

Right now there is very limited config, but you can publish if you want:

# (Optionally) publish config.
php artisan vendor:publish --tag="speedrun-config"

License

The MIT License (MIT). Please see License File for more information.