ConfigsApr 6, 2026·2 min read

lnai — Unified AI Config for Claude, Cursor, Copilot & More

Define AI tool configs once in a .ai/ directory and auto-sync to Claude Code, Cursor, GitHub Copilot, Gemini CLI, Codex, and Windsurf native formats.

AI
AI Open Source · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

  1. Install globally: npm install -g lnai
  2. Initialize in your project: lnai init
  3. Edit configs in the .ai/ directory
  4. Sync to all tools: lnai sync

All your AI tool configs are now generated from a single source.


Intro

lnai is a CLI tool that lets you define AI coding tool configurations once in a unified .ai/ directory and automatically syncs them to native formats for 7+ tools: Claude Code, Cursor, GitHub Copilot, Gemini CLI, Codex, OpenCode, and Windsurf. With 238 GitHub stars and active npm downloads, it eliminates the pain of maintaining separate config files for each AI tool.

Best for: developers who use multiple AI coding tools and want consistent rules across all of them. Works with: Claude Code, Cursor, GitHub Copilot, Gemini CLI, Codex, Windsurf. Setup time: under 2 minutes.


lnai — One Config, All AI Tools

The Problem

Every AI coding tool has its own config format:

  • Claude Code → .claude/
  • Cursor → .cursor/
  • GitHub Copilot → .github/copilot-instructions.md
  • Gemini CLI → .gemini/
  • Windsurf → .windsurf/

Maintaining separate configs for each tool is tedious and error-prone.

The Solution

lnai creates a single .ai/ directory as your source of truth:

.ai/
├── instructions.md    # Shared coding instructions
├── rules/            # Coding rules (applied to all tools)
└── config.yaml       # Tool-specific overrides

Then lnai sync generates native config files for all supported tools.

Supported Tools

Tool Config Directory Status
Claude Code .claude/
Codex .codex/
Cursor .cursor/
Gemini CLI .gemini/
GitHub Copilot .github/copilot-instructions.md
OpenCode .opencode/
Windsurf .windsurf/

Commands

lnai init      # Create .ai/ configuration structure
lnai validate  # Check configs for errors
lnai sync      # Export to all native tool formats
lnai clean     # Remove orphaned config files

FAQ

Q: What is lnai? A: lnai is a CLI tool that manages AI coding configurations from a single .ai/ directory and syncs them to 7+ tools including Claude Code, Cursor, and GitHub Copilot.

Q: Is lnai free? A: Yes, lnai is free and open source under the MIT license.

Q: How do I install lnai? A: Run npm install -g lnai, then lnai init in your project to create the .ai/ config directory.


🙏

Source & Thanks

Created by Krystian Jonca. Licensed under MIT.

lnai — ⭐ 238

Thank you for solving the multi-tool config fragmentation problem.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets