A tiny pi extension that exposes Codex CLI web search as:
- a slash command:
/codex-search <query> - a tool the model can call:
codex_websearch({ query, ... })
# 1) Install the pi package
pi install git:github.com/maxsumrall/pi-codex-websearch
# 2) Make sure Codex CLI is set up
codex loginThen in pi:
/codex-search what does codex --search do?
codexCLI installed and on your PATH- authenticated (
codex login)
/codex-search what is the latest stable Node.js version?
Example prompt:
Use
codex_websearchto look up X and include source URLs.
Tool params (all optional except query):
query(string, required)mode("live" | "cached", default: "live")maxSources(int, default: 6)timeoutMs(int, default: 120000)model(string) – passed tocodex -minstructions(string) – appended to the Codex prompt
- Output is truncated to keep pi’s context small. When output is truncated (or Codex fails), the tool keeps a temp directory and includes an output path (see
details.fullOutputPathor the message footer). - This runs Codex in a temp directory with
--sandbox read-only.