- AI 分析 — 任务执行与结果可视化展示
- AI 聊天 — 与系统进行自然语言对话
- 账户总览 — 持仓 / 委托 / 交易实时展示
- 定时调度 — 自动任务配置与执行
- 一键部署 — Docker 单容器发布,开箱即用
- 前端 — Vue 3 + Vite + Pinia
- 后端 — FastAPI + SQLAlchemy + SQLite
- 发布 — Docker 多阶段构建,单容器同时提供前端资源与后端 API
下载东方财富 APP,首页搜索「妙想 Skills」立即领取。点击 APP 下方交易 → 上方模拟,领取 20 万元模拟资金。回到妙想 Skills 界面,下滑找到「妙想模拟组合管理」skill,绑定模拟组合,将 API Key 保存到程序设置界面。
妙想相关技能使用有限额。
cp .env.docker.example .env.docker编辑 .env.docker:
APP_LOGIN_PASSWORD=your-password
方式一:docker compose
docker compose pull && docker compose up -d方式二:docker run
docker pull ghcr.io/anacondakc/aniu:latest
docker run -d \
--name aniu \
-p 8000:8000 \
--env-file .env.docker \
-v "$(pwd)/data:/app/data" \
ghcr.io/anacondakc/aniu:latest访问 http://<主机IP>:8000,使用密码登录后,在「功能设置」中填写:
OpenAI API KeyOpenAI Base URLOpenAI Model妙想密钥
保存后即可使用 AI 分析与妙想工具。
- Node.js 20+
- Python 3.12 / 3.13+
cd backend
python3 -m venv .venv
./.venv/bin/pip install -r requirements.txt
cp .env.example .env
./.venv/bin/uvicorn app.main:app --reload --host 0.0.0.0 --port 8000默认地址:http://127.0.0.1:8000
cd frontend
npm install
npm run dev默认地址:http://127.0.0.1:3003
Vite 开发时会自动将
/api和/health代理到后端8000端口。
Aniu/
├── backend/ # FastAPI 后端
│ ├── app/
│ ├── tests/
│ └── requirements.txt
├── frontend/ # Vue 3 前端
│ ├── public/
│ └── src/
├── docs/ # 文档与展示素材
├── Dockerfile
├── docker-compose.yml
└── .env.docker.example
- API 前缀:
/api/aniu - 健康检查:
GET /health
常用端点:
POST /api/aniu/login
GET /api/aniu/settings
GET /api/aniu/runs
GET /api/aniu/runtime-overview
| 变量 | 说明 |
|---|---|
APP_LOGIN_PASSWORD |
登录密码(必填) |
ANIU_IMAGE_TAG |
镜像标签,默认 latest |
JWT_SECRET |
未设置时自动生成,建议固定以保持登录态稳定 |
CORS_ALLOW_ORIGINS |
默认 *,正式环境建议设为具体域名 |
OpenAI 与妙想相关配置无需写入环境变量,推荐首次登录后在「功能设置」页面中保存,减少部署维护成本。
- 默认数据库:
/app/data/aniu.sqlite3 - 宿主机挂载:
./data:/app/data - 兼容旧版本
aniu.db文件,自动识别并继续使用 - 镜像内置交易日历缓存
backend/app/data/trading_calendar.json,降低首次启动因远程接口异常导致的失败风险
使用
docker run时请务必挂载数据卷,否则容器重建后数据丢失。
# 前端构建
cd frontend && npm run build
# 后端测试
cd backend && ./.venv/bin/pytest
# 健康检查
curl http://127.0.0.1:8000/health
# 登录接口
curl -X POST http://127.0.0.1:8000/api/aniu/login \
-H "Content-Type: application/json" \
-d '{"password":"your-password"}'仓库包含 GitHub Actions 工作流 .github/workflows/publish-image.yml:
- 推送
main分支 → 发布ghcr.io/anacondakc/aniu:latest及 SHA 标签 - 推送
v1.0.0格式 tag → 发布对应版本镜像并自动创建 Release docker-compose.yml默认拉取ghcr.io/anacondakc/aniu:${ANIU_IMAGE_TAG:-latest}
本项目使用了东方财富的妙想接口,感谢 东方财富。
本项目开发使用了公益站,感谢 LINUX DO 社区的支持。
