Skip to content

Commit 60304fc

Browse files
committed
Add token cli command
1 parent bad95e8 commit 60304fc

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

main.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,19 @@ func main() {
129129
// return nil
130130
// },
131131
Commands: []*cli.Command{
132+
{
133+
Name: "token",
134+
Aliases: []string{"t"},
135+
Usage: "Print the API token",
136+
Action: func(cmdCtx context.Context, cmd *cli.Command) error {
137+
token, err := utils.LoadToken()
138+
if err != nil {
139+
return fmt.Errorf("error loading token: %w", err)
140+
}
141+
fmt.Println(token)
142+
return nil
143+
},
144+
},
132145
{
133146
Name: "notification",
134147
Aliases: []string{"notify", "n"},

0 commit comments

Comments
 (0)