Metadata-Version: 2.2
Name: aicortexpy
Version: 0.2.0
Summary: AICortex Python CLI and local agent runtime daemon (Go CLI compatible)
Author: AICortex
License: Apache-2.0
Project-URL: Homepage, https://gitee.com/seacozz2007/aicortex
Project-URL: Repository, https://gitee.com/seacozz2007/aicortex
Project-URL: Issues, https://gitee.com/seacozz2007/aicortex/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: websocket-client>=1.6
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"

# aicortexpy

Python **CLI + local agent runtime** for AICortex。在无法使用 Go `aicortex` 二进制时，可作为完整替代：

```powershell
pip install -U aicortexpy
aicortex login --token mul_...
aicortex daemon start
aicortex issue list --output json
```

也可用 `python -m aicortexpy`（与 `aicortex` / `aicortexpy` 入口等价）。

| | |
|--|--|
| PyPI / 模块 | `aicortexpy` |
| Console scripts | `aicortex`、`aicortexpy`（`aicortex` 刻意同名，供 Agent 提示词零改动） |
| 配置 | 与 Go 共用 `~/.aicortex/config.json` |

## 安装

```powershell
pip install -U aicortexpy
# 源码：
cd python-daemon
pip install -e .
```

## 常用命令（对齐 Go CLI）

```powershell
aicortex login --token mul_xxx
aicortex auth status
aicortex config show
aicortex workspace list --output json
aicortex issue get MUL-123 --output json
aicortex issue comment add MUL-123 --content "done"
aicortex daemon start
aicortex daemon status
aicortex version
```

Agent 任务内：daemon 会把 `aicortex` shim 前置到 PATH，子进程执行 `aicortex issue ...` 即本包，无需 Go 二进制。

## Daemon

```powershell
$env:AICORTEX_DAEMON_BACKEND = "python"   # 若仍用 Go 包装器拉起
aicortex daemon start
# 或
python -m aicortexpy daemon start --foreground
```

Health 默认端口 **19514**。不要与 Go daemon 同时跑。

## 发布

```powershell
cd python-daemon
python -m build
python -m twine upload dist/*
```

版本：`pyproject.toml` 与 `aicortexpy/__init__.py` 的 `__version__` 保持一致。

## 相对 Go CLI

已覆盖 Agent/日常平台命令（issue/workspace/agent/squad/project/label/attachment/autopilot/meeting/skill/memory/graph/runtime/repo/auth/config/daemon）。

尚未：浏览器 OAuth login、`update` 二进制自更新（请用 `pip install -U aicortexpy`）。
