open Cmdliner let cmd = let doc = "Manage pre-commit hooks for OCaml projects." in let man = [ `S Manpage.s_description; `P "$(tname) installs git hooks that enforce code formatting and commit \ message hygiene for OCaml projects."; `S "ENVIRONMENT"; `P "$(b,PRECOMMIT_LOG) can be set to configure logging levels (e.g., \ $(b,debug) or $(b,info))."; `S Manpage.s_bugs; `P "Report issues at https://github.com/gazagnaire.org/ocaml-precommit"; `S "EXIT STATUS"; `P "$(b,0) on success."; `P "$(b,1) if hooks are missing (status) or initialisation failed."; ] in let info = Cmd.info "precommit" ~version:Version.string ~doc ~man in Cmd.group info ~default:Common.setup [ Cmd_init.cmd; Cmd_link.cmd; Cmd_status.cmd; Cmd_check.cmd; Cmd_fix.cmd; Cmd_commit_msg.cmd; ] let () = exit (Cmd.eval cmd)