# monopam Opam overlay and monorepo manager using git subtrees. ## Overview Monopam manages synchronization between: - An opam overlay repository - Individual git checkouts of packages - A monorepo using git subtrees This enables maintaining multiple OCaml packages in a single repository while preserving their individual git histories. ## Installation ``` opam install monopam ``` ## Workflow ### Initialize ```bash monopam init ``` Creates configuration and initializes the monorepo structure. ### Check Status ```bash monopam status ``` Shows synchronization state of all packages, including: - Pending commits in checkouts - Uncommitted changes in monorepo - Remote tracking status ### Pull Updates ```bash monopam pull # Pull all packages monopam pull # Pull specific package ``` For each package: 1. Clones or fetches the individual checkout 2. Adds or pulls the subtree in the monorepo ### Push Changes ```bash monopam push # Push all packages monopam push # Push specific package ``` For each package with monorepo changes: 1. Splits the subtree commits 2. Pushes to the individual checkout Use `--upstream` to also push checkouts to their remotes. ### Add/Remove Packages ```bash monopam add # Add package to monorepo monopam remove # Remove package from monorepo ``` ## Directory Structure ``` overlay/ # Opam overlay repository src/ # Individual git checkouts package-a/ package-b/ monorepo/ # Combined monorepo package-a/ # Subtree from src/package-a package-b/ # Subtree from src/package-b ``` ## License ISC