This skill is intentionally focused on Codex + Feishu/Lark, with an optional Rokid Lingzhu trigger endpoint.
- Open Feishu Open Platform.
- Click Create Custom App.
- Open Credentials & Basic Info.
- Copy:
App IDApp Secret
These map to:
CODEX_FEISHU_APP_IDCODEX_FEISHU_APP_SECRET
For Lark international, set CODEX_FEISHU_DOMAIN=https://open.larksuite.com.
For mainland Feishu, use https://open.feishu.cn or leave it unset.
Write this to ~/.codex-feishu/config.env:
CODEX_FEISHU_DEFAULT_WORKDIR=/path/to/your/project
CODEX_FEISHU_DEFAULT_MODE=code
CODEX_FEISHU_APP_ID=cli_xxxxx
CODEX_FEISHU_APP_SECRET=your-secret
# CODEX_FEISHU_DOMAIN=https://open.feishu.cn
# CODEX_FEISHU_ALLOWED_USERS=ou_xxxxxOptional Rokid Lingzhu custom-agent endpoint:
CODEX_FEISHU_ROKID_ENABLED=true
CODEX_FEISHU_ROKID_HOST=127.0.0.1
CODEX_FEISHU_ROKID_PORT=8787
CODEX_FEISHU_ROKID_PATH=/rokid/agent
CODEX_FEISHU_ROKID_SECRET=replace-with-a-long-random-token
CODEX_FEISHU_ROKID_AUTO_ALLOW_PERMISSIONS=trueExpose that endpoint through HTTPS when configuring Lingzhu. Details: rokid-lingzhu.md.
Open Permissions & Scopes and add these tenant scopes. You can copy this block directly:
{
"scopes": {
"tenant": [
"cardkit:card:read",
"cardkit:card:write",
"im:chat:read",
"im:chat:readonly",
"im:message.group_at_msg:readonly",
"im:message.p2p_msg:readonly",
"im:message.reactions:read",
"im:message.reactions:write_only",
"im:message:readonly",
"im:message:send_as_bot",
"im:message:update",
"im:resource"
],
"user": []
}
}- Open Add Features.
- Enable Bot.
- Set a bot name and description.
- Open Version Management & Release.
- Create a version.
- Submit it for review and finish approval.
Run:
macOS / POSIX:
bash /path/to/codex-feishu/scripts/daemon.sh startWindows:
powershell -NoProfile -ExecutionPolicy Bypass -File C:\path\to\codex-feishu\scripts\daemon.ps1 startOr from Codex:
/codex-feishu start
Do this only after the bridge is running.
- Open Events & Callbacks.
- Set Event Dispatch Method to Long Connection.
- Add event
im.message.receive_v1. - Add callback
card.action.trigger. - Save.
After adding events and callbacks, publish again:
- Open Version Management & Release.
- Create a new version.
- Submit and finish approval.
- Missing
im:message.p2p_msg:readonly: private chat messages will not arrive. - Missing
card.action.trigger: permission buttons and thread picker actions will not work. - Only one publish completed: the bot often looks half-configured.
- Bridge not running during callback setup: long connection save may fail.
- Two bridges running with the same Feishu app: they will compete for the same connection.