martink/laravel-devcopilot

Laravel package that integrates ChatGPT into your Artisan CLI

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/martink/laravel-devcopilot

v1.4.1 2025-05-05 11:48 UTC

This package is auto-updated.

Last update: 2025-11-05 13:11:32 UTC


README

DevCopilot is a Laravel package that integrates ChatGPT directly into your Artisan CLI, giving you an intelligent assistant for explaining code, generating ideas, and streamlining development tasksβ€”all without leaving your terminal.

Packagist Version Packagist Downloads MIT License

πŸš€ Features

  • πŸ€– Ask ChatGPT questions directly from your Laravel project
  • πŸ—‚οΈ Include file contents as context using --file
  • 🧠 Laravel-specific assistant for routes, controllers, migrations, and more

πŸ“¦ Installation

  1. Require the package via Composer (after it's published to Packagist):
composer require martink/laravel-devcopilot
  1. Publish the config file:
php artisan vendor:publish --tag=config
  1. Set your OpenAI API key in .env:
OPENAI_API_KEY=your-api-key-here

πŸ’‘ Usage

Ask ChatGPT anything:

php artisan gpt:ask "Explain what the middleware 'auth' does in Laravel"

Include a file for deeper context:

php artisan gpt:ask "Explain this file" --file=routes/web.php

βš™οΈ Configuration

Published config file: config/devcopilot.php

return [
    'api_key' => env('OPENAI_API_KEY'),
];

πŸ§ͺ Coming Soon

Multiple file support

  • Context profiles (review, generate, explain)

  • Answer caching

  • Chat history log

πŸ§‘β€πŸ’» Author

Made with ❀️ by Martin Karadzinov