{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreia2w3hchfl7tifjwf33hbhz5rceidyori5tnttud5luasxsk3m3vi",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mikc2c5btjz2"
  },
  "path": "/t/codex-s-buddy-this-can-help-you-have-a-buddy-when-using-codex/1378395#post_1",
  "publishedAt": "2026-04-02T21:58:49.000Z",
  "site": "https://community.openai.com",
  "textContent": "# **Buddy-codex**\n\nYou can visit the npm repository or github repository with the same name to find the code\n\n`buddy-codex` is the npm package for Codex Buddy like claude code Buddy, a standalone terminal pet for Codex.\nNote: Currently only supports mac platform\n\nThere may still be many bugs. If you have any questions, please leave a message and contact me.\n\nIt reads your local Codex activity from `~/.codex`, renders a live ASCII buddy window, exposes MCP tools for Codex, and lets a local Codex skill route `$buddy` interactions into the pet without making you switch back and forth between two terminals.\n\n## **Features**\n\n### **Buddy Chat**\n\nTalk to the pet directly from Codex through the local MCP tools and skill bridge. The pet answers inside its own terminal window, with tone driven by its species, personality, and current stat drift.\n\nDemo image placeholder:\n\n### **Calendar**\n\nShow the last 35 days of Codex activity as a compact GitHub-style block calendar inside the sidebar.\n\n### **Friends**\n\nMaintain a local friends list, look up friends by Codex user ID, and inspect their published buddy calendar through the built-in Cloudflare directory worker.\n\nDemo image placeholder:\n\n## **Requirements**\n\n  * macOS\n\n  * Node.js `>= 22`\n\n  * Codex Desktop\n\n\n\n\n## **Install**\n\n\n    npm install -g buddy-codex\n\n\nAfter install, confirm the binary path:\n\n\n    which buddy-codex\n\n\nKeep that absolute path. On macOS, GUI apps often do not inherit your shell PATH, so Codex Desktop is more reliable when you put the full path into `~/.codex/config.toml`.\n\n## **First Run**\n\nStart the pet window once:\n\n\n    buddy-codex\n\n\nThis creates `~/.codex-buddy/` and also writes a default LLM config file:\n\n  * `~/.codex-buddy/LLMConfig.json`\n\n  * `~/.codex-buddy/config.json`\n\n\n\n\n`config.json` stores the pet soul, growth state, friends, and Cloudflare directory sync state.\n`LLMConfig.json` is the only file you normally need to edit by hand.\n\n## **Configure LLMConfig**\n\nEdit `~/.codex-buddy/LLMConfig.json`:\n\n\n    {\n      \"model\": \"gpt-4o-mini\",\n      \"baseUrl\": \"https://your-openai-compatible-endpoint/v1\",\n      \"apiKey\": \"YOUR_API_KEY\"\n    }\n\n\nNotes:\n\n  * `model` already defaults to `gpt-4o-mini`\n\n  * `baseUrl` must be set by you\n\n  * `apiKey` must be set by you\n\n\n\n\n## **Run The Pet Window**\n\nKeep one terminal window running:\n\n\n    buddy-codex\n\n\nThis is the visible pet window.\n\nDo not replace it with `buddy-codex mcp`.\n`buddy-codex mcp` is only for Codex Desktop to talk to the pet through MCP.\n\n## **Configure Codex MCP**\n\nOpen your Codex config:\n\n  * `~/.codex/config.toml`\n\n\n\nAdd this block:\n\n\n    [mcp_servers.codex_buddy]\n    command = \"/ABSOLUTE/PATH/TO/buddy-codex\"\n    args = [\"mcp\"]\n\n\nReplace `\"/ABSOLUTE/PATH/TO/buddy-codex\"` with the result of:\n\n\n    which buddy-codex\n\n\nExample:\n\n\n    [mcp_servers.codex_buddy]\n    command = \"/opt/homebrew/bin/buddy-codex\"\n    args = [\"mcp\"]\n\n\n## **Configure The Codex Skill**\n\nCreate this directory:\n\n\n    mkdir -p ~/.codex/skills/buddy/agents\n\n\nCreate `~/.codex/skills/buddy/SKILL.md` with this content:\n\n\n    ---\n    name: \"buddy\"\n    description: \"Use when the user wants to interact with the local Codex Buddy pet, including direct inputs such as /buddy, /buddy pet, or /buddy <message>. This skill shows the buddy profile or stats, pets the buddy, or sends a short message to the buddy by routing the request to the local Codex Buddy MCP tools instead of replying as the buddy yourself.\"\n    ---\n\n    # Buddy\n\n    Use this skill when the user wants to interact with the local terminal pet.\n\n    ## Tools\n\n    - `mcp__codex_buddy__buddy_profile`\n      Use when the user wants to open the buddy profile card, see the buddy, inspect rarity, stats, species, bio, or other buddy attributes.\n    - `mcp__codex_buddy__buddy_pet`\n      Use when the user wants to pet the buddy, poke it, comfort it, or trigger the pet animation.\n    - `mcp__codex_buddy__buddy_say`\n      Use when the user wants to say something to the buddy. Pass the exact user-facing text as `text`.\n\n    ## Routing\n\n    - Requests like “show buddy”, “open buddy”, “看看宠物”, “show its stats”, “what rarity is my pet”, or “/buddy” map to `buddy_profile`.\n    - Requests like “pet the buddy”, “摸摸小宠物”, or “/buddy pet” map to `buddy_pet`.\n    - Requests like “tell the buddy hello”, “和小宠物说你好”, “say hi to Norikin”, or “/buddy 你好呀” map to `buddy_say`.\n\n    ## Response Rules\n\n    - Never pretend to be the buddy yourself.\n    - Never invent the buddy's speech.\n    - Do not paraphrase tool output unless the user explicitly asked for the buddy's profile details.\n    - If the tool returns `Your buddy seems to be asleep.`, reply with exactly that sentence.\n    - After `buddy_pet`, reply with exactly: `Something stirred on the buddy side.`\n    - After `buddy_say`, reply with exactly: `Something stirred on the buddy side.`\n    - After `buddy_profile`:\n      - If the user only wanted to open or show the buddy, reply with exactly: `Your buddy perked up and showed its profile.`\n      - If the user explicitly asked for stats, rarity, species, bio, or other attributes, use the returned profile block to answer accurately and concisely.\n\n    ## Notes\n\n    - This skill assumes the local `buddy-codex` terminal window is already running.\n    - If the buddy daemon is not running, the MCP tool will report that it is asleep.\n\n\nOptionally create `~/.codex/skills/buddy/agents/openai.yaml`:\n\n\n    interface:\n      display_name: \"Buddy Skill\"\n      short_description: \"Handle /buddy, /buddy pet, and buddy chat from Codex\"\n      default_prompt: \"Use /buddy to open the profile, /buddy pet to pet the buddy, or /buddy <message> to send a short message through the local Codex Buddy MCP tools.\"\n\n\n## **Restart Codex Desktop**\n\nAfter editing `~/.codex/config.toml` and adding the skill files, fully quit and reopen Codex Desktop.\n\n## **Usage In Codex**\n\nOnce the pet window is running and Codex Desktop has been restarted, you can use the skill from Codex like this:\n\n\n    use the `buddy` skill to send: buddy\n    use the `buddy` skill to send: pet\n    use the `buddy` skill to send: hello there\n\n\nWhat each one does:\n\n  * `buddy`: opens the profile card in the pet window\n\n  * `pet`: triggers the pet animation\n\n  * any other text: sends that exact text to the pet\n\n\n\n\n## **What Gets Stored**\n\nLocal files:\n\n  * `~/.codex-buddy/config.json`\nStores soul, growth, friends, and publish state.\n\n  * `~/.codex-buddy/LLMConfig.json`\nStores LLM settings.\n\n\n\n\nCodex data read by the app:\n\n  * `~/.codex/auth.json`\n\n  * `~/.codex/state_5.sqlite`\n\n  * `~/.codex/history.jsonl`\n\n  * `~/.codex/sessions/**/rollout-*.jsonl`\n\n\n\n\nCloud directory:\n\n  * friend discovery and remote friend calendar lookup are wired to the built-in Cloudflare Worker directory URL\n\n  * users do not need to configure the Cloudflare endpoint manually\n\n\n",
  "title": "codeX’s Buddy :this can help you have a buddy when using codex"
}