GitKraken CLI

gk ai resolve plan

Generate a reviewable resolution plan

Synopsis

Generate a reviewable, read-only conflict resolution plan.

Use –json for the full plan on stdout, or –plan-file to save the full plan atomically (mode 0600 on POSIX; on Windows it inherits the directory’s ACLs). These output modes cannot both be requested explicitly. Prefer –plan-file: refine-plan and apply-plan both take a saved plan path.

Examples: gk ai resolve plan –plan-file /tmp/resolve-plan.json gk ai resolve plan –model --plan-file /tmp/resolve-plan.json gk ai resolve plan --json gk ai resolve plan --file "src/a file.ts" --instructions "keep validation" --json gk ai resolve plan --fallback ours --fallback-only --plan-file /tmp/resolve-plan.json

MODEL SELECTION

–model selects a model for this invocation only and does not change saved provider settings. Without it, Resolve uses the active provider's configured model, or the GitKraken backend default when no global override is set.

Run “gk ai provider show” to inspect the active provider and configured model. For GitKraken-hosted AI, “gk ai models” lists available ids and marks the backend default with *. With the GitKraken provider, –model “” bypasses a saved global override once and uses the backend default.

plan, refine-plan, and apply accept –model because they call AI. Repeat the same selection for each refinement or fresh apply when consistency matters. apply-plan replays reviewed bytes without AI and does not accept –model. –fallback-only skips AI, so it cannot be combined with –model; passing both is an error rather than a silently ignored selection. Any model used for Resolve must support tool calling.

gk ai resolve plan [flags]

Options

      --fallback string       Fallback strategy when AI fails or is unavailable: ours or theirs
      --fallback-only         Resolve directly from --fallback without initializing or calling an AI provider
      --file stringArray      Exact repository-relative conflicted path to resolve (repeatable)
  -h, --help                  help for plan
      --instructions string   Guidance for AI resolution
      --max-steps int         Maximum model tool-calling steps per file (default 15)
      --model string          AI model id for this invocation (does not change saved settings)
      --plan-file string      Write the complete plan atomically (0600 on POSIX)

Options inherited from parent commands

      --json             Emit machine-readable JSON on stdout (GK_OUTPUT=json sets it session-wide)
      --no-telemetry     Disable telemetry (OTel spans, Sentry) for this invocation
      --session string   (Optional) Isolate auth and cache under a named session
      --workdir string   Path to the git repository to operate on (default: current directory)

SEE ALSO

  • gk ai resolve - Plan, review, and stage AI conflict resolutions
Auto generated by spf13/cobra on 16-Sep-2026

© 2023 Axosoft, LLC DBA GitKraken