Download the PHP package laravel-ai/cli without Composer

On this page you can find all versions of the php package laravel-ai/cli. 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 cli

Laravel AI CLI

AI-powered CLI tools for Laravel using the Laravel AI SDK. This package provides intelligent commands for asking questions, explaining errors, and reviewing code directly from your terminal.

Features

Requirements

Installation

1. Add the Package to Your Laravel Project

The package will be automatically discovered by Laravel via service provider auto-discovery.

2. Configure Your AI Provider

Currently Supported: OpenAI

Configure your OpenAI API key in your .env file:

Coming Soon: More providers including Anthropic Claude, Google Gemini, and Cohere will be integrated in upcoming releases.

Usage

Get Help

Display comprehensive help information and all available commands:

This will show package information, version details, and usage examples for all available commands.

Ask a Question

Ask the AI assistant any question:

Explain an Error

Get a clear explanation of error messages or log files:

Example:

Review Code

Get feedback on your code from an AI senior engineer:

Example:

Generate Images

Generate AI images from text descriptions:

The command will prompt you to select:

Options:

Modify Images

Modify and enhance existing images:

The command will prompt you to select:

Options:

Command Details

ai:ask

Arguments:

Example:


ai:explain

Arguments:

Example:


ai:optimize

Arguments:

Example:


ai:refactor

Arguments:

Example:


ai:document

Generates comprehensive markdown documentation. The command will prompt you to choose how to receive the documentation:

Arguments:

Output Options:

  1. Display in Terminal - View formatted markdown directly in your terminal
  2. Save to File - Save as DOCUMENTATION_{filename}.md in project root

Example:

The generated documentation includes:


ai:image

Generates AI-powered images from text descriptions.

Arguments:

Options:

Example:

Batch Generation:


ai:imagemod

Modifies and enhances existing images using AI.

Arguments:

Options:

Supported Image Formats:

Example:

Multiple Variations:

Package Structure

How It Works

  1. Service Provider - Auto-loads commands on Laravel startup
  2. Commands - Handle CLI input and file reading
  3. Agents - Implement the AI logic with specific instructions for each task
  4. Laravel AI SDK - Handles communication with the AI provider

Each agent uses the Promptable trait and implements the Agent interface, providing specific instructions to the AI for better results.

Configuration

The package respects your Laravel AI configuration. You can customize behavior by:

  1. Setting environment variables for your AI provider
  2. Modifying agent instructions in the respective Agent classes

Troubleshooting

"File not found" Error

Ensure the file path is correct and relative to your Laravel project root:

"Undefined type" IDE Errors

Run the following to regenerate autoloader files:

AI Response is Empty

  1. Verify your API key is set in .env
  2. Check your API quota/credits
  3. Ensure the file exists and is readable

License

MIT License. See LICENSE file for details.

Support

For issues or feature requests, please open an issue on the repository.


All versions of cli with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^12.0
laravel/ai Version ^0.1
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 laravel-ai/cli contains the following files

Loading the files please wait ...