github.com/keybase/client/go@v0.0.0-20240520164431-4f512a4c85a3/client/cmd_bot.go (about) 1 // Copyright 2017 Keybase, Inc. All rights reserved. Use of 2 // this source code is governed by the included BSD license. 3 4 package client 5 6 import ( 7 "github.com/keybase/cli" 8 "github.com/keybase/client/go/libcmdline" 9 "github.com/keybase/client/go/libkb" 10 ) 11 12 func NewCmdBot(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { 13 subcommands := []cli.Command{ 14 newCmdBotSignup(cl, g), 15 newCmdBotToken(cl, g), 16 } 17 return cli.Command{ 18 Name: "bot", 19 Usage: "Manage bot accounts", 20 ArgumentHelp: "[arguments...]", 21 Subcommands: subcommands, 22 } 23 } 24 25 func newCmdBotToken(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { 26 subcommands := []cli.Command{ 27 newCmdBotTokenCreate(cl, g), 28 newCmdBotTokenList(cl, g), 29 newCmdBotTokenDelete(cl, g), 30 } 31 return cli.Command{ 32 Name: "token", 33 Usage: "Manage bot tokens", 34 Subcommands: subcommands, 35 } 36 }