feat(backend): make cli interactive

This commit is contained in:
2025-08-27 16:26:48 -04:00
parent 602a338027
commit 1379998e5b
3 changed files with 381 additions and 83 deletions

View File

@@ -15,6 +15,7 @@ from .commands import (
# Service commands
cmd_services_list, setup_services_parser,
)
from .interactive import run_interactive_mode
def setup_parser() -> argparse.ArgumentParser:
@@ -41,7 +42,22 @@ def main():
args = parser.parse_args()
if not args.command:
parser.print_help()
# Launch interactive mode when no command is provided
try:
cli = NimbusFlowCLI()
run_interactive_mode(cli)
except CLIError as e:
print(f"❌ Error: {e}")
return 1
except KeyboardInterrupt:
print("\n🛑 Interrupted by user")
return 1
except Exception as e:
print(f"❌ Unexpected error: {e}")
return 1
finally:
if 'cli' in locals():
cli.close()
return
try: