LNAI – Define AI coding tool configs once, sync to Claude, Cursor, Codex, etc.
by iamkrystian17 on 2/3/2026, 8:45:57 AM
https://github.com/KrystianJonca/lnai
Comments
by: optikalfire
Is this substantially different than <a href="https://github.com/intellectronica/ruler" rel="nofollow">https://github.com/intellectronica/ruler</a>? Or how would you differentiate?
2/3/2026, 11:29:49 AM
by: embedding-shape
Hmm, maybe it's just me, but it's a good thing the different agents use different files, different models needs different prompts. Using the same system/user prompts across all three will just give you slightly worse results in one of them, instead of getting the best results you can from each one of them. At least for the general steering system prompts.<p>Then for the application specific documentation, I'd understand you'd want to share it, as it stays the same for all agents touching the same codebase. But easily solved by putting it in DESIGN.md or whatever and appending "Remember to check against DESIGN.md before changing the architecture" or similar.
2/3/2026, 10:44:05 AM
by: anupamchugh
This solves distribution well. Curious about the change propagation story though - what happens when you update your .ai/ source and tools have cached/transformed versions?<p>I ran into this building a spec/skill sync system [1] - the "sync once" model breaks down when you need to track whether downstream consumers are aware of upstream changes.<p><pre><code> [1] https://github.com/anupamchugh/shadowbook</code></pre>
2/3/2026, 10:21:20 AM
by: OsamaJaber
Nice. The config fragmentation across tools is a real annoyance Does it handle conflicts if tools expect different formats for the same setting?
2/3/2026, 10:04:13 AM
by: zaptheimpaler
I’ve been using chezmoi to manage dot files, that should be enough to handle AI config too. It’s easier to just have one tool do all of that.
2/3/2026, 10:59:17 AM
by: iamkrystian17
I've been using Claude Code, Cursor, and Codex on the same projects. Each tool has its own config format: Claude wants `.claude/`, Cursor wants `.cursor/`, Codex wants `.codex/`. Every time I updated a skill/rule, I had to update it in 3+ places. Usually I'd forget one, and my tools would give inconsistent suggestions. LNAI is a CLI that lets you define your AI configs once in a `.ai/` directory:<p>.ai/ ├── AGENTS.md ├── rules/ ├── skills/ └── settings.json # MCP servers, permissions<p>Run `lnai sync` and it exports to native formats for 7 tools: Claude Code, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf, and Codex. The interesting part is it's not just copying files. Each tool has quirks:<p>- Cursor wants `.mdc` files with `globs` arrays in frontmatter - Gemini reads rules at the directory level, so rules get grouped - Permissions like `Bash(git:*)` become `Shell(git)` for Cursor - Some tools don't support certain features (e.g., Cursor has no "ask" permission level). LNAI warns but doesn't fail<p>Where possible, it uses symlinks. So `.claude/CLAUDE.md` → `../.ai/AGENTS.md`. Edit the source, all tools see the change immediately without re-syncing.<p>Usage:<p>npm install -g lnai lnai init # Creates .ai/ directory lnai validate # Checks for config errors lnai sync # Exports to all enabled tools<p>It's MIT licensed. The code is TypeScript with a plugin architecture, each tool is a plugin that implements import/export/validate. GitHub: <a href="https://github.com/KrystianJonca/lnai" rel="nofollow">https://github.com/KrystianJonca/lnai</a> Docs: <a href="https://lnai.sh" rel="nofollow">https://lnai.sh</a><p>Would appreciate feedback, especially from anyone else dealing with this config hell problem.
2/3/2026, 8:45:57 AM
by: devil1591
[dead]
2/3/2026, 10:52:04 AM