Skip to content

To commit or not commit?

Sooner or later, every team adopting OpenLune hits the same question: should the generated CLAUDE.md, .github/agents/, and .mcp.json files stay local—or should we commit them to Git?

There is no single right answer here—it is a real trade-off between full OpenLune features and zero-friction onboarding:

  • Don’t commit (keep files local): OpenLune configures your local MCP servers to start through the OpenLune MCP launcher (openlune mcp run). That gives you isolated tool provisioning, one-time initializers, and secrets management via your OS keyring—and keeps generated files out of Git diffs. The catch: every collaborator on the project needs OpenLune installed.
  • Commit generated files: OpenLune writes plain, standard client configurations with no OpenLune launcher in the middle. Collaborators don’t need OpenLune installed at all—they clone the repo and go. The catch: without the launcher, they bring their own MCP runtimes and export environment variables themselves, without OS keyring integration.

OpenLune is required to manage the environment, not necessarily to use it.

As a rule of thumb:

  • Keep files local for company teams and FOSS projects that already maintain a higher bar for contributing. Everyone has a standard dev setup anyway, so installing one CLI is a small ask in exchange for managed MCP servers and OS-keyring secrets.
  • Commit generated files for projects that welcome drive-by contributions and want to keep onboarding friction as low as possible. Contributors who drop in for a single PR shouldn’t have to install another tool just to get your project’s instructions, agents, and skills.
Keep files local (default) Commit generated files
Manifest No commit key commit: [claude-code, copilot]
Generated files Ignored by Git Committed for the listed clients
Who needs OpenLune Every contributor Anyone editing the manifest (or using an unlisted client)
Local MCP servers Started via the OpenLune MCP launcher (managed tools, initializers, OS keyring secrets) Plain, standard client config; contributors install commands and set env vars themselves

Option 1: Keep generated files local (default)

Section titled “Option 1: Keep generated files local (default)”

Don’t add a commit key to openlune/manifest.yaml. There is nothing to add to .gitignore either: openlune apply keeps what the repository doesn’t commit out of Git.

  • .openlune/ holds the checkout’s own records and ignores itself.
  • Generated files are listed in the repository’s .git/info/exclude, which Git neither commits nor passes on to other clones. Only the files OpenLune actually generated in your checkout are listed, so hand-written files next to them stay visible.

A file that holds generated MCP entries, such as .mcp.json, is ignored as a whole, because its entries start servers from your checkout. If the repository already tracks that file, Git keeps reporting changes to it.

Outside a Git repository, or where Git isn’t installed, apply skips this step.

Option 2: Commit generated files for chosen clients

Section titled “Option 2: Commit generated files for chosen clients”

List the clients whose files you want checked into Git under commit:

version: "0.1"
commit: [claude-code, codex]
instructions:
project:
source: instructions.md
agents:
reviewer:
description: Review changes for correctness and maintainability.
instructions: agents/reviewer.md

Run openlune apply, review the plan, and commit the generated files alongside openlune/manifest.yaml. One openlune apply run generates files for every client listed in commit without asking you to pick a client.

From that point on:

  • Contributors using a listed client (claude-code or codex) just clone the repo and start working. No OpenLune needed.
  • A contributor who prefers an unlisted client (say, Grok Build) can still run:
    Terminal window
    openlune apply --client grok-build
    Files unique to Grok Build stay local to their checkout, and Git ignores them there.

Treat generated files as build outputs: don’t edit CLAUDE.md or .codex/agents/reviewer.toml by hand. Edit openlune/manifest.yaml (or its source files), run openlune apply, and commit the result.

Because the manifest is the source of truth for committed clients, openlune apply will replace a differing committed file after showing you the change in review.

Add openlune check to your CI pipeline. In a repo with commit, openlune check fails whenever a committed file is missing or differs from what the manifest renders—and tells you exactly which file is stale.

What changes for local MCP servers when committed

Section titled “What changes for local MCP servers when committed”

A committed MCP entry has to work on any machine without OpenLune, so the client starts your declared command directly instead of calling openlune mcp run.

Three features depend on OpenLune running locally, so they have no effect for committed entries (openlune check prints a notice naming any server that uses them):

  • install.tools — Nothing is installed; contributors need command on their PATH.
  • initialize — No initializer runs.
  • secret: sources in envFrom — The OS credential store is not consulted.

Instead, every envFrom target reads an environment variable from the environment the client was launched from—specifically, its first env: source, or a variable with the same name as the target if only secret: sources were listed. For example:

mcp:
tracker:
transport: stdio
command: tracker-mcp
envFrom:
TRACKER_TOKEN: secret:tracker-token

In a committed repo, every client reads TRACKER_TOKEN from its environment, formatted in each client’s native syntax:

Client How the variable is passed
Claude Code, Copilot Written as ${NAME}
Grok Build Written as ${env:NAME}
Codex, Antigravity Forwarded only under the target’s own name; reading from a differently named variable is omitted (reported as a deviation)

Two subtleties to keep in mind:

  • Unset variables: If TRACKER_TOKEN isn’t set, Claude Code and Copilot pass the literal text ${TRACKER_TOKEN} to the server; Codex and Antigravity pass nothing.
  • No ${...} literals in command, args, or env: Because Claude Code, Copilot, and Grok Build expand variable placeholders in plain entries, literal strings like ${HOME} (or $NAME in Copilot) cannot stay literal and are rejected. Use envFrom instead.
  • Checking prerequisites locally: Contributors who do have OpenLune installed can run openlune verify to see whether a plain MCP server’s command is missing from PATH or a referenced variable isn’t set.

You aren’t locked into your first choice.

From local to committed:

  1. Add commit: [...] to openlune/manifest.yaml.
  2. Run openlune apply. Git stops ignoring the listed clients’ files.
  3. Commit the manifest and generated files.

From committed back to local:

  1. Remove commit from openlune/manifest.yaml.
  2. Run openlune apply.
  3. Stop tracking the generated files in Git without deleting your local copies:
    Terminal window
    git rm --cached CLAUDE.md .claude/agents/reviewer.md
  • Repo-relative MCP commands: A plain committed MCP server that runs a script inside the repository (like ./scripts/mcp.py) only starts when the client is launched from the repository root, because CLI clients launch project servers in their current working directory and Antigravity App starts them in /.
  • Removing old files: A generated file that you later remove from the manifest is automatically deleted only in checkouts that previously applied it with OpenLune.