This guide covers setting up and contributing to Labelingo. For architectural details and design decisions, see the Design Document.
After cloning the repository, you have two options for setting up your development environment:
Hatch automatically manages virtual environments and dependencies:
# Install Hatch if you haven't already
uv tool install install hatch
# Create and enter development environment with all tools
hatch shell
# Or use specific feature environments
hatch shell cairo # for Cairo support
hatch shell ocr # for OCR support
hatch shell full # for all featuresCommon development commands:
hatch run fmt # format code
hatch run lint # run linters
hatch run typecheck # run type checker-
Install the package in development mode with dev dependencies:
uv pip install -e ".[dev]" -
Install Node.js dependencies:
npm install -g pyright
-
Set up pre-commit hooks:
pre-commit install
Different OCR backends have different system requirements:
# macOS
brew install tesseract
# Ubuntu/Debian
sudo apt-get install tesseract-ocrNo additional system requirements.
pip install paddlepaddle # CPU versionTo install all OCR dependencies:
hatch shell ocr # if using Hatch
# or
uv pip install -e ".[ocr]" # if using manual setup