CLI
openlune <command> [options]Run openlune --help (or openlune help) at any time for a built-in command summary.
Commands
Section titled “Commands”openlune plan
Section titled “openlune plan”Previews every file change, removal, managed tool installation, initializer run, and client deviation without modifying disk, downloading packages, or running commands.
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.
openlune apply
Section titled “openlune apply”Shows the plan, asks for confirmation, installs declared tools, runs initializers, and writes your client’s native files and MCP config entries.
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.
openlune verify
Section titled “openlune verify”Checks offline that your local checkout matches the manifest—never prompts, never writes files, and never makes network requests.
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 forenv:references that only the launching client’s environment can satisfy)
Exits 0 if everything checks out, or 1 if any finding needs action.
openlune check
Section titled “openlune check”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.
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.
openlune secret
Section titled “openlune secret”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).
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.
openlune mcp run
Section titled “openlune mcp run”Launches a saved local stdio MCP server from .openlune/mcp.json. AI clients call this command—you normally do not run it yourself.
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.
openlune version
Section titled “openlune version”Prints the version of the running openlune binary (openlune --version works too).
openlune versionGlobal options
Section titled “Global options”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. |
Apply-only options
Section titled “Apply-only options”| 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. |
Exit codes
Section titled “Exit codes”| 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).
Environment variables
Section titled “Environment variables”| 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. |
Local state & storage locations
Section titled “Local state & storage locations”| 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. |