func NewCmdSignup(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { cmd := cli.Command{ Name: "signup", Usage: "Signup for a new account", Action: func(c *cli.Context) { cl.ChooseCommand(NewCmdSignupRunner(g), "signup", c) }, Flags: []cli.Flag{ cli.StringFlag{ Name: "c, invite-code", Usage: "Specify an invite code.", }, cli.StringFlag{ Name: "email", Usage: "Specify an account email.", }, cli.StringFlag{ Name: "username", Usage: "Specify a username.", }, }, } cmd.Flags = append(cmd.Flags, extraSignupFlags...) return cmd }
func NewCmdLogin(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { cmd := cli.Command{ Name: "login", ArgumentHelp: "[username]", Usage: "Establish a session with the keybase server", Action: func(c *cli.Context) { cl.ChooseCommand(NewCmdLoginRunner(g), "login", c) }, Flags: []cli.Flag{ cli.BoolFlag{ Name: "provision-by-email", Usage: "Use an email address associated with a keybase account to provision a device", }, }, } // Note we'll only be able to set this via mode via Environment variable // since it's too early to check command-line setting of it. if g.Env.GetRunMode() == libkb.DevelRunMode { cmd.Flags = append(cmd.Flags, cli.BoolFlag{ Name: "emulate-gui", Usage: "emulate GUI signing and fork GPG from the service", }) } return cmd }
// NewCmdProve makes a new prove command from the given CLI parameters. func NewCmdProve(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command { serviceList := strings.Join(libkb.ListProofCheckers(), ", ") description := fmt.Sprintf("Supported services are: %s.", serviceList) cmd := cli.Command{ Name: "prove", ArgumentHelp: "<service> [service username]", Usage: "Generate a new proof", Description: description, Flags: []cli.Flag{ cli.StringFlag{ Name: "output, o", Usage: "Output proof text to a file (rather than standard out).", }, cli.BoolFlag{ Name: "force, f", Usage: "Don't prompt.", }, }, Action: func(c *cli.Context) { cl.ChooseCommand(&CmdProve{Contextified: libkb.NewContextified(g)}, "prove", c) }, } cmd.Flags = append(cmd.Flags, restrictedProveFlags...) return cmd }
func cmdIDAddFlags(cmd *cli.Command) { cmd.Flags = append(cmd.Flags, cli.BoolFlag{ Name: "delegate-identify-ui", Usage: "Delegate our identify UI to another process", }) }