diff options
Diffstat (limited to 'Omni/Jr.hs')
| -rw-r--r-- | Omni/Jr.hs | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -5,6 +5,10 @@ -- : out jr -- : dep sqlite-simple -- : dep sqids +-- : dep warp +-- : dep servant-server +-- : dep lucid +-- : dep servant-lucid module Omni.Jr where import Alpha @@ -13,6 +17,7 @@ import qualified Data.Text as Text import qualified Omni.Agent.Core as AgentCore import qualified Omni.Agent.Worker as AgentWorker import qualified Omni.Cli as Cli +import qualified Omni.Jr.Web as Web import qualified Omni.Task as Task import qualified Omni.Task.Core as TaskCore import qualified Omni.Test as Test @@ -45,6 +50,7 @@ jr Usage: jr task [<args>...] jr work [<task-id>] + jr web [--port=PORT] jr review <task-id> jr merge-driver <ours> <theirs> jr test @@ -53,11 +59,13 @@ Usage: Commands: task Manage tasks work Start a worker agent on a task + web Start the web UI server review Review a completed task (show diff, accept/reject) merge-driver Internal git merge driver Options: - -h --help Show this help + -h --help Show this help + --port=PORT Port for web server [default: 8080] |] move :: Cli.Arguments -> IO () @@ -65,6 +73,11 @@ move args | args `Cli.has` Cli.command "task" = do let extraArgs = Cli.getAllArgs args (Cli.argument "args") withArgs extraArgs Task.main + | args `Cli.has` Cli.command "web" = do + let port = case Cli.getArg args (Cli.longOption "port") of + Just p -> fromMaybe Web.defaultPort (readMaybe p) + Nothing -> Web.defaultPort + Web.run port | args `Cli.has` Cli.command "work" = do -- Always run in current directory let path = "." |
