Link a repository
Run reware-lighthouse init to connect a checkout, install the pre-commit hook, and set up your coding agent.
reware-lighthouse init connects one checkout on your machine to its repository in Lighthouse. Run it once in each repository you work on.
cd your-repo
reware-lighthouse initWhat happens
init reads your Git remote to find the repository. For example, git@github.com:acme/payments.git becomes acme/payments. It asks you to confirm, then asks before installing each piece:
Install the pre-commit hook? [Y/n]
Set up Claude Code (.mcp.json and the /lighthouse-enhance skill)? [Y/n]
Set up Codex (.codex/config.toml and the lighthouse-enhance skill)? [Y/n]When it finishes, quit and reopen your coding agent so it loads the new skill.
Files init creates
| Path | Purpose |
|---|---|
.lighthouse/project.toml | Links the checkout to its Lighthouse repository. Holds no secret. init adds .lighthouse/ to .gitignore. |
.git/hooks/pre-commit | Runs reware-lighthouse scan on each commit. An existing hook is kept, and the Lighthouse block is added at the end. |
.mcp.json | Tells Claude Code how to start the Lighthouse MCP server. |
.codex/config.toml | Tells Codex how to start the Lighthouse MCP server. |
.claude/skills/lighthouse-enhance/ | The /lighthouse-enhance skill for Claude Code. |
.agents/skills/lighthouse-enhance/ | The lighthouse-enhance skill for Codex. |
The MCP server is a small process your agent starts in the background to request guidance from Lighthouse. You don't run it yourself.
Running init again is safe. It reports what it created, what was already there, and anything that needs your attention. Your edits to these files are kept.
Install only some pieces
| Flag | Effect |
|---|---|
--no-hook | Skip the pre-commit hook. |
--no-mcp | Skip the coding agent setup. |
--agent claude, --agent codex, --agent both | Set up one agent or both. |
--project owner/name | Link to this repository instead of reading the Git remote. |
--yes | Accept every prompt. |
Shared hooks and the pre-commit framework
init doesn't edit shared hook setups. If core.hooksPath points outside the repository, or you use the pre-commit framework, add this command to that hook yourself:
reware-lighthouse scanTroubleshooting
| You see | Do this |
|---|---|
| The repository isn't registered in Lighthouse | init prints the repositories on your team. If yours is missing, ask an admin to add it. If it's listed under a different name, pass --project owner/name. |
| You don't have access to the repository | Ask an admin for access. |
| The skill doesn't appear in your agent | Quit the agent completely and open it again. |
Next: Check your setup.