github-tui/lib/cli.ml
2024-01-07 14:59:21 +00:00

17 lines
469 B
OCaml

open Cmdliner
let repo_arg =
let doc = "The GitHub repository to launch." in
Arg.(value & pos 0 string "NOT_SPECIFIED" & info [] ~docv:"OWNER/REPO" ~doc)
let gh_tui_t = Term.(const Tui.start $ repo_arg)
let cmd =
let doc = "TUI of a GitHub repository" in
let man = [
`S Manpage.s_bugs;
`P "Submit bug reports at: https://github.com/chshersh/github-tui/issues" ]
in
let info = Cmd.info "gh-tui" ~version:"0.1.0" ~doc ~man in
Cmd.v info gh_tui_t