> For the complete documentation index, see [llms.txt](https://docs.empirica.ly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.empirica.ly/getting-started/updating-your-experiment.md).

# Updating your experiment

When new features or bug fixes are added to Empirica, you should try to upgrade to the latest version.

{% hint style="info" %}
&#x20;Before upgrading, you can head over to the [Empirica Release Notes](https://github.com/empiricaly/empirica/releases) to verify that there are no BREAKING CHANGES between your current and the latest versions.

To check the current version of your experiment, see [#check-the-current-version-of-your-experiment](#check-the-current-version-of-your-experiment "mention").
{% endhint %}

## Check the current version of your experiment

At the root of your experiment, run `empirica version`:

```
$ empirica version
Version: v1.0.0-rc.24
SHA:     bc4184e
Build:   169
Branch:  main
Time:    2022-12-28T08:21:58Z

Client:  1.0.0-rc.24
Server:  1.0.0-rc.24
```

## Updating Empirica in your Experiment

You can update the packages in your experiment by running the following command at the root of your experiment:

<pre><code><strong>$ empirica upgrade
</strong></code></pre>

Within your current experiment, this will upgrade both the `empirica` command and the npm packages used in `client/` and `server/`. This will **not** upgrade the `empirica` command globally. To upgrade the empirica command globally, see [#updating-the-empirica-command](#updating-the-empirica-command "mention")

## Change to a specific version in your experiment

If you need to upgrade (or downgrade) to a specific version of Empirica, you can pass the exact version like so:

```
$ empirica upgrade --version "v1.2.3"
```

You can also choose to only upgrade the command line or the npm packages individually with either:

```
$ empirica upgrade --commandOnly
$ empirica upgrade --packagesOnly
```

## Updating the Empirica command

To upgrade the `empirica` command globally (outside any existing experiment), run the following:

```
$ empirica upgrade --global
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.empirica.ly/getting-started/updating-your-experiment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
