A monorepo management tool for the agentic ages
at main 44 lines 1.3 kB view raw
1(** Project initialization for unpac. 2 3 Creates the bare repository structure and initial main worktree. *) 4 5val init : 6 proc_mgr:Git.proc_mgr -> 7 fs:Eio.Fs.dir_ty Eio.Path.t -> 8 string -> 9 Worktree.root 10(** [init ~proc_mgr ~fs path] creates a new unpac project at [path]. 11 12 Creates: 13 - [path/git/] - bare git repository 14 - [path/main/] - worktree for main branch with unpac.toml *) 15 16val is_unpac_root : Eio.Fs.dir_ty Eio.Path.t -> bool 17(** [is_unpac_root path] checks if [path] is an unpac project root. *) 18 19val find_root : 20 fs:Eio.Fs.dir_ty Eio.Path.t -> 21 cwd:string -> 22 Worktree.root option 23(** [find_root ~fs ~cwd] walks up from [cwd] to find the unpac root. *) 24 25val create_project : 26 proc_mgr:Git.proc_mgr -> 27 Worktree.root -> 28 string -> 29 Eio.Fs.dir_ty Eio.Path.t 30(** [create_project ~proc_mgr root name] creates a new project branch. 31 32 Creates orphan branch [project/<name>] with template: 33 - dune-project (lang dune 3.20) 34 - dune with (vendored_dirs vendor) 35 - vendor/opam/ directory 36 37 Updates main/unpac.toml to register the project. *) 38 39val remove_project : 40 proc_mgr:Git.proc_mgr -> 41 Worktree.root -> 42 string -> 43 unit 44(** [remove_project ~proc_mgr root name] removes a project branch and worktree. *)