Jump to
↵select↑↓navigateescclose

Scaffolding

Choose a mode

The two things the odoo-nix scaffolder does, how it picks one from the directory you run it in, and when to write the flake yourself instead.

Updated
Tags
  • scaffolding
  • odoo-init

nix run github:Avunu/odoo-nix runs odoo-init. It has two modes, and it detects which one from the target directory (the current directory when that is an Odoo tree or an odoo-nix project, otherwise a new directory it asks for or you name):

The directoryModeRead
Empty, or missingScaffold a new projectCreate a new project
An Odoo tree in odoo-nix's layout: OCB at odoo/, repos under modules/, your modules under custom/Migrate it in placeMigrate an existing tree
Already an odoo-nix projectRepair it (migration mode)Migrate an existing tree
Anything else that is not emptyRefused, with the flag that would force a modeScaffolder

--init and --migrate force a mode, and --dry-run prints the plan without changing anything. Neither mode overwrites a file that exists or commits anything unless you pass --commit: the result is staged for you to review.

A repository that is a library of modules mounted by other projects is a different shape: it takes OCB as a flake input instead of a submodule. The scaffolder does not write that one. See Write the flake by hand.

Every flag and exit code is in the scaffolder reference.