hishtory/client/cmd/webui.go
David Dworken 52a4fbc96b
Add web UI for querying history from the browser (#180)
As requested in #176 and #147 

* Add initail version of a web UI for querying history from the browser

* Rename webui command

* Add basic test for the web UI

* Add README for the web UI

* Add basic auth for the web server

* Add status code when panic-ing
2024-02-19 09:34:33 -08:00

24 lines
497 B
Go

package cmd
import (
"os"
"github.com/ddworken/hishtory/client/hctx"
"github.com/ddworken/hishtory/client/lib"
"github.com/ddworken/hishtory/client/webui"
"github.com/spf13/cobra"
)
var webUiCmd = &cobra.Command{
Use: "start-web-ui",
Short: "Serve a basic web UI for interacting with your shell history",
Run: func(cmd *cobra.Command, args []string) {
lib.CheckFatalError(webui.StartWebUiServer(hctx.MakeContext()))
os.Exit(1)
},
}
func init() {
rootCmd.AddCommand(webUiCmd)
}