Files
agentdock/docs/USAGE.md

114 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 日常使用
## 使用网页控制台
局域网浏览器访问:
```text
https://192.168.200.36:8443
```
登录后可以选择项目、发送消息、查看文字回复、Git Diff 和历史会话。
关闭浏览器不会停止 CLI;停止 `ai-tools` 容器才会停止其中全部 CLI 进程。
日常任务使用“会话”页的单一多行输入框;Enter 发送,Shift+Enter 换行。首次登录时从“设置 -> CLI 账号”打开独立终端。
“原始输出”只用于故障排查。日常任务使用非交互模式,不会弹出原生确认提示。
DeepSeek Harness 没有空会话,必须先输入完整任务再发送。
Provider 切换在“设置 -> Provider”完成,只影响切换后新启动的 CLI 会话。MCP 与 Skills 的完整编辑仍在 CC Switch TUI 中完成。Multica 的连接、Workspace 和 daemon 状态在“设置 -> Runtime”查看。
网页中的“运行中实例”表示当前真实 CLI 进程数量,不是已安装工具数量。
## 在 Ubuntu 上使用
先登录 Ubuntu
```powershell
ssh nas
```
进入部署目录后调用工具:
```bash
ai codex my-project
ai claude my-project
ai codebuddy my-project
ai kimi my-project
ai opencode my-project
ai qwen my-project
ai cc-switch
ai multica daemon status --output json
```
`my-project` 对应 NAS 的 `/vol1/1000/docker/ai-toools/workspace/my-project``cc-switch``multica` 是管理命令,不接项目参数。
如果不使用辅助脚本,原始命令是:
```bash
docker compose exec --workdir /workspace/my-project ai-tools codex
```
## 从 Windows 一条命令调用
在包含本部署包的 Windows 目录执行:
```powershell
.\scripts\remote-ai.ps1 `
-Server mobai@192.168.1.100 `
-Tool codex `
-Project my-project
```
调用其他工具只需要修改 `-Tool`
```powershell
.\scripts\remote-ai.ps1 -Server mobai@192.168.1.100 -Tool claude -Project my-project
.\scripts\remote-ai.ps1 -Server mobai@192.168.1.100 -Tool kimi -Project my-project
.\scripts\remote-ai.ps1 -Server mobai@192.168.1.100 -Tool qwen -Project my-project
```
传递额外参数:
```powershell
.\scripts\remote-ai.ps1 `
-Server mobai@192.168.1.100 `
-Tool kimi `
-Project my-project `
-ToolArguments @("-p", "解释这个项目")
```
DeepSeek Harness 无界面任务:
```powershell
.\scripts\remote-ai.ps1 `
-Server mobai@192.168.1.100 `
-Tool dsh `
-Project my-project `
-ToolArguments @("--profile", "headless", "运行测试")
```
## 推荐的工作方式
1. Windows Cursor 使用 Remote SSH 打开 Ubuntu 的 `/srv/projects/my-project`
2. Windows Terminal 使用 `remote-ai.ps1` 启动需要的 CLI。
3. Cursor 和容器看到的是同一份 Ubuntu 项目文件。
4. OpenClaw继续按现有方式运行,与本容器互不影响。
## 查看容器状态
```bash
cd /opt/ai-toolbox
docker compose ps
docker compose logs --tail=100 ai-tools
docker compose exec ai-tools ai-tools-check
```
## 停止和启动
```bash
docker compose stop
docker compose start
```
Codex、Claude 等任务 CLI 只在会话期间运行。容器常驻 Runner、Supervisor 和 Multica daemon;停止 `ai-tools` 容器会同时停止 daemon 和全部会话。配置保存在宿主机 `data` 目录,重新启动或重建容器后仍在。