🌷 the cutsie hackatime helper
1package main
2
3import (
4 "context"
5 "os"
6
7 "github.com/charmbracelet/fang"
8 "github.com/spf13/cobra"
9 "github.com/taciturnaxolotl/akami/handler"
10)
11
12func main() {
13 // init our cobra command with a name and description
14 cmd := &cobra.Command{
15 Use: "akami",
16 Short: "🌷 the cutsie hackatime helper",
17 Long: `
18 █████╗ ██╗ ██╗ █████╗ ███╗ ███╗██╗
19██╔══██╗██║ ██╔╝██╔══██╗████╗ ████║██║
20███████║█████╔╝ ███████║██╔████╔██║██║
21██╔══██║██╔═██╗ ██╔══██║██║╚██╔╝██║██║
22██║ ██║██║ ██╗██║ ██║██║ ╚═╝ ██║██║
23╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝
24
25🌷 Akami — The cutsie hackatime helper`,
26 }
27
28 // diagnose command
29 cmd.AddCommand(&cobra.Command{
30 Use: "doc",
31 Short: "diagnose potential hackatime issues",
32 RunE: handler.Doctor,
33 })
34
35 // this is where we get the fancy fang magic ✨
36 if err := fang.Execute(
37 context.Background(),
38 cmd,
39 ); err != nil {
40 os.Exit(1)
41 }
42}