diff options
| author | Himanshu Sardana <himanshusardana2005@gmail.com> | 2026-03-26 21:26:35 +0000 |
|---|---|---|
| committer | Himanshu Sardana <himanshusardana2005@gmail.com> | 2026-03-26 21:26:35 +0000 |
| commit | 103e84d847262830bbaa550b37218e9ca8b317d3 (patch) | |
| tree | e19d3bfd6594600fb28be1ccac1a3869207bc49c /cmd/root.go | |
| parent | 5c631f0cdb8ee3238ff054d171dd8babd158047b (diff) | |
refactor: split into cmd, pkg
Diffstat (limited to 'cmd/root.go')
| -rw-r--r-- | cmd/root.go | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/cmd/root.go b/cmd/root.go new file mode 100644 index 0000000..79bb257 --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,58 @@ +package cmd + +import ( + "fmt" + "os" + + "github.com/HimanshuSardana/kite/internal/build" +) + +const ( + DefaultTheme = "modern-light" + DefaultPort = "8000" +) + +func Execute() { + args := os.Args + if len(args) < 2 { + build.ShowHelpMessage() + return + } + + switch args[1] { + case "build": + runBuild(args) + case "serve": + runServe(args) + case "list-themes": + runListThemes(args) + default: + build.ShowHelpMessage() + } +} + +func ShowHelp() { + fmt.Println(` +Kite — A lightweight static site generator + +USAGE: + kite <command> [options] + +COMMANDS: + build Build the static site into the output directory + serve Start a local development server with live reload + list-themes List all available themes + +OPTIONS: + -h, --help Show this help message + +EXAMPLES: + kite build + kite build gruvbox + kite serve + kite list-themes + +DESCRIPTION: + Kite converts your content into a static website using themes and templates. +`) +} |
