Skip to content

feat: add 'create agent' command#326

Merged
srtaalej merged 2 commits intomainfrom
ale-create-agent-cmd
Feb 4, 2026
Merged

feat: add 'create agent' command#326
srtaalej merged 2 commits intomainfrom
ale-create-agent-cmd

Conversation

@srtaalej
Copy link
Contributor

@srtaalej srtaalej commented Feb 3, 2026

Changelog

Now when you run the slack create agent command a list of Agentic Apps are highlighted for quick selection.

Summary

Adds a convenient agent argument to skip category selection and go directly to AI app template selection.

Usage

  # Create an agent app, prompts for language only
  slack create agent

  # Create an agent app with a specific name
  slack create agent my-agent-app

  # Create an app named "agent" with a specific template (not a shortcut)
  slack create agent --template slack-samples/bolt-js-starter-template

Behavior

Command Category Prompt Result
slack create agent Skipped AI app with generated name
slack create agent my-agent-app Skipped AI app named "my-agent-app"
slack create agent --template Shown App named "agent" with specified template

Requirements

@srtaalej srtaalej self-assigned this Feb 3, 2026
@srtaalej srtaalej requested a review from a team as a code owner February 3, 2026 21:44
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes semver:minor Use on pull requests to describe the release version increment labels Feb 3, 2026
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 77.50000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.65%. Comparing base (2da1d1a) to head (7c7952f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/project/create_template.go 65.21% 4 Missing and 4 partials ⚠️
cmd/project/create.go 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #326      +/-   ##
==========================================
+ Coverage   64.61%   64.65%   +0.04%     
==========================================
  Files         212      212              
  Lines       17755    17771      +16     
==========================================
+ Hits        11472    11490      +18     
+ Misses       5207     5206       -1     
+ Partials     1076     1075       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks mwbrooks added this to the Next Release milestone Feb 4, 2026
Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Woo! So fast and fantastic work! 👏🏻

🧪 Local testing works well and I'm happy to see so much code coverage added 😄

✏️ Left a few minor non-blocking suggestions and questions. Either way, I think we can merge and iterate once you've brought in what you want.

🗳️ Extra suggestion is to update the slack --help (cmd/root.goExamples) with an example for using this command:

		Example: style.ExampleCommandsf([]style.ExampleCommand{
			{Command: "login", Meaning: "Log in to your Slack account"},
			{Command: "create", Meaning: "Create a new Slack app"},
			{Command: "create agent", Meaning: "Create a new Slack AI Agent app"},
			{Command: "init", Meaning: "Initialize an existing Slack app"},
			{Command: "run", Meaning: "Start a local development server"},
			{Command: "deploy", Meaning: "Deploy to the Slack Platform"},
		}),

💭 You've taken a clever approach. Originally, I was thinking we'd have a new official create agent command. But, thinking about it more than would mean a 3rd-level command (slack project create agent would be the full name space). This starts to get a little extreme. The only drawback is that the create agent command isn't as discoverable in our slack --help menu. If we really want, we can customize this template to display it. But let's leave that for the future.

func NewCreateCommand(clients *shared.ClientFactory) *cobra.Command {
cmd := &cobra.Command{
SuggestFor: []string{"new"},
Use: "create [name] [flags]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I wonder if we should be updating this usage or perhaps extending the description.

I think the accurate format would be:

Suggested change
Use: "create [agent] [name] [flags]",

But, I admit that it doesn't look very friendly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwbrooks Ahha this inspired similar thought for me! I wonder if we'd be alright to make "agent" a reserved word to prefer:

$ slack create [name|agent]

And I agree with later comment that a --name flag might be optional for this setup 👾

Comment on lines +95 to +104
if !templateFlagProvided {
// Shortcut to AI apps category
categoryShortcut = "agent"
// Check if a second argument was provided as the app name
if len(args) > 1 {
appNameArg = args[1]
}
} else {
// When --template is provided, "agent" is the app name
appNameArg = args[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: This is a clever way to handle the edge-case. Personally, I start to get confused when slack create agent will name my app "agent" vs show me a prompt.

I wonder if a more obvious approach (for the simple minded folks like me) would be anytime slack create agent is used, it's focused on the agent prompt.

The drawback to my suggestion is that we'd eventually need to introduce a --name flag to allow people to customize their app, such as slack create --name agent --template <url>.

I'm okay moving forward with the current approach if it makes sense to @srtaalej and @zimeg. It comes down to personal choice.

}
createClientMock.AssertCalled(t, "Create", mock.Anything, mock.Anything, mock.Anything, expected)
},
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Thoughts on adding a test for the use-case slack create agent some-name --template <url>. Seems like you've done the hard work so we could bump the test coverage a little more.

@mwbrooks mwbrooks changed the title feat: agent argument shortcut to slack create command feat: add 'create agent' command Feb 4, 2026
Co-authored-by: Michael Brooks <mbrooks@slack-corp.com>
@srtaalej srtaalej merged commit 46305ef into main Feb 4, 2026
8 checks passed
@srtaalej srtaalej deleted the ale-create-agent-cmd branch February 4, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments