- Add ANSI color coding: [I]=green, [W]=yellow, [E]=red - Format: [Level] [Module] message with 4-char indent for data rows - Error detail lines use |-> tree connector - Remove extra blank lines between outputs (except list) - Modules: CLI, Preview, Builder, Server, Watcher Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
581 B
Go
31 lines
581 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
cmds "gitea-mail-templates/tools/cli"
|
|
)
|
|
|
|
func main() {
|
|
app := &cli.App{
|
|
Name: "tools",
|
|
Usage: "Gitea Mail Templates CLI — manage and preview email template themes",
|
|
UsageText: "tools <command> [args...] [--flags]",
|
|
Commands: []*cli.Command{
|
|
cmds.ListCommand(),
|
|
cmds.CreateCommand(),
|
|
cmds.DeleteCommand(),
|
|
cmds.PreviewCommand(),
|
|
cmds.DevCommand(),
|
|
},
|
|
}
|
|
|
|
if err := app.Run(os.Args); err != nil {
|
|
fmt.Fprintf(os.Stderr, "\033[31m[E]\033[0m [CLI] %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|