Skip to content

Configuring the Development Environment

Matthew Casperson edited this page Mar 31, 2025 · 21 revisions

Install Python3

Install Python3 from the Python downloads page.

Linux users should install Python using their distribution's package manager.

Clone the repo

git clone https://github.com/OctopusSolutionsEngineering/OctopusCopilot.git
cd OctopusCopilot

Create a virtual environment

Virtual environments provide an isolated space for project dependencies.

python3 -m venv .venv

Enter the virtual environment

Linux and macos

source .venv/bin/activate

Windows

.venv/bin/Activate.ps1

Install the dependencies

pip3 install -r requirements.txt

Download Octoterra

Octoterra is a service used to convert Octopus resources to HCL. The HCL is then passed to an LLM as context to describe the configuration of the Octopus instance.

  • Download the latest release from GitHub
  • Extract the zip file

Run Octoterra

Octoterra must be run listening on port 8081. The port is determined by the environment variable FUNCTIONS_CUSTOMHANDLER_PORT.

Linux and macos

FUNCTIONS_CUSTOMHANDLER_PORT=8081 ./octoterra_linux_amd64_azure

Windows

$env:FUNCTIONS_CUSTOMHANDLER_PORT=8081
./octoterra_windows_amd64_azure.exe

Configure environment variables from "Octopus Copilot OpenAI" in OnePassword

There are a number of environment variables capturing secrets required to run the Copilot backend.

Octonaughts can pin @matthew.casperson in #project-github-copilot to access the shared password containing the values for these variables.

export OCTOPUS_CLI_API_KEY=API-xxxx
export OCTOPUS_CLI_SERVER=https://yourinstance.octopus.app
export OPENAI_ENDPOINT=https://xxx.openai.azure.com/
export OPENAI_API_KEY=xxx
export OPENAI_API_DEPLOYMENT=gpt4o
export APPLICATION_OCTOTERRA_URL=http://localhost:8081

Do a query

The CLI interface is for local testing. We don't distribute the CLI for any production usage.

python3 main.py --query "Show the projects from the Default space"
Clone this wiki locally