This is the main path: install once, restart Codex, then ask in natural language. You do not hand-write workflow files.
Install from npm:
npm install -g codex-flowGitHub fallback if npm is unavailable:
npm install -g github:Dmatut7/codex-flowVerify:
codex-flow doctorYou should see checks for the CLI, Node, fake backend, Codex CLI, and Codex skill status.
codex-flow install-codex
codex-flow doctorRestart Codex App or Codex CLI after installing the skill.
If codex-flow releases updated skills, users who already installed it should run:
npm install -g codex-flow@latest
codex-flow install-codex
codex-flow doctor
# restart Codex App or Codex CLInpm install -g updates the package. codex-flow install-codex is still required because Codex uses copied files under ~/.codex/skills.
Open the target repository in Codex and say one of these:
用动态工作流帮我排查这个 bug,拆成多个方向并行分析,最后合并成根因和下一步。
use a dynamic workflow to investigate this bug across the repo in parallel, then merge the findings into one root cause and next action
Codex should:
- generate
.codex-flow/generated/<task>.workflow.ts, - run
codex-flow run .codex-flow/generated/<task>.workflow.ts, - write
.codex-flow/journal/<task>.jsonl, - summarize the parallel branches and result.
Run the same command again:
codex-flow run .codex-flow/generated/<task>.workflow.tsCompleted nodes replay from the journal. Only unfinished or changed nodes call Codex again.
codex-flow trytry creates a starter workflow in the current project and forces the fake backend, so this works without Codex login or network.
Default backend: codex-sdk.
That uses your logged-in Codex / ChatGPT account. No OpenAI API key is needed for the default path.
Only the optional openai-responses backend needs OPENAI_API_KEY.
Use a direct trigger phrase:
请使用 dynamic-workflow skill,用 codex-flow 生成并运行一个动态工作流来处理这个任务。
Then check:
command -v codex-flow
codex-flow doctorIf the skill is missing, reinstall it:
codex-flow install-codexRestart Codex and try again.
Most failures are in the generated workflow, not the engine. Ask Codex to fix the generated file and rerun the same command.
Useful checks:
codex-flow doctor
codex-flow run .codex-flow/generated/<task>.workflow.ts --backend fake
codex-flow smoke --backend codex-sdkUse codex-flow for tasks that can be split:
- bug investigation across several files or hypotheses,
- PR review passes,
- issue triage batches,
- release smoke checks,
- large refactor planning.
Do not use it for a one-line answer or a tiny single edit. Ask Codex directly for those.