Skip to content

feat(cli): port tier 1 commands to LuCLI module#2092

Merged
bpamiri merged 12 commits intodevelopfrom
peter/cli-tier1-porting
Apr 11, 2026
Merged

feat(cli): port tier 1 commands to LuCLI module#2092
bpamiri merged 12 commits intodevelopfrom
peter/cli-tier1-porting

Conversation

@bpamiri
Copy link
Copy Markdown
Collaborator

@bpamiri bpamiri commented Apr 11, 2026

Summary

Ports 8 high-value CLI commands from the CommandBox-based CLI to the LuCLI module, closing the primary feature gap for developers using the wheels binary.

New commands

  • wheels destroy <name> [type] — Remove generated components (model, controller, views, tests) with route cleanup and migration generation
  • wheels doctor [--verbose] — Run 7 health checks on app structure, config, permissions, DB, and tests
  • wheels stats [--verbose] — Code statistics (files, LOC, comments, blanks) across all project directories
  • wheels notes [--annotations=...] [--custom=...] — Extract TODO/FIXME/OPTIMIZE annotations from codebase
  • wheels db reset|status|version — Database management (migrate+seed, migration status, schema version)
  • wheels upgrade check [--to=<version>] — Scan app for breaking changes before upgrading
  • wheels generate admin <model> — Generate admin CRUD interface via model introspection

Architecture

  • 4 new service files: Destroy.cfc, Doctor.cfc, Stats.cfc, Admin.cfc in cli/lucli/services/
  • 7 new templates: 6 admin views + 1 migration template
  • Thin dispatch functions in Module.cfc (~200 lines), heavy logic in services
  • 1 new core endpoint: introspect command in CLI bridge for model metadata
  • MCP tool schemas for all new commands

Offline vs Server-dependent

No server needed Server required
destroy, doctor, stats, notes, upgrade check db status/version, db reset, generate admin

Test plan

  • wheels destroy — scaffold a resource, destroy it with --force, verify files removed and migration generated
  • wheels doctor — run in a valid project, check output shows HEALTHY; remove a required dir, check CRITICAL
  • wheels stats — verify table output with correct categories and line counts
  • wheels notes — add a // TODO: test comment, verify it appears in output
  • wheels db status — with running server, verify migration table output
  • wheels db reset --force — verify migrations run and seeds execute
  • wheels upgrade check — verify breaking changes scan runs against current version
  • wheels generate admin User — with running server, verify controller + views + route generated
  • MCP discovery — verify wheels mcp lists new tools

🤖 Generated with Claude Code

bpamiri and others added 10 commits April 11, 2026 06:57
…estroy command

- Parse --force before positional args to avoid
  misreading it as the type argument
- Remove prompt() call (doesn't exist); require
  --force for non-interactive confirmation
- Add previewDestroy() validation for view paths,
  matching destroyView() behaviour
Adds Stats.cfc service with getStats() and getNotes() for scanning
project directories, plus stats()/notes() dispatch functions and
sprintf() private helper in Module.cfc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Admin.cfc service, 6 admin templates, and Module.cfc dispatch for
`wheels generate admin <ModelName>` — introspects a running server to
generate scoped controller + CRUD views + route injection.
- dbReset: propagate migration errors instead of always reporting success
- MCP schema: add "admin" to wheels_generate type enum and description
- admin _form: use correct route/method/key for edit vs create forms
- admin index: use {{primaryKey}} instead of hardcoded .id for links
- Admin.cfc: remove unused templateService dependency
@bpamiri bpamiri force-pushed the peter/cli-tier1-porting branch from bdf5ef2 to 28133ad Compare April 11, 2026 13:58
@bpamiri bpamiri merged commit f4a7353 into develop Apr 11, 2026
3 checks passed
@bpamiri bpamiri deleted the peter/cli-tier1-porting branch April 11, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant