{"modulePath":"github.com/slackapi/slack-cli","version":"v0.0.0-20261124200210-0bde480cb96b","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cmd\n\n## Variables\n\n```go\nvar AliasMap = map[string]*AliasInfo{\n\t\"activity\":  {CommandFactory: platform.NewActivityCommand, CanonicalName: \"platform activity\", ParentName: \"platform\"},\n\t\"create\":    {CommandFactory: project.NewCreateCommand, CanonicalName: \"project create\", ParentName: \"project\"},\n\t\"delete\":    {CommandFactory: app.NewDeleteCommand, CanonicalName: \"app delete\", ParentName: \"app\"},\n\t\"deploy\":    {CommandFactory: platform.NewDeployCommand, CanonicalName: \"platform deploy\", ParentName: \"platform\"},\n\t\"init\":      {CommandFactory: project.NewInitCommand, CanonicalName: \"project init\", ParentName: \"project\"},\n\t\"install\":   {CommandFactory: app.NewAddCommand, CanonicalName: \"app install\", ParentName: \"app\"},\n\t\"list\":      {CommandFactory: auth.NewListCommand, CanonicalName: \"auth list\", ParentName: \"auth\"},\n\t\"login\":     {CommandFactory: auth.NewLoginCommand, CanonicalName: \"auth login\", ParentName: \"auth\"},\n\t\"logout\":    {CommandFactory: auth.NewLogoutCommand, CanonicalName: \"auth logout\", ParentName: \"auth\"},\n\t\"run\":       {CommandFactory: platform.NewRunCommand, CanonicalName: \"platform run\", ParentName: \"platform\"},\n\t\"samples\":   {CommandFactory: project.NewSamplesCommand, CanonicalName: \"project samples\", ParentName: \"project\"},\n\t\"sync\":      {CommandFactory: manifest.NewSyncCommand, CanonicalName: \"manifest sync\", ParentName: \"manifest\"},\n\t\"uninstall\": {CommandFactory: app.NewUninstallCommand, CanonicalName: \"app uninstall\", ParentName: \"app\"},\n}\n```\n\n## Functions\n\n```go\nfunc ExecuteContext(ctx context.Context, rootCmd *cobra.Command, clients *shared.ClientFactory)\n```\nExecuteContext sets up a cancellable context for use with IOStreams' interrupt channel. It listens for process interrupts and sends to IOStreams' GetInterruptChannel() for use in in communicating process interrupts elsewhere in the code.\n\n```go\nfunc Init(ctx context.Context) (*cobra.Command, *shared.ClientFactory)\n```\nInit bootstraps the CLI process. Put things that do not rely on specific arguments or flags passed to the CLI in here. If you need flag/argument values, InitConfig below.\n\n```go\nfunc InitConfig(ctx context.Context, clients *shared.ClientFactory, rootCmd *cobra.Command) error\n```\nInitConfig reads in config files and ENV variables if set and sets up the CLI for functioning. Executes \\_before\\_ any Pre\\* methods from the root or child commands, but after Cobra parses flags and command arguments. Put global CLI initialization routines that rely on flag and argument parsing in here please! TODO: consider using arguments for this function for certain dependencies, like working directory and other OS-specific strings, that OnInitialize above can provide during actual execution, but that we can override with test values for easier testing.\n\n```go\nfunc NewRootCommand(clients *shared.ClientFactory) *cobra.Command\n```\n\n## Types\n\n```go\ntype AliasInfo struct {\n\tCanonicalName  string\n\tCommandName    string\n\tParentName     string\n\tCommandFactory func(*shared.ClientFactory) *cobra.Command\n}\n```\n\n```go\nfunc (a *AliasInfo) SetCommandName(name string)\n```\n\n","path":"github.com/slackapi/slack-cli/cmd","name":"cmd","synopsis":"","isRedistributable":true}
