Local Development Setup
Open Chat Studio uses UV and Invoke for dev automation.
Prerequisites
- Python 3.13 (recommended)
- Node.js >= 24.0.0
- Docker and Docker Compose
- Git
Installation Steps
-
Clone the repository
git clone https://github.com/dimagi/open-chat-studio.git cd open-chat-studio -
Install dependencies
uv venv --python 3.13 source .venv/bin/activate uv sync -
Run the automated setup
inv setup-dev-envThis will: - Install pre-commit hooks - Start database and Redis services - Run database migrations - Build frontend resources - Create a superuser
Manual steps
Install the pre-commit hooks
prek install --install-hooksSet up database
Start the database and redis services and run the DB migrations:
inv up # start the docker services cp .env.example .env ./manage.py migrateBuild the front-end resources
To build JavaScript and CSS files, first install npm packages:
inv npm --install # or npm install npm run devNote
You should be using node >= 24.0.0. If you have nvm installed, you can run
nvm useto switch to the correct version.To check which version you are using use
node --version.Create a superuser
./manage.py createsuperuser -
Start the development server
./manage.py runserver -
Run Celery for background tasks
Celery is required to handle LLM interactions. Run it using:
inv celeryFor a production-like setup, use:
inv celery --gevent
Next: Common Development Tasks