Skip to content

refactor: introduce platform registry and Typer CLI + version#48

Merged
0xFustang merged 13 commits intomainfrom
refactor/introduce-typer-registry-model
Mar 6, 2026
Merged

refactor: introduce platform registry and Typer CLI + version#48
0xFustang merged 13 commits intomainfrom
refactor/introduce-typer-registry-model

Conversation

@0xFustang
Copy link
Collaborator

@0xFustang 0xFustang commented Mar 6, 2026

Description

Introduces a platform descriptor registry to eliminate long if/elif chains across the codebase, and replaces argparse with Typer for a cleaner CLI with a dynamic command registry.

Changes

  • Add platforms/registry.py: central platform descriptor registry; modules self-register instead of being dispatched via if/elif
  • Add registry.py: dynamic Typer command registry
  • Replace argparse with Typer + Rich for CLI and console output
  • Refactor CLI commands into a commands/ subpackage (deploy/, rules/, sources/)
  • Simplify convert.py, export.py, integrity.py, search.py by removing platform dispatch logic
  • Add config.py for centralised config loading
  • Add the ability to display the version of droid

Breaking Changes

The CLI interface has been redesigned from argparse to Typer. All commands now follow a droid <group> <command> structure so existing CI/CD pipelines jobs will need to be updated. This will be documented in the next release (v0.3.0) and the documentation will reflect the new changes.

Before After
droid -s -p <platform> -r <path> droid rules search -p <platform> -r <path>
droid -e -p <platform> -r <path> droid rules export -p <platform> -r <path>
droid -i -p <platform> -r <path> droid rules integrity -p <platform> -r <path>
droid -c -p <platform> -r <path> droid rules convert -p <platform> -r <path>

@0xFustang 0xFustang self-assigned this Mar 6, 2026
@0xFustang 0xFustang changed the title refactor: introduce platform registry and Typer CLI refactor: introduce platform registry and Typer CLI + version Mar 6, 2026
@0xFustang 0xFustang merged commit a0aba72 into main Mar 6, 2026
2 checks passed
@0xFustang 0xFustang deleted the refactor/introduce-typer-registry-model branch March 6, 2026 18:13
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