codex-cli-runner

Run OpenAI Codex CLI tasks non-interactively and parse JSON outputs.

4|1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/rongarede/skill-snapshots --skill codex-cli-runner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-cli-runner
Source: https://github.com/rongarede/skill-snapshots/tree/main/uncategorized/codex-cli-runner
Command: npx skills add https://github.com/rongarede/skill-snapshots --skill codex-cli-runner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires codex-cli, jq, and includes scripts (resource) components.

What problem does it solve?

This Skill provides a wrapper to run OpenAI Codex CLI tasks in non-interactive mode and capture structured JSON results, enabling automation and easy integration into pipelines.

Core Features & Use Cases

  • Non-interactive Codex tasks: Run codex exec tasks without manual prompts and surface results in JSON.
  • JSON parsing-ready output: Directly use the JSON payload for downstream processing, logging, or dashboards.
  • Use Case: Integrate into CI pipelines to run code generation tasks and verify outputs programmatically.

Quick Start

Use the codex-cli-runner to execute a task and obtain full JSON output:

  • Run a task and print full JSON: bash ~/.claude/skills/codex-cli-runner/scripts/run.sh "Describe task"
  • Extract the final message: bash ~/.claude/skills/codex-cli-runner/scripts/run.sh "Describe task" --extract message
  • Extract the exit code: bash ~/.claude/skills/codex-cli-runner/scripts/run.sh "Describe task" --extract exit_code Direct Codex usage (no wrapper):
  • codex exec --yolo "Describe task"
  • codex exec --yolo --json "Describe task"

Frequently Asked Questions about codex-cli-runner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Codex CLI tasks in non-interactive mode for automation?

You can run Codex CLI tasks in non-interactive mode by using a shell wrapper script to execute tasks automatically without manual prompts. This approach captures the task output as structured JSON, making it suitable for CI pipelines and batch automation workflows.

How do I parse JSON output from Codex CLI for downstream processing?

To parse JSON output from Codex CLI, you can use the jq dependency to extract specific fields like the final message or exit code. The wrapper script provides an --extract flag to isolate these values, enabling direct integration into logging or dashboards.

Do I need jq installed to automate Codex CLI tasks with JSON output?

Yes, you need jq installed to automate Codex CLI tasks with JSON output. The Skill requires both the codex CLI for executing code generation tasks and jq for parsing the structured JSON payloads required for downstream programmatic processing.

Can I use Codex CLI in CI pipelines to verify code generation outputs programmatically?

Yes, you can use Codex CLI in CI pipelines to verify code generation outputs programmatically. By running the wrapper script in non-interactive mode, the pipeline captures structured JSON results and checks the exit code or message content automatically.

What's the best way to extract the final message from a Codex CLI execution?

The best way to extract the final message from Codex CLI execution is using the wrapper script's built-in extraction flag. By passing the --extract message argument, the script isolates and returns only the final message payload from the full JSON output.