AI Skill Hub 强烈推荐:叙事引擎 是一款优质的AI工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
叙事引擎 是一款基于 TypeScript 开发的开源工具,专注于 AI、TTRPG、自托管 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
叙事引擎 是一款基于 TypeScript 开发的开源工具,专注于 AI、TTRPG、自托管 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g narrativeengine-p # 方式二:npx 直接运行(无需安装) npx narrativeengine-p --help # 方式三:项目依赖安装 npm install narrativeengine-p # 方式四:从源码运行 git clone https://github.com/Sagesheep/NarrativeEngine-P cd NarrativeEngine-P npm install npm start
# 命令行使用
narrativeengine-p --help
# 基本用法
narrativeengine-p [options] <input>
# Node.js 代码中使用
const narrativeengine_p = require('narrativeengine-p');
const result = await narrativeengine_p.run(options);
console.log(result);
# narrativeengine-p 配置说明 # 查看配置选项 narrativeengine-p --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export NARRATIVEENGINE_P_CONFIG="/path/to/config.yml"
1. Clone the repo
git clone https://github.com/Sagesheep/NarrativeEngine-P.git
cd NarrativeEngine-P
Windows — double-click Start_Narrative_Engine.bat
Linux / macOS — run start.sh
Or manually:
npm install
npm run build --prefix packages/engine
npm run dev
http://localhost:5173Example_Setup/ folder ships with ready-to-play worlds, so you can be playing in about two minutes.Requirements: Node.js 20.19 or newer (the LTS build from nodejs.org is fine). Nothing else — no Python, no Docker, no database server.
Playing from another device on your network: run npm run dev:lan instead of npm run dev, then open http://<your-pc-ip>:5173 from the tablet or phone.
---
## / ### headers. Each section becomes a lore chunk the GM can recall. Use [CHUNK: TYPE -- NAME] prefixes to classify entries (world_overview, faction, location, character, power_system, economy, event, rules, culture, misc). Start from Example_Setup/World_compendium/lore_template.md.Put the folder under mods/ at the app root — next to data/. It is created for you on first run.
Narrative Engine/
├── data/ ← your campaigns
└── mods/ ← your mods
└── grimdark-tone/
└── manifest.json
No restart needed. Drop the folder in, open Settings → Extensions, press Rescan, enable it.
Disabling a mod freezes its data — it does not delete it. Re-enable and everything is where you left it. Deleting a mod drops only that mod's own tables; the rest of your campaign is untouched.
A structured pre-game world editor, reachable from the 📖 button on the campaign hub:
1. On the campaign hub, press New Campaign. 2. Campaign Name — anything, e.g. Spirit Card World. 3. World Lore (.md) — pick a world file, e.g. Example_Setup/World_compendium/Spirit Card World/Spirit_Card_World_Lore.md 4. Rules (.md) — pick the current ruleset: Example_Setup/Ruleset/AI_GM_OS_v4.5 - Immersive Mode (Hybrid).md 5. World Loot (.json) — optional. Some worlds ship one, e.g. Example_Setup/World_compendium/Class Scroll World/loot.json 6. Cover Image — optional, any image file. 7. Press Create & Enter. 8. Open the matching start prompt from the same world folder (here, Spirit_card_world_start_prompt.md), paste it as your first chat message, and send.
The GM will walk you through character creation and drop you into the world. Every turn after that is handled by the engine.
Every picture in a campaign carries text with it, which is what makes an image usable at turn 700 instead of only at turn 7.

---
You do not paste lore into a text box. The New Campaign form takes files directly, and the engine chunks and indexes them for you.

The Example_Setup/ folder that ships with the repo contains everything you need:
Example_Setup/
├── Ruleset/ ← how the GM behaves (the system prompt)
├── World_compendium/ ← ready-made worlds, one folder each
└── Ability Compendium/ ← optional power/spell libraries
| Action | Command |
|---|---|
| Install & run (Windows) | Double-click Start_Narrative_Engine.bat |
| Install & run (Linux / macOS) | Run start.sh |
| Update to latest (Windows) | Double-click Update_Narrative_Engine.bat |
| Repair a broken install (Windows) | Double-click Repair_Narrative_Engine.bat |
| Update to latest (manual) | git pull then npm install |
| Install manually | npm install |
| Start the app | npm run dev |
| Start for LAN / tablet play | npm run dev:lan |
| Build for production | npm run build |
| Run tests | npm run test |
| Lint | npm run lint |
| Check translations | npm run i18n:check |
Version 2.0 moved whole features out of the core app and behind a frozen mod API. Open Settings → Extensions to see what's installed, toggle anything off, or press Rescan after dropping in something new.

A pixel-art overworld that reads the Location Ledger rather than replacing it. It ships enabled but unfinished — version 0.6.0-wip — because a half-built map that draws real terrain and walks a real journey is more useful than a hidden one. public/bundled-mods/worldmap/STATUS.md is an honest account of what is and isn't done.

What works today:
Travel can be started from the map, the Places panel, or the composer — all through the same code path.
"Node.js is not installed" when running the start script Install the LTS version from https://nodejs.org/ and run the script again.
"needs Node 20 or newer" when running the start script Your Node.js is too old. Upgrade to the LTS version at https://nodejs.org/.
"NODE_MODULE_VERSION mismatch" error after upgrading Node Your database module was built for the old Node version. Run the repair script and choose option 1 (Quick fix): - Windows — double-click Repair_Narrative_Engine.bat - Linux / macOS — run ./Repair_Narrative_Engine.sh
If the repair fails on Windows with a C++ build tools error, install the Visual C++ Build Tools (select "Desktop development with C++") and run the repair again. Alternatively, run the repair script and choose option 2 (Full clean reinstall) — it may succeed without needing the C++ build tools.
"Cannot find native binding" / "rolldown" / "is not a valid Win32 application" when starting the app Your dependency install was incomplete (a known npm bug with optional dependencies). Run the repair script and choose option 2 (Full clean reinstall): - Windows — double-click Repair_Narrative_Engine.bat - Linux / macOS — run ./Repair_Narrative_Engine.sh
CORS errors with a cloud provider (NVIDIA NIM and similar) Some providers refuse requests made straight from a browser. The engine relays those calls through its own local backend, so this should just work — if it doesn't, check that the server on port 3001 is actually running (npm run dev starts both halves).
---
高质量AI工具,支持自托管和智能记忆
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,叙事引擎 是一款质量优秀的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | NarrativeEngine-P |
| 原始描述 | 开源AI工具:Self-hosted AI Dungeon Master - run extended TTRPG campaigns with smart memory, 。⭐17 · TypeScript |
| Topics | AITTRPG自托管 |
| GitHub | https://github.com/Sagesheep/NarrativeEngine-P |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-25 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。