# Installation from Source

To contribute and submit changes to Stoobly, you must first install from the source code.

## Prerequisite

Install [poetry ](https://python-poetry.org/docs/)with the following command:

{% tabs %}
{% tab title="macOS" %}

```bash
curl -sSL https://install.python-poetry.org | python3 -
```

{% endtab %}

{% tab title="Ubuntu" %}

```bash
curl -sSL https://install.python-poetry.org | python3 -
```

{% endtab %}
{% endtabs %}

## Install

1. Download the agent source code:

```bash
git clone https://github.com/Stoobly/stoobly-agent.git
```

2. Change your directory to where you cloned it and run the install command:

```bash
poetry install
```

## Run

To start the agent, run:

```
poetry run stoobly-agent run
```

The above command will expose the proxy on port 8080 and the UI on port 4200

{% hint style="info" %}

* If the proxy port conflicts, configure it with the `--proxy-port INTEGER` flag
* If the UI port conflicts, configure it with `--ui-port INTEGER` flag
  {% endhint %}

Then you should see output like this to indicate that it started up successfully:

```
[INFO] UI starting and listening at 0.0.0.0:4200
[INFO] Proxy starting with mode regular and listening at 0.0.0.0:8080
[INFO] Proxy configured to mock

```
