Skip to content

feat(cli): add non-interactive flags and help examples for agent readiness#252

Draft
MarioCadenas wants to merge 4 commits intomainfrom
review/cli-for-agents
Draft

feat(cli): add non-interactive flags and help examples for agent readiness#252
MarioCadenas wants to merge 4 commits intomainfrom
review/cli-for-agents

Conversation

@MarioCadenas
Copy link
Copy Markdown
Collaborator

Summary

  • Add flag-based non-interactive paths to plugin create and plugin add-resource so coding agents can invoke them headlessly without Clack prompts
  • Add Examples: sections to --help output on all CLI commands so agents can pattern-match correct invocations
  • plugin create now accepts --placement, --path, --name, --description, --resources / --resources-json, --force
  • plugin add-resource now accepts --type, --required/--no-required, --resource-key, --permission, --fields-json, --dry-run
  • When partial flags are provided, the CLI errors immediately with a missing-flags list and corrective example invocation

Test plan

  • appkit plugin create --placement in-repo --path plugins/test --name test --description "Test" --force scaffolds without prompts
  • appkit plugin create --name test (partial flags) exits 1 with clear error listing missing flags
  • appkit plugin create (no flags) falls back to interactive Clack flow unchanged
  • --resources sql_warehouse,volume and --resources-json '[{"type":"sql_warehouse"}]' both produce correct manifests
  • --resources and --resources-json together are rejected by Commander conflict
  • appkit plugin add-resource --path <dir> --type sql_warehouse adds resource non-interactively
  • appkit plugin add-resource --type volume --no-required --dry-run previews without writing
  • --fields-json overrides default env var mappings
  • Every command's --help now includes an Examples: section

…iness

Phase 1: Add flag-based non-interactive paths to `plugin create` and
`plugin add-resource` so agents can invoke them headlessly. Includes
--placement, --path, --name, --description, --resources, --resources-json,
--force for create; --type, --required/--no-required, --resource-key,
--permission, --fields-json, --dry-run for add-resource.

Phase 2: Add Examples sections via addHelpText to all CLI commands so
agents can pattern-match correct invocations from --help output.

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
- generate-types: print info message to stderr when warehouse ID is
  missing (exit 0 preserved for template hook compatibility), add
  success message after generation
- list: suggest --manifest or --dir when manifest not found
- setup: show install commands when no packages found
- sync: suggest --plugins-dir when no plugins discovered

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
- sync --json: outputs the full TemplatePluginsManifest JSON to stdout,
  suppresses human-readable progress lines (works in both preview and
  write modes)
- validate --json: outputs status-only JSON array with path, valid, and
  errors fields; exit code still reflects overall validity

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
Test buildResourceFromType, parseResourcesShorthand, and
parseResourcesJson — the pure functions backing the new flag-based
non-interactive path for `appkit plugin create`.

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
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