A CLI for managing AI agent config files (CLAUDE.md, AGENTS.md, .cursorrules, .mcp.json, …) without committing them to the repo.
~/repo/CLAUDE.md ──→ ~/.local/share/lac/<repo>/CLAUDE.md
(symlink) (the actual file)
Files live outside the repo, are symlinked in, and excluded from git via .git/info/exclude. That directory is itself a git repo, so the same configs can be reused on another machine.
- AI configs that differ from team defaults.
- Personal tweaks that don't belong in shared history.
- Same configs across multiple machines.
# Homebrew
brew install 2ykwang/2ykwang/lac-py
# pipx
pipx install lac-py
lac --versionIn any git repo:
cd ~/projects/my-project
lac register
# ✓ registered
lac link --all
# ✓ CLAUDE.md linked
# ✓ AGENTS.md linked
# ✓ .claude linked
# ✓ .agents linked
# ✓ .cursorrules linked
# ✓ .mcp.json linkedEdit any of these files in your repo as usual — they're symlinks, so changes go to the stored copy too. To stop using lac in this repo, run lac unregister.
Three pieces:
- Symlinks — each linked file in the repo is a symlink to its copy in lac's storage directory.
- Git exclusion — every linked filename is appended to
.git/info/excludebetween# === lac:start ===and# === lac:end ===markers. Git ignores them without touching.gitignore. - Repo identity — each repo is matched by its git remote URL when available, otherwise by absolute path. The same repo on two machines maps to the same storage subdirectory.
- CLAUDE.md
- AGENTS.md
- .claude/
- .agents/
- .cursorrules
- .mcp.json
Add others with lac link <filename>.
The storage directory (printed by lac home) is itself a git repo:
# on machine A — initial push
cd "$(lac home)"
git remote add origin <your-private-remote-url>
git add . && git commit -m "initial" && git push -u origin main
# on machine B — clone BEFORE any lac command runs on this machine
# (lac auto-creates the storage directory on first command, which would block git clone)
git clone <your-private-remote-url> ~/.local/share/lac
# or, if $LAC_HOME is set:
git clone <your-private-remote-url> "$LAC_HOME"
cd ~/projects/repo
lac register
lac link --all| Command | What it does |
|---|---|
lac register |
Register the current repo with lac. |
lac link |
Interactive checkbox — pick which files to link. |
lac link --all |
Link all default files at once. |
lac link <file> |
Link a single file by name. |
lac status |
Show registration state of the current repo. |
lac unregister |
Restore files in the repo and back up this repo's storage subdirectory. |
| Command | What it does |
|---|---|
lac doctor |
Check for broken symlinks, orphaned entries, missing targets. |
lac list |
List all registered repos. |
lac home |
Print the storage directory. |
lac path [file] |
Print this repo's storage path (or a file inside it). |
lac rename <name> |
Rename this repo's storage subdirectory. |
- macOS and Linux only. Windows is not supported.
- Python ≥3.11.
- Single-user. Sharing the storage directory between people isn't supported.
- Sync between machines is manual (
git push/git pull).
MIT
