Restructure into package: truenas_migrate/
Split single-file script into focused modules:
colors.py – ANSI helpers and shared logger
summary.py – Summary dataclass and report renderer
archive.py – Debug archive parser (SCALE + CORE layouts)
client.py – WebSocket engine, TrueNASClient, dataset utilities
migrate.py – Payload builders, migrate_smb_shares, migrate_nfs_shares
cli.py – Interactive wizard, argparse, run(), main()
__main__.py – python -m truenas_migrate entry point
truenas_migrate.py retained as a one-line compatibility shim.
Both 'python truenas_migrate.py' and 'python -m truenas_migrate' work.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>