Skip to content

SDK API Reference / CLIClaudeAgentEnvironment

Class: CLIClaudeAgentEnvironment

Default CLI environment implementation

Uses standard Node.js paths suitable for CLI usage. Claude Code is expected to be available via npm.

Implements

Constructors

Constructor

new CLIClaudeAgentEnvironment(workingDirectory?): CLIClaudeAgentEnvironment

Parameters

workingDirectory?

string

Returns

CLIClaudeAgentEnvironment

Methods

getClaudeCodePath()

getClaudeCodePath(): string

Get the path to the Claude Code CLI executable This is passed to the SDK as pathToClaudeCodeExecutable

Returns

string

Implementation of

ClaudeAgentEnvironment.getClaudeCodePath


getTdxBinPath()

getTdxBinPath(): string

Get the path to the tdx CLI bin directory This is added to PATH for the Bash tool

Returns

string

Implementation of

ClaudeAgentEnvironment.getTdxBinPath


getWorkingDirectory()

getWorkingDirectory(): string

Get the working directory for the agent

Returns

string

Current working directory

Implementation of

ClaudeAgentEnvironment.getWorkingDirectory


hasClaudeCodeCli()

hasClaudeCodeCli(): boolean

Check if Claude Code CLI exists at the expected path

Returns

boolean

true if the CLI executable exists

Implementation of

ClaudeAgentEnvironment.hasClaudeCodeCli