gon monorepo
Operations for managing the relationship between the monorepo and individual module repositories.
Split
Extract modules and themes from the monorepo into their individual Git repositories. Each module in src/ and each theme in resources/themes/ gets its own repo for independent versioning and distribution via gon require.
gon monorepo:split --dry-run # Preview what would be splitgon monorepo:split --all # Split all modules + themesgon monorepo:split --module=Cart # Split single module
Sync
Push changes from the monorepo to individual module repositories. Detects which modules have changed since the last sync and pushes only the affected subtrees. Use after committing changes in the monorepo to keep module repos up to date.
gon monorepo:sync --all # Sync all changed modulesgon monorepo:sync --module=Cart # Sync specific module
Pull
Pull changes from an individual module or theme repository back into the monorepo. Useful when the upstream repo was updated independently (e.g. via a PR or a gon push from a consuming project) and you need to merge those changes into the monorepo.
gon monorepo:pull Cart # Module → src/Cartgon monorepo:pull --theme=gon # Frontend theme → resources/themes/frontend/gongon monorepo:pull --theme=float --theme-type=admin # Admin theme → resources/themes/admin/floatgon monorepo:pull Cart --branch=feature/new-flow # Custom branchgon monorepo:pull Cart --no-squash # Preserve upstream history
The module argument and --theme are mutually exclusive. Theme support was added in gon-cli v1.51.0; earlier versions only handle modules.
Forward
Forward recent monorepo commits to all affected module repositories. Scans commits since a given timestamp and automatically syncs each module that was touched. Ideal for batch-propagating a set of monorepo changes.
gon monorepo:forward --since="2026-03-24T10:00:00" # Forward recent changes