# `ClaudeAgentSDK.CLI`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L1)

Centralized Claude CLI discovery and version tracking.

This module consolidates executable lookup logic and provides helpers
for checking installation status, parsing the installed version, and
warning when the detected version is below the supported minimum.

# `find_executable`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L26)

```elixir
@spec find_executable() :: {:ok, String.t()} | {:error, :not_found}
```

Attempts to find the Claude CLI executable.

Tries candidates in order (`claude-code`, then `claude`) and returns
`{:ok, path}` when found or `{:error, :not_found}` otherwise.

# `find_executable!`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L74)

```elixir
@spec find_executable!() :: String.t()
```

Like `find_executable/0` but raises when the CLI is not available.

# `installed?`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L90)

```elixir
@spec installed?() :: boolean()
```

Returns true if the Claude CLI is installed and discoverable.

# `minimum_version`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L120)

```elixir
@spec minimum_version() :: String.t()
```

Returns the minimum supported Claude CLI version.

# `recommended_version`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L129)

```elixir
@spec recommended_version() :: String.t()
```

Returns the recommended Claude CLI version for this SDK release.

This version is tested and known to work with all SDK features including
file checkpointing, streaming control protocol, and partial messages.

# `resolve_executable`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L43)

```elixir
@spec resolve_executable(ClaudeAgentSDK.Options.t() | nil) ::
  {:ok, String.t()} | {:error, :not_found}
```

Resolves the CLI executable, honoring option overrides.

When `path_to_claude_code_executable` or `executable` is set on the options,
that value is used directly. Otherwise falls back to normal discovery.

# `resolve_executable!`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L58)

```elixir
@spec resolve_executable!(ClaudeAgentSDK.Options.t() | nil) :: String.t()
```

Like `resolve_executable/1` but raises when the CLI is not available.

# `version`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L96)

```elixir
@spec version() :: {:ok, String.t()} | {:error, term()}
```

Returns the installed Claude CLI version as a string.

# `version_supported?`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L135)

```elixir
@spec version_supported?() :: boolean()
```

True if the installed version meets or exceeds the minimum.

# `warn_if_outdated`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.9.2/lib/claude_agent_sdk/cli.ex#L149)

```elixir
@spec warn_if_outdated() :: :ok
```

Emits a warning when the installed CLI is below the supported minimum or unknown.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
