CLI Reference
CLI Reference
Section titled “CLI Reference”LNAI provides three commands for managing your unified AI configuration.
Installation
Section titled “Installation”pnpm add -g lnailnai init
Section titled “lnai init”Initialize a new .ai/ configuration directory.
lnai init [options]When run interactively (in a terminal), lnai init prompts you to select which tools to configure and how to handle version control. Use -y to skip prompts and use defaults.
| Option | Description |
|---|---|
-y, --yes | Skip prompts and use defaults |
--force | Overwrite existing .ai/ directory |
--minimal | Create only config.json (no subdirectories) |
-t, --tools <tools...> | Enable only specific tools |
Examples
Section titled “Examples”lnai init # Interactive mode (prompts for tools)lnai init -y # Non-interactive, use defaultslnai init --minimal # Create only config.jsonlnai init --tools claudeCode # Enable only Claude Codelnai init --force # Overwrite existing configlnai sync
Section titled “lnai sync”Export the unified .ai/ configuration to native tool formats.
lnai sync [options]| Option | Description |
|---|---|
--dry-run | Preview changes without writing files |
--skip-cleanup | Skip deletion of orphaned files |
-t, --tools <tools...> | Filter to specific tools |
-v, --verbose | Show detailed output |
Output Symbols
Section titled “Output Symbols”| Symbol | Meaning |
|---|---|
+ | File created |
~ | File updated |
- | File deleted |
= | File unchanged |
Examples
Section titled “Examples”lnai sync # Sync all enabled toolslnai sync --dry-run # Preview changeslnai sync --tools claudeCode # Sync only Claude Codelnai validate
Section titled “lnai validate”Validate the unified .ai/ configuration structure and content.
lnai validate [options]| Option | Description |
|---|---|
-t, --tools <tools...> | Filter validation to specific tools |
Examples
Section titled “Examples”lnai validate # Validate all configurationlnai validate --tools claudeCode # Validate only for Claude CodeTool Identifiers
Section titled “Tool Identifiers”| Identifier | Tool |
|---|---|
claudeCode | Claude Code |
codex | Codex |
cursor | Cursor |
gemini | Gemini CLI |
copilot | GitHub Copilot |
opencode | OpenCode |
windsurf | Windsurf |