Skip to content

2. Install Guide

Ashley Johnson edited this page Sep 28, 2024 · 8 revisions

Installation Guide

The easiest way to install the package in your laravel app is to run the following command from within your projects directory:

    composer require paparascaldev/sidekick

Older Versions

If you would like to install a specific version you can manually update your composer.json file under require section like so:

    "paparascaldev/sidekick": "^0.1.8"

You can also use @dev tag.

After you have updated the file run:

    composer update

Configuring the .env

Once Sidekick is installed you need to update your .env file with your access tokens.

You only need to specify the token for the provider(s) you will use.

SIDEKICK_OPENAI_TOKEN={API_KEY_HERE} (Recommended)
SIDEKICK_MISTRAL_TOKEN={API_KEY_HERE} (Optional)
SIDEKICK_CLAUDE_TOKEN={API_KEY_HERE} (Optional)
SIDEKICK_COHERE_TOKEN={API_KEY_HERE} (Optional)

Where can I get an API key?

If you are not yet signed up with any of the AI providers, here are some links to help:

Running Migrations

Run your migrations using the command below:

    php artisan migrate

After the .env is updated you can start testing the package.

The Sidekick Playground

In order to see some examples of Sidekick in action I have created a playground. This is not available by default because some may not wish to use it.

If you would like to use it run the following artisan command to install the playground:

  php artisan sidekick:install

This will install the routes and views into your application.

After the install you can access the playground at:

/sidekick/