From e6406500f30612e8bb4f074ac5a1d8bd79dde5d5 Mon Sep 17 00:00:00 2001 From: Pnant <73925474+Panniantong@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:32:40 +0800 Subject: [PATCH] docs(wechat): use agent-reach interpreter for miku_ai search example (#188) miku_ai is installed inside the agent-reach Python environment (pipx venv or user venv). Using bare 'python3' fails when agent-reach was installed via pipx, because system python3 cannot import miku_ai. Fix: detect the correct interpreter at runtime via: $(python3 -c "import agent_reach, sys; print(sys.executable)") This resolves the interpreter transparently for pipx, venv, and plain pip installs without hardcoding paths. Closes #187 Co-authored-by: Panniantong --- agent_reach/skill/SKILL.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/agent_reach/skill/SKILL.md b/agent_reach/skill/SKILL.md index 3a4d636..ffca794 100644 --- a/agent_reach/skill/SKILL.md +++ b/agent_reach/skill/SKILL.md @@ -108,13 +108,16 @@ mcporter call 'douyin.get_douyin_download_link(share_link: "https://v.douyin.com ## 微信公众号 / WeChat Articles **Search** (miku_ai): -```python -python3 -c " +```bash +# miku_ai is installed inside the agent-reach Python environment. +# Use the same interpreter that runs agent-reach (handles pipx / venv installs): +AGENT_REACH_PYTHON=$(python3 -c "import agent_reach, sys; print(sys.executable)" 2>/dev/null || echo python3) +$AGENT_REACH_PYTHON -c " import asyncio from miku_ai import get_wexin_article async def s(): - for a in await get_wexin_article('query', 5): - print(f'{a[\"title\"]} | {a[\"url\"]}') + for a in await get_wexin_article(\'query\', 5): + print(f\'{a[\"title\"]} | {a[\"url\"]}\') asyncio.run(s()) " ```