mirror of
https://github.com/margrop/wrong-notebook.git
synced 2026-12-03 09:29:21 +08:00
- 新增通用启动器 packaging/runtime/launcher.js:数据目录、预置数据库、自动迁移、NextAuth 密钥 - 新增构建脚本 scripts/package/build.mjs(bundle / npm / desktop / fnos) - 桌面版基于 Electron,飞牛OS 打包参考 CreditDaddy 的 fnpack 流程 - 新增 packages.yml 工作流,在各平台 Runner 构建并上传 Release - 配置目录支持 CONFIG_DIR 环境变量 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wrong-notebook
错题本:上传题目图片或文字,由 AI 识别、解析并标注知识点,支持错题本管理、练习、统计与打印导出。
项目主页:https://github.com/margrop/wrong-notebook
安装与启动
需要 Node.js 22.15 及以上。
npm install -g wrong-notebook
wrong-notebook # 默认监听 0.0.0.0:3000
wrong-notebook --port 8080 --data-dir ~/wrong-notebook-data
浏览器打开 http://127.0.0.1:3000。首次启动的默认管理员为 admin@localhost / 123456,登录后请立即修改密码,并在「设置」中填写 AI 服务的 API Key。
数据目录
默认 ~/.wrong-notebook,可用 --data-dir 或环境变量 WRONG_NOTEBOOK_HOME 修改,其中包含:
| 文件 | 说明 |
|---|---|
wrong-notebook.db |
SQLite 数据库 |
config/app-config.json |
应用设置(含 AI API Key) |
.nextauth_secret |
登录会话密钥,首次启动自动生成 |
升级:npm install -g wrong-notebook@latest,启动时自动执行数据库迁移,已有数据保留。
常见问题
- 安装时需要从 Prisma 下载数据库引擎。国内网络较慢时可设置镜像后重装:
PRISMA_ENGINES_MIRROR=https://registry.npmmirror.com/-/binary/prisma npm install -g wrong-notebook - 使用
--ignore-scripts安装时,首次启动会自动生成 Prisma Client,需要安装目录可写。 - 其余环境变量(如
AI_PROVIDER、OPENAI_API_KEY、LOG_LEVEL)与 Docker 部署相同,见仓库.env.example。