{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "agent-field-codeaf--headless-batch-tasks-in-ci",
 "repo": "Agent-Field/CodeAF",
 "repo_url": "https://github.com/Agent-Field/CodeAF",
 "repo_slug": "agent-field-codeaf",
 "title": "Run a batch of coding tasks headless in CI or cron",
 "page_title": "How to run a batch of coding tasks headless in CI or cron with Code AF",
 "summary": "Use codeaf do with a timeout and JSON output to run unattended work from scripts.",
 "who": "A platform engineer who wants a scheduled job or CI step to make dependency or cleanup changes with no one watching the chat.",
 "problem": "Routine maintenance work such as dependency bumps gets postponed because it needs someone at a terminal.",
 "outcome": "One JSON object and an exit code per run, so the job can pass or fail on its own.",
 "steps": [
  "Install Code AF with `curl -fsSL https://agentfield.ai/get/codeaf | bash`.",
  "Set your provider key in the environment of the CI job or cron host.",
  "Run `codeaf do \"<your brief>\" --timeout 30m --json` from the repository directory. (inferred, check the README)",
  "Read the JSON output and the exit code in the job log.",
  "Read the headless contract in docs/HEADLESS.md before relying on it in production."
 ],
 "agent_prompt": "Use the CodeAF repo at Agent-Field/CodeAF. In a CI job for <repo-path>, run `codeaf do \"<brief>\" --timeout 30m --json`. Expected output: one JSON object and an exit code. Verify the JSON result and exit code match the work that landed on the branch, and that the job fails when the exit code is nonzero.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "60 minutes",
 "basis": "readme",
 "caveat": "The README says codeaf do records an assumption when the conversation would ask a question, so unattended runs may proceed on guesses you should check.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "go",
 "requirements": [
  "macOS or Linux machine with a terminal",
  "A provider key (OpenRouter, DeepSeek, GLM, Kimi, MiniMax, Qwen), a ChatGPT plan through Codex, or a running Ollama install",
  "A git repository for the project you want to work on",
  "Install CodeAF with the curl script, or build it from source with make build"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The provider key must be stored as a CI secret or environment variable, not written into the repository or the job script."
  }
 ],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/agent-field-codeaf/headless-batch-tasks-in-ci/",
 "md": "https://dedupedai.com/use-cases/agent-field-codeaf/headless-batch-tasks-in-ci/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/agent-field-codeaf--headless-batch-tasks-in-ci.json",
 "api_version": "v1"
}
