mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-10 21:39:33 +00:00
Native data AI application framework based on AWEL+AGENT (#1152)
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com> Co-authored-by: lcx01800250 <lcx01800250@alibaba-inc.com> Co-authored-by: licunxing <864255598@qq.com> Co-authored-by: Aralhi <xiaoping0501@gmail.com> Co-authored-by: xuyuan23 <643854343@qq.com> Co-authored-by: aries_ckt <916701291@qq.com> Co-authored-by: hzh97 <2976151305@qq.com>
This commit is contained in:
@@ -64,6 +64,17 @@ def new():
|
||||
pass
|
||||
|
||||
|
||||
@click.group()
|
||||
def app():
|
||||
"""Manage your apps(dbgpts)"""
|
||||
pass
|
||||
|
||||
|
||||
@click.group()
|
||||
def repo():
|
||||
"""The repository to install the dbgpts from"""
|
||||
|
||||
|
||||
stop_all_func_list = []
|
||||
|
||||
|
||||
@@ -79,6 +90,8 @@ cli.add_command(stop)
|
||||
cli.add_command(install)
|
||||
cli.add_command(db)
|
||||
cli.add_command(new)
|
||||
cli.add_command(app)
|
||||
cli.add_command(repo)
|
||||
add_command_alias(stop_all, name="all", parent_group=stop)
|
||||
|
||||
try:
|
||||
@@ -146,6 +159,26 @@ except ImportError as e:
|
||||
logging.warning(f"Integrating dbgpt serve command line tool failed: {e}")
|
||||
|
||||
|
||||
try:
|
||||
from dbgpt.util.dbgpts.cli import add_repo
|
||||
from dbgpt.util.dbgpts.cli import install as app_install
|
||||
from dbgpt.util.dbgpts.cli import list_all_apps as app_list
|
||||
from dbgpt.util.dbgpts.cli import list_repos, remove_repo
|
||||
from dbgpt.util.dbgpts.cli import uninstall as app_uninstall
|
||||
from dbgpt.util.dbgpts.cli import update_repo
|
||||
|
||||
add_command_alias(list_repos, name="list", parent_group=repo)
|
||||
add_command_alias(add_repo, name="add", parent_group=repo)
|
||||
add_command_alias(remove_repo, name="remove", parent_group=repo)
|
||||
add_command_alias(update_repo, name="update", parent_group=repo)
|
||||
add_command_alias(app_install, name="install", parent_group=app)
|
||||
add_command_alias(app_uninstall, name="uninstall", parent_group=app)
|
||||
add_command_alias(app_list, name="list-remote", parent_group=app)
|
||||
|
||||
except ImportError as e:
|
||||
logging.warning(f"Integrating dbgpt dbgpts command line tool failed: {e}")
|
||||
|
||||
|
||||
def main():
|
||||
return cli()
|
||||
|
||||
|
Reference in New Issue
Block a user