Skip to content

feat(cmd): add --name flag to disambiguate 'agent' shortcut#327

Merged
srtaalej merged 6 commits intomainfrom
ale-create-agent-update
Feb 5, 2026
Merged

feat(cmd): add --name flag to disambiguate 'agent' shortcut#327
srtaalej merged 6 commits intomainfrom
ale-create-agent-update

Conversation

@srtaalej
Copy link
Contributor

@srtaalej srtaalej commented Feb 4, 2026

Summary

The create agent command is a shortcut to AI Agent templates, but users who want to name their app agent had no clear way to do so. Add --name flag to explicitly set the app name, bypassing the shortcut behavior.

Follow up to PR #326

Behavior

Command Result
create my-app App named "my-app"
create agent AI Agent shortcut
create agent my-app AI Agent, named "my-app"
create --name agent App named "agent" (NOT an AI Agent)
create agent --name foo AI Agent, named "foo"

Requirements

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

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.69%. Comparing base (890a67e) to head (6648deb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
+ Coverage   64.68%   64.69%   +0.01%     
==========================================
  Files         212      212              
  Lines       17771    17778       +7     
==========================================
+ Hits        11495    11502       +7     
  Misses       5203     5203              
  Partials     1073     1073              

☔ 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.

✅ Wow, I never imagined we'd turn around and land --name so quickly! Thank you 🙇🏻

🧪 Local testing works great!

📝 I've left a few minor suggestions around the help information. The goal is to add clarity. I also left a suggestion around 2 additional test cases so that future changes don't break the expected functionality.

Comment on lines +118 to +123
// --name flag overrides any positional app name argument
// This allows users to name their app "agent" without triggering the AI Agent shortcut
if nameFlagProvided {
appNameArg = createAppNameFlag
}

Copy link
Member

Choose a reason for hiding this comment

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

praise: Love the comment calling out that --name flag overrides any position app name argument.

Comment on lines +198 to +199
"creates an app named agent using name flag without triggering shortcut": {
CmdArgs: []string{"--name", "agent"},
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: Since our intent is for --name flag to override the <name> argument, perhaps we should have test for the combination to guarantee that future code changes don't create a regression in this behaviour:.

It may also be a good idea to test the agent use-case.

The test cases could be:

  1. slack create my-project --name my-name → Expects my-name
  2. slack create agent my-project --name my-name → Expects my-name

@srtaalej srtaalej requested a review from a team February 5, 2026 15:42
srtaalej and others added 4 commits February 5, 2026 10:42
Co-authored-by: Michael Brooks <mbrooks@slack-corp.com>
Co-authored-by: Michael Brooks <mbrooks@slack-corp.com>
@srtaalej srtaalej merged commit 653e0ed into main Feb 5, 2026
9 of 10 checks passed
@srtaalej srtaalej deleted the ale-create-agent-update branch February 5, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants