WIP: Add CLI

This commit is contained in:
Dmitrii Kovanikov 2024-01-07 12:57:06 +00:00
parent e9d760cf39
commit 06f9cf2b45
6 changed files with 29 additions and 10 deletions

View File

@ -17,4 +17,4 @@ query {
|}
*)
let () = Github_tui.Tui.start ()
let () = Github_tui.Main.main ()

View File

@ -17,11 +17,13 @@
(synopsis "A short synopsis")
(description "A longer description")
(depends
ocaml
(ocaml (>= "5.1"))
dune
ezcurl
minttea
terminal
(core (>= "v0.16.2"))
(core_unix (>= "v0.16.0"))
(ezcurl (>= "0.2.4"))
(minttea (>= "0.0.2"))
(ppx_jane (>= "v0.16.0"))
)
(tags
(tui cli git github)))

View File

@ -9,11 +9,13 @@ tags: ["tui" "cli" "git" "github"]
homepage: "https://github.com/chshersh/github-tui"
bug-reports: "https://github.com/chshersh/github-tui/issues"
depends: [
"ocaml"
"ocaml" {>= "5.1"}
"dune" {>= "3.12"}
"ezcurl"
"minttea"
"terminal"
"core" {>= "v0.16.2"}
"core_unix" {>= "v0.16.0"}
"ezcurl" {>= "0.2.4"}
"minttea" {>= "0.0.2"}
"ppx_jane" {>= "v0.16.0"}
"odoc" {with-doc}
]
build: [

10
lib/cli.ml Normal file
View File

@ -0,0 +1,10 @@
open Core
let repo_param =
let open Command.Param in
anon ("owner/repo" %: string)
let command =
Command.basic
~summary:"Display GitHub TUI for the selected repository"
(Command.Param.map repo_param ~f:(fun _repo () -> Tui.start ()))

View File

@ -3,8 +3,12 @@
(library
(name github_tui)
(libraries
core
core_unix.command_unix
ezcurl
minttea
terminal
)
(preprocess
(pps ppx_jane)
)
)

1
lib/main.ml Normal file
View File

@ -0,0 +1 @@
let main () = Command_unix.run ~version:"0.1.0" ~build_info:"RWO" Cli.command