Skip to content

Commit

Permalink
feat(syftbox/main.py): ADDS install as a valid arg for syftbox CLI
Browse files Browse the repository at this point in the history
syftbox CLI will use app_manager to install app repositories
  • Loading branch information
IonesioJunior committed Oct 3, 2024
1 parent e0e91fa commit ca7680f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions syftbox/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
import sys

from syftbox.app_manager.manager import main as app_manager_main
from syftbox.client.client import main as client_main
from syftbox.server.server import main as server_main

Expand All @@ -15,6 +16,9 @@ def main():
# Define the server command
subparsers.add_parser("server", help="Run the Syftbox server")

# Define the install
subparsers.add_parser("install", help="Install a new app in your syftbox.")

args, remaining_args = parser.parse_known_args()

if args.command == "client":
Expand All @@ -25,6 +29,9 @@ def main():
# Modify sys.argv to exclude the subcommand
sys.argv = [sys.argv[0]] + remaining_args
server_main()
elif args.command == "install":
sys.argv = [sys.argv[0]] + remaining_args
app_manager_main()
else:
parser.print_help()

Expand Down

0 comments on commit ca7680f

Please sign in to comment.