feat(backend): make cli interactive
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user