Skip to content

feat(cli): add --agent-help flag for machine-readable command documentation#42

Merged
christso merged 2 commits into
mainfrom
feat/agent-help
Feb 1, 2026
Merged

feat(cli): add --agent-help flag for machine-readable command documentation#42
christso merged 2 commits into
mainfrom
feat/agent-help

Conversation

@christso
Copy link
Copy Markdown
Contributor

@christso christso commented Feb 1, 2026

Summary

  • Add global --agent-help flag that outputs machine-readable JSON documentation for AI agents
  • allagents --agent-help dumps the full command tree (all 12 commands with metadata, options, positionals, examples, output schemas)
  • allagents <command> --agent-help dumps single-command metadata (e.g., allagents workspace sync --agent-help)
  • allagents <group> --agent-help dumps a subcommand group (e.g., allagents workspace --agent-help)
  • Extended CommandMeta with new AgentCommandMeta interface adding command, positionals, options, and outputSchema fields
  • Updated all metadata files (workspace, plugin, self) to include full agent-friendly metadata
  • Added comprehensive e2e test suite covering full tree, single command, group, flag position, and error cases

Closes #4

Test plan

  • bun run build succeeds
  • bun run typecheck passes
  • bun test passes (389 tests, 0 failures)
  • bun run lint passes
  • allagents --agent-help outputs valid JSON with all 12 commands
  • allagents workspace sync --agent-help outputs single-command JSON
  • allagents workspace --agent-help outputs workspace group
  • No src/core/ files modified

🤖 Generated with Claude Code

christso and others added 2 commits February 1, 2026 02:54
…tation

Enable AI agents to discover the full CLI surface via JSON output.
`allagents --agent-help` dumps the complete command tree with metadata,
while `allagents <command> --agent-help` dumps single-command details
including options, positionals, examples, and output schemas.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying allagents with  Cloudflare Pages  Cloudflare Pages

Latest commit: e21e5ff
Status:🚫  Build failed.

View logs

@christso christso merged commit 075c89e into main Feb 1, 2026
1 check failed
@christso christso deleted the feat/agent-help branch February 1, 2026 02:55
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