refactor: rename command/ to ga_cli/ to avoid namespace collision

This commit is contained in:
Liang Jiaqing committed 2026-05-11 10:01:03 +08:00
1 parent 8600ed9799
commit d46f51140c
9 files changed
+13 -13

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
"""command 命令行入口"""
from command.cli import main
main()
+1 -1
View File
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
cd "$(dirname "$0")"
exec python -m command "$@"
exec python -m ga_cli "$@"
+1 -1
View File
@@ -1,3 +1,3 @@
@echo off
cd /d "%~dp0"
python -m command %*
python -m ga_cli %*
+2 -2
View File
@@ -1,8 +1,8 @@
"""
command - GenericAgent CLI 命令包
ga_cli - GenericAgent CLI 命令包
作为包导入时,自动从根 ga.py 加载核心类(GenericAgentHandler 等)
以 python -m command 运行时,进入 CLI 命令模式
以 python -m ga_cli 运行时,进入 CLI 命令模式
"""
import importlib.util, sys, os
+3
View File
@@ -0,0 +1,3 @@
"""ga_cli 命令行入口"""
from ga_cli.cli import main
main()
+2 -2
View File
@@ -1,7 +1,7 @@
"""
command/cli.py - GenericAgent 命令行分发系统
ga_cli/cli.py - GenericAgent 命令行分发系统
通过 python -m command <命令> 或 ga <命令> 调用
通过 python -m ga_cli <命令> 或 ga <命令> 调用
"""
import os, sys, subprocess, argparse, textwrap
@@ -1,6 +1,6 @@
@echo off
chcp 65001 >nul
:: command-install.cmd - 将 GenericAgent 命令注册到系统 PATH
:: ga-cli-install.cmd - 将 GenericAgent 命令注册到系统 PATH
:: 运行一次后,即可在任意位置敲 ga <command>
:: 建议以管理员身份运行
+1 -1
View File
@@ -1,3 +1,3 @@
@echo off
cd /d "%~dp0.."
python -m command %*
python -m ga_cli %*
+2 -2
View File
@@ -39,7 +39,7 @@ build-backend = "setuptools.build_meta"
[tool.setuptools]
py-modules = []
packages = ["command"]
packages = ["ga_cli"]
[project.scripts]
ga = "command.cli:main"
ga = "ga_cli.cli:main"