A developer tool for automating setup and management of local Odoo development environments. Streamlines directory structure creation, source code repository management, and installation of required development tools.
trobz_local (CLI: tlc) automates repetitive tasks when setting up an Odoo development environment. Instead of manually creating directories, cloning repositories, and installing dependencies, developers declare their desired environment in a TOML configuration file and tlc handles the rest.
- Environment Initialization (
init): Creates standardized directory structure (default:~/code/) - Repository Management (
pull-repos): Clones/updates Odoo and OCA repos in parallel - Tool Installation (
install-tools): Installs from four sources: scripts, system packages, NPM, and UV tools - Virtual Environments (
create-venvs): Creates Odoo venvs for each configured version - Interactive Mode: Newcomer mode with confirmations and guidance
- Security: HTTPS enforcement for all downloads
- Custom Directory: Use
TLC_CODE_DIRenv var to override default~/codelocation
Install globally using uv:
uv tool install git+ssh://git@github.com:trobz/local.py.git# 1. Initialize directory structure (uses ~/code by default, or set TLC_CODE_DIR)
export TLC_CODE_DIR=~/Development # Optional: customize location
tlc init
# 2. Create config file
cat > ~/Development/config.toml << 'EOF'
versions = ["16.0", "17.0"]
[tools]
uv = ["odoo-venv", "pre-commit"]
npm = ["prettier"]
system_packages = ["postgresql"]
[repos]
odoo = ["odoo", "enterprise"]
oca = ["server-tools"]
EOF
# 3. Setup environment
tlc pull-repos # Clone repositories
tlc create-venvs # Create virtual environments
tlc install-tools # Install tools| Command | Purpose |
|---|---|
tlc init |
Create directory structure (default: ~/code/) |
tlc pull-repos |
Clone or update Odoo/OCA repositories |
tlc create-venvs |
Create Python virtual environments |
tlc install-tools |
Install scripts, packages, and tools |
Use --newcomer=false to skip confirmation prompts. Use --help on any command for options.
Place config.toml in your code directory (default: ~/code/config.toml):
versions = ["16.0", "17.0", "18.0"]
[tools]
uv = ["odoo-venv", "odoo-addons-path", "pre-commit"]
npm = ["prettier", "eslint"]
system_packages = ["git", "postgresql", "pnpm"]
[[tools.script]]
url = "https://astral.sh/uv/install.sh"
name = "uv installer"
[repos]
odoo = ["odoo", "enterprise"]
oca = ["server-tools", "server-ux", "web"]By default, tlc uses ~/code as the base directory. You can customize this by setting the TLC_CODE_DIR environment variable:
# Use a custom directory
export TLC_CODE_DIR=/data/dev
tlc init # Creates directory structure at /data/dev
# One-liner
TLC_CODE_DIR=/custom/path tlc initThe config file will be created at {TLC_CODE_DIR}/config.toml.
See Configuration Schema for all options and validation rules.
- Python 3.10+
uvpackage manager- Linux (Arch, Ubuntu) or macOS
- System tools:
git,wgetorcurl,sh
For detailed information:
- Project Overview & PDR: Features, requirements, configuration schema
- System Architecture: Design patterns, component interactions
- Codebase Summary: Module-by-module technical details
- Code Standards: Development guidelines and conventions
git clone git@github.com:trobz/local.py.git && cd local.py
uv sync && uv run pre-commit install
make check # Linters and type checks
make test # Run testsAGPL-3.0 - See LICENSE for details.