Skip to content

lore hooks

Install git hooks to integrate Lore into your commit workflow.

CommandDescription
lore hooks installInstall hooks in current repository
lore hooks uninstallRemove hooks from current repository
lore hooks statusCheck hook installation status
Terminal window
cd /path/to/your/repo
lore hooks install
Installing git hooks...
Created .git/hooks/post-commit
Created .git/hooks/prepare-commit-msg
Hooks installed successfully.

Runs after each commit. Currently displays a reminder about linking:

Commit created: a1b2c3d
To link an AI session to this commit:
lore link <session-id>
Recent sessions:
c9731a91 2025-12-25 17:52 claude-code myapp
8b2f1c3d 2025-12-25 16:30 aider myapp

Runs before the commit message editor opens. Can add session references to commit messages.

Terminal window
lore hooks status
Git Hooks Status
Repository: /Users/dev/myapp
post-commit: Installed (lore)
prepare-commit-msg: Installed (lore)
pre-commit: Not installed

If hooks exist from other tools, Lore will warn before overwriting:

Warning: post-commit hook already exists
Current: #!/bin/bash\nhusky run...
Overwrite? [y/N]
Terminal window
lore hooks uninstall
Removing git hooks...
Removed .git/hooks/post-commit
Removed .git/hooks/prepare-commit-msg
Hooks removed successfully.

You can also link sessions manually without hooks:

Terminal window
# Link to HEAD
lore link <session-id>
# Link to specific commit
lore link <session-id> --commit a1b2c3d

Hooks are installed per-repository, not globally. Run lore hooks install in each repository where you want automatic linking prompts.