Credentials. The provider key must be stored as a CI secret or environment variable, not written into the repository or the job script.
Who it is forA platform engineer who wants a scheduled job or CI step to make dependency or cleanup changes with no one watching the chat.
The problemRoutine maintenance work such as dependency bumps gets postponed because it needs someone at a terminal.
The outcomeOne JSON object and an exit code per run, so the job can pass or fail on its own.
What you need first
- 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
Steps
- Install CodeAF 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 --jsonfrom 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.
Prompt for your agent
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.
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Agent-Field/CodeAF and "Run a batch of coding tasks headless in CI or cron"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer