Skip to content

Add list-subagents and delete-subagent CLI commands#129

Merged
Aaronontheweb merged 1 commit into
devfrom
feature/cli-subagent-list-delete
Jul 11, 2026
Merged

Add list-subagents and delete-subagent CLI commands#129
Aaronontheweb merged 1 commit into
devfrom
feature/cli-subagent-list-delete

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Contributor

Summary

Adds the two missing sub-agent management commands to the skillserver CLI, bringing it to parity with the skill commands and with the SkillServer HTTP API + Netclaw.SkillClient, which already expose full sub-agent list/delete support.

  • list-subagents -> GET /subagents/ (supports --output json, no auth required, mirroring list)
  • delete-subagent <name> <version> -> DELETE /subagents/{name}/{version} (API-key authenticated, mirroring delete)

Previously the CLI wrapped only the skill side (list, delete, versions) plus the sub-agent publish/download commands, but had no way to enumerate or remove published sub-agents.

Changes

  • New ListSubAgentsCommand and DeleteSubAgentCommand, mirroring ListCommand/DeleteCommand (confirmation prompt, --yes, HTTP error handling).
  • Wire both into Program.cs dispatch; add list-subagents to the no-auth allowlist alongside list.
  • Add IReadOnlyList<SubAgentSummary> to the source-generated CliJsonContext for trim-safe JSON output.
  • Update --help/usage text and the CLI README.md.
  • Reuses the existing HTTP client, auth gating, and output-formatting helpers (SkillServerClient.ListSubAgentsAsync / DeleteSubAgentVersionAsync already existed).

Testing

  • dotnet build clean (0 warnings; repo uses TreatWarningsAsErrors).
  • dotnet test (CLI test project) green — 112 tests.
  • New parser tests (Parse_ListSubAgentsCommand_WithJsonOutput, Parse_DeleteSubAgentCommand_WithArgs) and dispatch/auth tests (ListSubAgents_RequiresServerUrl, ListSubAgents_DoesNotRequireApiKey, DeleteSubAgent_RequiresApiKey) mirror the existing skill list/delete tests.
  • Slopwatch clean; trimmed single-file linux-x64 publish passes the trim-warning-as-error gate; smoke-tested the trimmed binary (--help, list-subagents, delete-subagent).

https://claude.ai/code/session_01VYvvEehJtr1uEVFHxzjg7P

Mirror the existing skill `list`/`delete` commands for sub-agents,
wrapping the SkillServer subagent endpoints already exposed by the
HTTP API and Netclaw.SkillClient:

- `list-subagents` -> GET /subagents/ (supports `--output json`, no auth,
  mirroring `list`)
- `delete-subagent <name> <version>` -> DELETE /subagents/{name}/{version}
  (API-key authenticated, mirroring `delete`)

Reuses the existing HTTP client, auth gating, and output helpers. Adds
IReadOnlyList<SubAgentSummary> to the source-generated JSON context for
trim-safe JSON output. Updates `--help`/usage text and the CLI README,
and adds parser + dispatch/auth tests mirroring the skill command tests.

Claude-Session: https://claude.ai/code/session_01VYvvEehJtr1uEVFHxzjg7P
@Aaronontheweb
Aaronontheweb merged commit a02773f into dev Jul 11, 2026
7 checks passed
@Aaronontheweb
Aaronontheweb deleted the feature/cli-subagent-list-delete branch July 11, 2026 00:22
Aaronontheweb added a commit that referenced this pull request Jul 11, 2026
Cut prerelease 0.4.0-beta.6 covering the new list-subagents and delete-subagent CLI commands (#129).
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.

1 participant