Skip to content

Review cagent commands#1755

Merged
dgageot merged 11 commits intodocker:mainfrom
dgageot:change-commands
Feb 17, 2026
Merged

Review cagent commands#1755
dgageot merged 11 commits intodocker:mainfrom
dgageot:change-commands

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 16, 2026

Make sure that cagent without command is a synonym of cagent run

This is to make the first usage more straightforward. No need to guess which command to
use. Just run cagent.
Of course more work needs to be done to handle users without API keys. but that's a first step.

Remove little used commands

Those commands are more confusing than useful.

  • cagent config show
  • cagent config path
  • cagent feedback
  • cagent build
  • cagent catalog list

Move server commands under cagent serve

Reduce the list of top level commands that are very advanced use cases.

  • cagent api -> cagent serve api
  • cagent a2a -> cagent serve a2a
  • cagent mcp -> cagent serve mcp
  • cagent acp -> cagent serve acp

Hide cagent debug command

Replace cagent exec with cagent run --exec

Those two commands were already sharing the same flags and same code.
It removes a core command that is probably more an advanced use case.

Move sharing commands under cagent share

It clearer that the purpose of to commands is to share agents.
We could add more sub-commands in the future that do not end up at the top level.

  • cagent pull -> cagent share pull
  • cagent push -> cagent share push

@dgageot dgageot requested a review from a team as a code owner February 16, 2026 17:45
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

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

Review Summary

No issues found in the changed code! ✅

This PR successfully restructures the CLI commands as intended:

Changes Reviewed

  • Default to run command: The defaultToRun function is well-implemented with comprehensive test coverage
  • Command reorganization: Moving server commands under serve and sharing commands under share is clean and straightforward
  • Exec integration: The --exec flag properly replaces the standalone exec command with good telemetry tracking
  • Telemetry updates: All telemetry tracking correctly reflects the new command structure
  • Code quality: The new functions have proper documentation and edge case handling

The command restructuring achieves the goal of simplifying the top-level CLI while maintaining backward compatibility through the new flags and subcommands.

rumpl
rumpl previously approved these changes Feb 16, 2026
krissetto
krissetto previously approved these changes Feb 16, 2026
Copy link
Contributor

@krissetto krissetto left a comment

Choose a reason for hiding this comment

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

nice! lets remember to call out some of these as breaking changes in the changelog

Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
…ange)

Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
When invoked without a subcommand (e.g. bare "cagent" or "cagent --debug"),
automatically prepend "run" so the default agent is launched. Users can
still use "cagent --help" to list available commands.

Assisted-By: cagent
Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot dgageot dismissed stale reviews from krissetto and rumpl via 74733c8 February 17, 2026 06:51
@dgageot dgageot merged commit fb3b40f into docker:main Feb 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants