Interactive helpers for conversational use in IEx.
Provides a minimal, REPL-friendly interface that manages session state implicitly so you can just talk to Codex.
Usage
iex> import CodexWrapper.IEx
iex> chat("explain this codebase", working_dir: ".")
# => prints response
iex> say("now add tests for the retry module")
# => continues the conversation
iex> cost()
# => $0.00 across 2 turns
iex> history()
# => prints conversation
iex> reset()
# => starts freshConfiguration
Pass options to chat/2 to configure the session. These persist for
subsequent say/2 calls:
chat("hello", model: "o3", working_dir: "/my/project")Override per-turn with say/2:
say("do something different", model: "o4-mini")
Summary
Functions
Start a new conversation. Prints the response.
Show total cost and turn count for the current session.
Print the conversation history.
Get the last result struct (for programmatic access).
Resume a previous session by ID.
Continue the current conversation. Prints the response.
Get the session ID (for resuming later).
Functions
Start a new conversation. Prints the response.
Accepts all options from CodexWrapper.exec/2 -- config options
(:working_dir, :binary, :env, :timeout, :verbose)
and exec options (:model, :sandbox, :approval_policy, etc.).
Show total cost and turn count for the current session.
Print the conversation history.
Get the last result struct (for programmatic access).
Reset the session (start fresh on next chat/2).
Resume a previous session by ID.
Uses the same config as the last chat/2 call, or pass new options.
Continue the current conversation. Prints the response.
Accepts per-turn exec option overrides.
Get the session ID (for resuming later).