Skip to content

CLI

openlune <command> [options]

Run openlune --help (or openlune help) at any time for a built-in command summary.

Previews every file change, removal, managed tool installation, initializer run, and client deviation without modifying disk, downloading packages, or running commands.

Terminal window
openlune plan [--client <id>] [--details]

If no client is remembered in .openlune/selection.json (and the manifest has no commit list), plan prompts you to choose one in an interactive terminal or requires --client.

Shows the plan, asks for confirmation, installs declared tools, runs initializers, and writes your client’s native files and MCP config entries.

Terminal window
openlune apply [--client <id>] [--yes] [--deviate] [--details]

When a manifest declares commit: [...] and you omit --client, a single openlune apply applies every listed client at once. Pass --client <id> to apply a specific client (such as an unlisted personal client) instead.

An unchanged apply does nothing and writes no files.

Checks offline that your local checkout matches the manifest—never prompts, never writes files, and never makes network requests.

Terminal window
openlune verify [--client <id>] [--details]

verify checks:

  • Generated files and shared config entries match what the manifest renders (no missing files, stale updates, or local drift)
  • Managed MCP tool installations are intact and launch commands are prepared
  • External or plain committed MCP commands exist on PATH (or at their declared path)
  • MCP initializers have succeeded with the current inputs
  • Required secret: credentials exist in the OS credential store (and prints notices for env: references that only the launching client’s environment can satisfy)

Exits 0 if everything checks out, or 1 if any finding needs action.

Validates the manifest against every supported client (antigravity, claude-code, codex, copilot, grok-build) independently of your checkout’s saved selection or host tools. Designed for maintainers and CI.

Terminal window
openlune check [-C <path>] [--manifest <path>]

In a repository with commit: [...], check also verifies that every committed file in the working tree matches the manifest and fails if any file is missing, unreadable, or stale. It also prints informational notices for stdio MCP declarations (install.tools, initialize, secret:) that have no effect without OpenLune.

Exits 0 when all clients compile cleanly and all committed files match, or 1 otherwise. Note that --client and --details do not apply to check.

Stores or removes named credentials in your operating system’s credential store (io.openlune.secrets on macOS Keychain, Linux Secret Service, or Windows Credential Manager).

Terminal window
openlune secret set <name>
openlune secret delete <name>
  • secret set <name> prompts for the value in an interactive terminal with hidden input and replaces any existing value. Values cannot be passed as arguments or piped from stdin.
  • secret delete <name> deletes the stored entry.
  • Secret names must be non-empty UTF-8 without control characters.

Launches a saved local stdio MCP server from .openlune/mcp.json. AI clients call this command—you normally do not run it yourself.

Terminal window
openlune mcp run --root <absolute-repository> --server <id>

mcp run never reads manifest.yaml, never downloads or installs tools, and never runs initializers. It resolves envFrom credentials in memory right before launching the server and reserves stdout strictly for the MCP protocol. Its exit code mirrors the launched MCP server’s own exit code.

Prints the version of the running openlune binary (openlune --version works too).

Terminal window
openlune version

Supported on plan, apply, verify, and check (except where noted):

Flag Default Description
-C, --directory <path> . Project directory containing the repository root.
--manifest <path> openlune/manifest.yaml Path to the manifest inside the project directory. Not remembered between runs.
--client <id> (remembered) Target AI client: copilot, claude-code, codex, antigravity, or grok-build. Not accepted by check.
--details false Show every resource in full, including file diffs and apply summaries. Not accepted by check.
--plain false Disable color and terminal animations.
--color <mode> auto Color output mode: auto, always, or never.
Flag Description
--yes Apply without interactive confirmation. Does not accept unaccepted deviations on its own.
--deviate Accept unaccepted deviations listed in the plan. Combine with --yes for non-interactive runs with deviations.
--retry-init <id> Retry a failed or interrupted MCP server initializer. Can be passed multiple times for different servers.
--rerun-init <id> Re-run a previously successful MCP server initializer (for example, after changing its inputs). Can be passed multiple times.

Code Meaning
0 Success (or verify / check passed with no failures).
1 Runtime error, validation failure, unconfirmed apply, or failed verify / check.
2 Invalid command, unknown flag, or bad CLI arguments.

For openlune mcp run, a launched server’s own exit code is passed through (or 128 + signal if terminated by a signal).


Variable Effect
OPENLUNE_NO_UPDATE_CHECK Any non-empty value disables the daily check for a newer OpenLune release on GitHub.
CI Any non-empty value also disables the daily release check.
NO_COLOR Any non-empty value disables ANSI colors when --color is auto.
XDG_STATE_HOME On macOS and Linux, overrides the base directory for machine-local OpenLune state (defaults to ~/.local/state). Must be an absolute path.
OPENLUNE_VERSION Used by the install scripts (install.sh / install.ps1) to install a specific release tag such as v0.1.0.

Path Purpose
.openlune/ Per-checkout state: client selection (selection.json), ownership records, MCP launch bindings (mcp.json), initializer attempts, and managed tool installations (.openlune/provision/ on macOS/Linux). Ignores itself in Git.
~/.local/state/openlune/ (macOS/Linux) Persistent machine-local state: isolated HOME directories for managed MCP tools (homes/) and the daily release-check timestamp (release-check).
%LocalAppData%\openlune\ (Windows) Managed MCP installations, isolated HOME directories, and release-check timestamp (kept outside the checkout to avoid Windows path-length limits).
~/.local/bin/openlune (macOS/Linux) / %LocalAppData%\Programs\OpenLune\openlune.exe (Windows) Default binary location used by the official install scripts.