> For the complete documentation index, see [llms.txt](https://docs.electrik.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.electrik.dev/1.x/getting-started/installation.md).

# Installation

Electrik is meant to be installed on a fresh Laravel project. Installing it on an existing project will lead to unwanted results.

Installing Electrik is super easy.

To install Electrik run the below commands in your terminal

{% code title="Create a new Laravel project" %}

```shell
composer create-project laravel/laravel electrik-project --prefer-dist
```

{% endcode %}

{% code title="cd to new project" %}

```
cd electrik-project
```

{% endcode %}

{% code title="Require Electrik" %}

```
composer require electrik/electrik
```

{% endcode %}

{% code title="Install Electrik" %}

```
php artisan electrik:install
```

{% endcode %}

{% code title="Start local server" %}

```
php artisan serve
```

{% endcode %}

That's all! Electrik is now installed on your system. Goto [https://localhost:8000](https://localhost:8000/) to see the magic

After installation, you should update your .env file to update the new config values that Electrik installs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.electrik.dev/1.x/getting-started/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
