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.
Instalación lista para agent
Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.
npx -y tokrepo@latest install c3338e8d-2ef8-4d72-8d2a-43e7518555fd --target codexEjecutar después de confirmar el plan con dry-run.
What it is
lnai is a CLI tool that lets developers define AI coding tool configurations in a single .ai/ directory and automatically sync them to native config formats for seven or more tools: Claude Code (CLAUDE.md), Cursor (.cursor/rules), GitHub Copilot (.github/copilot-instructions.md), Gemini CLI (GEMINI.md), Codex (AGENTS.md), OpenCode, and Windsurf (.windsurfrules).
The target audience is developers and teams who use multiple AI coding assistants and are tired of maintaining duplicate config files. Instead of writing the same rules in five different formats, you write them once and let lnai generate the rest.
How it saves time or tokens
Maintaining separate config files for each AI tool is tedious and error-prone. When you update a coding standard in one file, you have to remember to update all the others. lnai eliminates this duplication -- a single lnai sync command propagates changes to every tool. This also prevents the common problem where one tool follows updated rules while another still operates on stale instructions.
Because configs are generated from a single source, teams can version-control the .ai/ directory and review changes in one place during pull requests.
How to use
- Install globally:
npm install -g lnai
- Initialize in your project:
lnai init
- Edit your configs in the
.ai/directory. - Sync to all tools:
lnai sync
Example
# After editing .ai/rules/typescript.md with your coding standards
$ lnai sync
Synced to:
- .claude/CLAUDE.md
- .cursor/rules/typescript.mdc
- .github/copilot-instructions.md
- GEMINI.md
- AGENTS.md
- .windsurfrules
All seven tools now follow the same TypeScript coding standards from a single source file.
Related on TokRepo
- AI tools for coding -- Other tools that enhance AI-assisted development workflows
- Prompt library -- Reusable prompt templates that pair well with lnai configs
Common pitfalls
- Running
lnai syncbefore committing changes -- the generated files can clutter your git diff. Add a pre-commit hook or run sync as part of your CI pipeline. - Assuming all tools interpret rules identically -- each AI tool has different context window sizes and config parsing behavior. Test critical rules in each tool after syncing.
- Forgetting to add the
.ai/directory to version control -- without it, other team members will not get the configs.
Preguntas frecuentes
lnai currently supports Claude Code (CLAUDE.md), Cursor (.cursor/rules), GitHub Copilot (.github/copilot-instructions.md), Gemini CLI (GEMINI.md), Codex (AGENTS.md), OpenCode, and Windsurf (.windsurfrules). The architecture is extensible, so new tools can be added through the plugin system.
No. lnai generates config files for all supported tools by default, but you can configure which tools to target in your .ai/ settings. If you only use Claude Code and Cursor, lnai will only generate those two config files.
Yes. You can run lnai init at the project level for project-specific rules, and you can maintain a global .ai/ directory for rules that apply across all your projects. Project-level configs take precedence when both exist.
Each tool has a different native format. lnai maintains format-specific templates that translate your universal rules into each tool's expected syntax. If a rule uses a feature only available in one tool (like Cursor's .mdc metadata), lnai includes it only in that tool's output.
Yes. lnai is open-source and available on GitHub. You can install it via npm and contribute new tool adapters through pull requests. The project welcomes contributions for adding support for new AI coding tools.
Referencias (3)
- lnai GitHub— lnai syncs AI tool configs from a unified .ai/ directory to multiple native form…
- Anthropic Claude Code Docs— CLAUDE.md is the configuration file Claude Code reads for project-level instruct…
- Cursor Documentation— Cursor uses .mdc rule files for project-specific AI behavior configuration
Relacionados en TokRepo
Fuente y agradecimientos
Created by Krystian Jonca. Licensed under MIT.
lnai — ⭐ 238
Thank you for solving the multi-tool config fragmentation problem.
Discusión
Activos relacionados
One API — Unified LLM API Gateway (Docker)
One API is a self-hosted LLM API gateway: unify OpenAI/Claude/Gemini/DeepSeek endpoints, manage keys, and deploy via Docker in minutes (33.7k★).
Open Policy Agent (OPA) — Unified Policy Engine for Cloud Native
CNCF graduated policy engine that decouples authorization and admission rules from your services. Write policies once in Rego, evaluate them anywhere.
Kroki — Unified API for Diagrams as Code
A self-hosted service that renders diagrams from textual descriptions, supporting Mermaid, PlantUML, GraphViz, and 20+ formats.
LLaMA-Factory — Fine-Tune 100+ LLMs with a Unified Interface
LLaMA-Factory provides a web UI and CLI to fine-tune large language models including LLaMA, Mistral, Qwen, and more using LoRA, QLoRA, and full-parameter methods without writing training scripts.