> For the complete documentation index, see [llms.txt](https://devworkshops.gitbook.io/masteringvuejs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devworkshops.gitbook.io/masteringvuejs/state-management/installing-vuex.md).

# Installing Vuex

The first step is to install Vuex.

> Vuex is the official centralised state management solution for large-scale apps. Very useful if multiple components need to access the same data.

There are numerous methods to install Vuex including direct download, CDN, NPM and Yarn. Using one of these options you also need to configure Vuex after installation. However the quickest approach is to use the Vue UI or running `vue add vuex` in the command line, as it completely automates the installation and configuration for you.

The following steps outline the procedure to add Vuex to an existing application with the Vue UI. First, launch **Vue UI** from the command-line by running the command:

```bash
vue ui
```

Navigate to the **Northwind Traders** project and select **Plugins** from the side navigation bar.

Click **Add vuex** at the top of the **Project plugins** page:

![](/files/-LXLSrMPV4YVi0djIjYC)

When prompted, click **Continue** and wait for the installation process to complete:

![](/files/-LXLT3MCNPrm37yySqTV)

Once complete, the Vuex plugin will have added / updated the following files:

```
src/store.js
package-lock.json
package.json
src/main.js
```

Before continuing, take the time to review these changes and ensure that you understand the Vuex configuration.


---

# 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://devworkshops.gitbook.io/masteringvuejs/state-management/installing-vuex.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.
