Skip to content

Commit

Permalink
feat: Install and uninstall multiple dbgpts at one time
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyinc committed Jul 24, 2024
1 parent 2a4f072 commit 85714d2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions dbgpt/util/dbgpts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,25 @@ def wrapper(*args, **kwargs):

@click.command(name="install")
@add_add_common_options
@click.argument("name", type=str)
def install(repo: str | None, update: bool, name: str):
@click.argument("names", type=str, nargs=-1)
def install(repo: str | None, update: bool, names: list[str]):
"""Install your dbgpts(operators,agents,workflows or apps)"""
from .repo import _install_default_repos_if_no_repos, install

check_poetry_installed()
_install_default_repos_if_no_repos()
install(name, repo, with_update=update)
for name in names:
install(name, repo, with_update=update)


@click.command(name="uninstall")
@click.argument("name", type=str)
def uninstall(name: str):
@click.argument("names", type=str, nargs=-1)
def uninstall(names: list[str]):
"""Uninstall your dbgpts(operators,agents,workflows or apps)"""
from .repo import uninstall

uninstall(name)
for name in names:
uninstall(name)


@click.command(name="list-remote")
Expand Down

0 comments on commit 85714d2

Please sign in to comment.