Slack "butler" that bridges Slack threads to Codex CLI via the Codex TypeScript SDK.
Each user creates their own Slack app and gets their own tokens. Use the manifest link below to open Slack's app creation flow:
- Click the button above, create the app in your workspace, then install it. Copy:
- App-level token (
xapp-...) - Bot token (
xoxb-...)
- App-level token (
- Install prerequisites:
- Docker
- Node.js LTS (pinned via mise)
mise install
- Run Alfred locally:
npx @tiberriver256/codex-alfred --appKey <app-key> --botKey <bot-key> --data-dir ./data
- In Slack, mention
@Alfredin a channel or DM to get started.
See spec.md for the product/technical spec.
Use the npm script to restart Alfred with the same command we’ve been using. It prints the new PID.
ALFRED_PID=<old-pid> npm run alfred:restart
Notes:
- Uses
ALFRED_DATA_DIRif set; otherwise defaults to~/mom-data. - Writes logs to
$ALFRED_DATA_DIR/alfred.log. - If you don’t pass
ALFRED_PID, it just starts a new process.
You can supply tokens via CLI flags or environment variables:
--appKeyorSLACK_APP_TOKEN--botKeyorSLACK_BOT_TOKEN--data-dirorALFRED_DATA_DIR--workdirorALFRED_WORKDIR--sandboxorALFRED_SANDBOX(hostordocker:<name>)--log-levelorALFRED_LOG_LEVEL
Pass additional Codex CLI args after --:
codex-alfred --appKey ... --botKey ... -- --yolo
node --test --import=tsx
Use the helper script to create and manage the sandbox container:
./docker.sh create ./data
./docker.sh start
When running with --sandbox docker:<name>, Alfred adds --yolo to Codex args by default (unless you pass it explicitly).
To restart Alfred using the Docker sandbox in one step:
./alfred-docker.sh
Notes:
- Builds the repo and syncs
dist/,schemas/, andconversations-in-blockkit.mdinto the data dir. - Runs Alfred inside the Docker container and writes logs to
/workspace/alfred.log. - Installs production deps inside the container if
/workspace/node_modulesis missing. - Kills any host
codex-alfredprocesses by default (setALFRED_STOP_HOST=0to skip). - Copies your Codex auth file to
/workspace/.codex/auth.jsonand setsCODEX_HOMEin the container.