# 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

```


---

# Agent Instructions: 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:

```
GET https://docs.stoobly.com/developer-guide/installation-from-source.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
