Clean up CLI by removing legacy flat commands

- Remove legacy flat commands (info, test, sync, etc.) from main parser
- Keep only hierarchical command groups (system, module, package)
- Eliminate confusing positional arguments showing both flat and hierarchical commands
- Update help text to remove references to deprecated commands
- CLI now shows clean 3-command structure: system, module, package
- Old flat commands like 'tito info' now properly error with helpful message
- Maintains all functionality through hierarchical structure:
  - tito info → tito system info
  - tito status → tito module status
  - tito sync → tito package sync

Result: Clean, focused CLI with clear command organization
This commit is contained in:
Vijay Janapa Reddi
2025-07-11 22:54:39 -04:00
parent f523002310
commit decbcb8d07

View File

@@ -53,20 +53,10 @@ class TinyTorchCLI:
self.config = CLIConfig.from_project_root()
self.console = get_console()
self.commands: Dict[str, Type[BaseCommand]] = {
# New hierarchical command groups
# Hierarchical command groups only
'system': SystemCommand,
'module': ModuleCommand,
'package': PackageCommand,
# Legacy flat commands (for backward compatibility)
'notebooks': NotebooksCommand,
'info': InfoCommand,
'test': TestCommand,
'doctor': DoctorCommand,
'sync': SyncCommand,
'reset': ResetCommand,
'jupyter': JupyterCommand,
'nbdev': NbdevCommand,
'status': StatusCommand,
}
def create_parser(self) -> argparse.ArgumentParser:
@@ -85,9 +75,6 @@ Examples:
tito system info Show system information
tito module status --metadata Module status with metadata
tito package sync Export notebooks to package
Legacy commands (deprecated, use grouped commands above):
tito info, tito status, tito test, tito sync, etc.
"""
)