Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions login.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,13 @@ func createOauthToken(email, password, secondFactor string) (string, error) {
}
return doc.AccessToken.Token, nil
}

var authTokenCmd = &Command{
Topic: "auth",
Command: "token",
Description: "Display your API token.",
NeedsAuth: true,
Run: func(ctx *Context) {
Println(ctx.APIToken)
},
}
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func init() {
}
cli.Commands = CommandSet{
authLoginCmd,
authTokenCmd,
commandsListCmd,
debugErrlogCmd,
loginCmd,
Expand Down