Skip to content

ccproxy.cli.options

ccproxy.cli.options

CLI option modules for organized command-line argument handling.

ClaudeOptions

ClaudeOptions(
    max_thinking_tokens=None,
    allowed_tools=None,
    disallowed_tools=None,
    claude_cli_path=None,
    append_system_prompt=None,
    permission_mode=None,
    max_turns=None,
    cwd=None,
    permission_prompt_tool_name=None,
    sdk_message_mode=None,
    sdk_pool=False,
    sdk_pool_size=None,
    sdk_session_pool=False,
    system_prompt_injection_mode=None,
    builtin_permissions=True,
)

Container for all Claude-related CLI options.

This class provides a convenient way to include all Claude-related options in a command using typed attributes.

Parameters:

Name Type Description Default
max_thinking_tokens int | None

Maximum thinking tokens for Claude Code

None
allowed_tools str | None

List of allowed tools (comma-separated)

None
disallowed_tools str | None

List of disallowed tools (comma-separated)

None
claude_cli_path str | None

Path to Claude CLI executable

None
append_system_prompt str | None

Additional system prompt to append

None
permission_mode str | None

Permission mode

None
max_turns int | None

Maximum conversation turns

None
cwd str | None

Working directory path

None
permission_prompt_tool_name str | None

Permission prompt tool name

None
sdk_message_mode str | None

SDK message handling mode

None
sdk_pool bool

Enable general Claude SDK client connection pooling

False
sdk_pool_size int | None

Number of clients to maintain in the general pool

None
sdk_session_pool bool

Enable session-aware Claude SDK client pooling

False
system_prompt_injection_mode str | None

System prompt injection mode

None
builtin_permissions bool

Enable built-in permission handling infrastructure

True
Source code in ccproxy/cli/options/claude_options.py
def __init__(
    self,
    max_thinking_tokens: int | None = None,
    allowed_tools: str | None = None,
    disallowed_tools: str | None = None,
    claude_cli_path: str | None = None,
    append_system_prompt: str | None = None,
    permission_mode: str | None = None,
    max_turns: int | None = None,
    cwd: str | None = None,
    permission_prompt_tool_name: str | None = None,
    sdk_message_mode: str | None = None,
    sdk_pool: bool = False,
    sdk_pool_size: int | None = None,
    sdk_session_pool: bool = False,
    system_prompt_injection_mode: str | None = None,
    builtin_permissions: bool = True,
):
    """Initialize Claude options.

    Args:
        max_thinking_tokens: Maximum thinking tokens for Claude Code
        allowed_tools: List of allowed tools (comma-separated)
        disallowed_tools: List of disallowed tools (comma-separated)
        claude_cli_path: Path to Claude CLI executable
        append_system_prompt: Additional system prompt to append
        permission_mode: Permission mode
        max_turns: Maximum conversation turns
        cwd: Working directory path
        permission_prompt_tool_name: Permission prompt tool name
        sdk_message_mode: SDK message handling mode
        sdk_pool: Enable general Claude SDK client connection pooling
        sdk_pool_size: Number of clients to maintain in the general pool
        sdk_session_pool: Enable session-aware Claude SDK client pooling
        system_prompt_injection_mode: System prompt injection mode
        builtin_permissions: Enable built-in permission handling infrastructure
    """
    self.max_thinking_tokens = max_thinking_tokens
    self.allowed_tools = allowed_tools
    self.disallowed_tools = disallowed_tools
    self.claude_cli_path = claude_cli_path
    self.append_system_prompt = append_system_prompt
    self.permission_mode = permission_mode
    self.max_turns = max_turns
    self.cwd = cwd
    self.permission_prompt_tool_name = permission_prompt_tool_name
    self.sdk_message_mode = sdk_message_mode
    self.sdk_pool = sdk_pool
    self.sdk_pool_size = sdk_pool_size
    self.sdk_session_pool = sdk_session_pool
    self.system_prompt_injection_mode = system_prompt_injection_mode
    self.builtin_permissions = builtin_permissions

CoreOptions

CoreOptions(config=None)

Container for core CLI options.

This class provides a convenient way to include core options in a command using typed attributes.

Parameters:

Name Type Description Default
config Path | None

Path to configuration file

None
Source code in ccproxy/cli/options/core_options.py
def __init__(
    self,
    config: Path | None = None,
):
    """Initialize core options.

    Args:
        config: Path to configuration file
    """
    self.config = config

SecurityOptions

SecurityOptions(auth_token=None)

Container for all security-related CLI options.

This class provides a convenient way to include all security-related options in a command using typed attributes.

Parameters:

Name Type Description Default
auth_token str | None

Bearer token for API authentication

None
Source code in ccproxy/cli/options/security_options.py
def __init__(
    self,
    auth_token: str | None = None,
):
    """Initialize security options.

    Args:
        auth_token: Bearer token for API authentication
    """
    self.auth_token = auth_token

ServerOptions

ServerOptions(
    port=None,
    host=None,
    reload=None,
    log_level=None,
    log_file=None,
    use_terminal_confirmation_handler=None,
)

Container for all server-related CLI options.

This class provides a convenient way to include all server-related options in a command using typed attributes.

Parameters:

Name Type Description Default
port int | None

Port to run the server on

None
host str | None

Host to bind the server to

None
reload bool | None

Enable auto-reload for development

None
log_level str | None

Logging level

None
log_file str | None

Path to JSON log file

None
use_terminal_confirmation_handler bool | None

Enable terminal UI for confirmation prompts

None
Source code in ccproxy/cli/options/server_options.py
def __init__(
    self,
    port: int | None = None,
    host: str | None = None,
    reload: bool | None = None,
    log_level: str | None = None,
    log_file: str | None = None,
    use_terminal_confirmation_handler: bool | None = None,
):
    """Initialize server options.

    Args:
        port: Port to run the server on
        host: Host to bind the server to
        reload: Enable auto-reload for development
        log_level: Logging level
        log_file: Path to JSON log file
        use_terminal_confirmation_handler: Enable terminal UI for confirmation prompts
    """
    self.port = port
    self.host = host
    self.reload = reload
    self.log_level = log_level
    self.log_file = log_file
    self.use_terminal_confirmation_handler = use_terminal_confirmation_handler