Version Control
Version Control
Section titled “Version Control”LNAI generates tool-specific configuration files from your .ai/ source directory. This page explains what to commit and what to ignore.
What to commit
Section titled “What to commit”The .ai/ directory is your source of truth. Commit it so your team shares the same configuration:
.ai/├── config.json # Tool enable/disable settings├── settings.json # Permissions, MCP servers├── AGENTS.md # Project guidelines├── rules/ # Coding rules├── context/ # Project context files└── skills/ # Skill definitionsWhat to gitignore
Section titled “What to gitignore”Generated tool directories (.claude/, .cursor/, .github/, etc.) are output files that lnai sync recreates on demand. By default, they should not be committed.
Automatic .gitignore management
Section titled “Automatic .gitignore management”When you run lnai sync, LNAI automatically manages a section in your .gitignore:
# lnai-generated.claude/CLAUDE.md.claude/rules.cursor/rules/typescript.mdc.ai/.lnai-manifest.json# end lnai-generatedThis section is updated on every sync — stale entries are removed and new ones are added. You do not need to edit it manually.
.lnai-manifest.json
Section titled “.lnai-manifest.json”The file .ai/.lnai-manifest.json is a local cache that tracks which files LNAI has generated. It contains timestamps that change on every sync, so it is always added to .gitignore automatically. You do not need to commit it.
Per-tool version control
Section titled “Per-tool version control”If you want to commit generated files for a specific tool (e.g. cloud-based workflows need them), set versionControl: true in .ai/config.json:
{ "tools": { "claudeCode": { "enabled": true, "versionControl": true }, "cursor": { "enabled": true, "versionControl": false } }}When versionControl is true for a tool, its generated files are excluded from the managed .gitignore section.
Recommended workflow
Section titled “Recommended workflow”- Commit
.ai/to your repository - Run
lnai syncafter cloning or pulling changes - Add
lnai syncto your setup script or CI pipeline so generated files stay up to date