Claude CLI resolution and version helpers backed by the shared core policy.
Summary
Functions
Attempts to find the Claude CLI executable.
Like find_executable/0 but raises when the CLI is not available.
Returns true if the Claude CLI is installed and discoverable.
Returns the minimum supported Claude CLI version.
Returns the recommended Claude CLI version for this SDK release.
Resolves the CLI executable, honoring option overrides.
Like resolve_executable/1 but raises when the CLI is not available.
Returns the installed Claude CLI version as a string.
True if the installed version meets or exceeds the minimum.
Emits a warning when the installed CLI is below the supported minimum or unknown.
Functions
@spec find_executable() :: {:ok, String.t()} | {:error, :not_found}
Attempts to find the Claude CLI executable.
@spec find_executable!() :: String.t()
Like find_executable/0 but raises when the CLI is not available.
@spec installed?() :: boolean()
Returns true if the Claude CLI is installed and discoverable.
@spec minimum_version() :: String.t()
Returns the minimum supported Claude CLI version.
@spec recommended_version() :: String.t()
Returns the recommended Claude CLI version for this SDK release.
@spec resolve_executable(ClaudeAgentSDK.Options.t() | nil) :: {:ok, String.t()} | {:error, :not_found}
Resolves the CLI executable, honoring option overrides.
@spec resolve_executable!(ClaudeAgentSDK.Options.t() | nil) :: String.t()
Like resolve_executable/1 but raises when the CLI is not available.
Returns the installed Claude CLI version as a string.
@spec version_supported?() :: boolean()
True if the installed version meets or exceeds the minimum.
@spec warn_if_outdated() :: :ok
Emits a warning when the installed CLI is below the supported minimum or unknown.