LNAI – 一次定义AI编码工具配置,同步到Claude、Cursor、Codex等。
LNAI – Define AI coding tool configs once, sync to Claude, Cursor, Codex, etc.

原始链接: https://github.com/KrystianJonca/lnai

停止为每个AI编码工具维护单独的配置文件。在.ai/中定义一次,同步到所有地方。单一事实来源——一次性编写项目规则、MCP服务器和权限。 适用于您的工具——同步到每个工具实际读取的本机格式。 保持同步——更新.ai/并运行lnai sync以立即传播更改。 自动清理——配置更改时删除孤立文件。 工具配置生成: Claude Code .claude/ Codex .codex/ Cursor .cursor/ Gemini CLI .gemini/ GitHub Copilot .github/copilot-instructions.md OpenCode .opencode/ Windsurf .windsurf/ npm install -g lnai lnai init # 创建 .ai/ 配置 lnai validate # 检查错误 lnai sync # 导出到本机工具配置 完整指南和配置参考请访问 lnai.sh MIT 如果您觉得LNAI有帮助,请在GitHub上为我们点赞!

## LNAI:统一的AI编码工具配置 LNAI是一个新的CLI工具,旨在简化对多个AI编码助手(如Claude Code、Cursor和Codex)的配置管理。目前,每种工具都需要其独特的配置格式,导致重复工作和不一致性。 LNAI通过允许用户在中央`.ai/`目录中*一次*定义配置来解决这个问题。运行`lnai sync`然后自动将这些配置导出到7个支持工具的本机格式,处理每个工具的特定怪癖和限制(例如不同的文件类型或权限级别)。 重要的是,LNAI经常使用符号链接,这意味着对中央配置的编辑会立即反映在所有工具中。该项目使用TypeScript和插件架构构建,使其易于扩展。它在GitHub上可用 ([https://github.com/KrystianJonca/lnai](https://github.com/KrystianJonca/lnai)),并采用MIT许可。创建者正在寻求来自面临类似配置挑战的用户的反馈。
相关文章

原文

LNAI Logo

npm version npm downloads build status license GitHub stars

Stop maintaining separate config files for every AI coding tool. Define once in .ai/, sync everywhere.

LNAI Demo

  • One source of truth — Write your project rules, MCP servers, and permissions once
  • Works with your tools — Syncs to native formats each tool actually reads
  • Stay in sync — Update .ai/ and run lnai sync to propagate changes instantly
  • Automatic cleanup — Orphaned files are removed when configs change
Tool Config Generated
Claude Code .claude/
Codex .codex/
Cursor .cursor/
Gemini CLI .gemini/
GitHub Copilot .github/copilot-instructions.md
OpenCode .opencode/
Windsurf .windsurf/
npm install -g lnai

lnai init      # Create .ai/ configuration
lnai validate  # Check for errors
lnai sync      # Export to native tool configs

Full guides and configuration reference at lnai.sh

MIT


If you find LNAI helpful, please star us on GitHub!

联系我们 contact @ memedata.com