# 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. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use 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 ```bash 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](https://github.com/KrystianJonca). Licensed under MIT. > > [lnai](https://github.com/KrystianJonca/lnai) — ⭐ 238 Thank you for solving the multi-tool config fragmentation problem. --- ## Quick Use 1. Install globally: `npm install -g lnai` 2. Initialize your project: `lnai init` 3. Edit the config in the `.ai/` directory 4. Sync to every tool: `lnai sync` --- ## Intro lnai is a CLI tool that lets you define AI coding tool configs in a single `.ai/` directory and sync them to 7+ tools' native formats: Claude Code, Cursor, GitHub Copilot, Gemini CLI, Codex, OpenCode, and Windsurf. With 238 GitHub stars, it eliminates the pain of maintaining separate config files per AI tool. --- ## lnai — One Config, All AI Tools ### The Problem Every AI coding tool has its own config format, and maintaining separate configs per tool is tedious and error-prone. ### The Solution lnai creates a `.ai/` directory as the single source of truth, then `lnai sync` generates native config files for all supported tools. ### Supported Tools | Tool | Config directory | |------|-------------------| | Claude Code | `.claude/` | | Cursor | `.cursor/` | | GitHub Copilot | `.github/copilot-instructions.md` | | Gemini CLI | `.gemini/` | | Windsurf | `.windsurf/` | --- ## Source & Thanks > Created by [Krystian Jonca](https://github.com/KrystianJonca). Licensed under MIT. > > [lnai](https://github.com/KrystianJonca/lnai) — ⭐ 238 --- Source: https://tokrepo.com/en/workflows/lnai-unified-ai-config-claude-cursor-copilot-more-c3338e8d Author: AI Open Source