Leanpub Header

Skip to main content

Retired

This book is no longer available for sale.

Codex CLI

Agentic Engineering from First Principles

Codex CLI
This book is 100% completeLast updated on 2026-06-21

The definitive guide to agentic software engineering with Codex CLI, from prompting and AGENTS.md fundamentals to multi-agent orchestration, CI/CD integration, security hardening, and enterprise deployment across 28 hands-on chapters.

PDF
EPUB
WEB
APP
About

About

About the Book

Codex CLI: Agentic Engineering from First Principles is the most comprehensive guide to agentic software engineering with OpenAI's command-line coding agent. Across 28 chapters in six parts, you'll move from first principles to production workflows and team-scale practice: prompting and AGENTS.md configuration, approval modes and kernel-level sandboxing, model selection, context and cost management, MCP servers, hooks, skills, sub-agents and orchestration, worktrees, CI/CD integration, security hardening, and enterprise deployment. Later chapters cover debugging and testing agentic workflows, AI code review, practical engineering guides (codebase migration, backend, frontend, and infrastructure as code), and the bigger picture: benchmarks, competing tools, harness engineering, and how to structure an agentic engineering team.

Whether you're a solo developer looking to multiply your output or an engineering lead rolling out agentic workflows across a team, this book gives you the mental models and practical techniques to work effectively with AI coding agents.

Written by Daniel Vaughan and drawing on real-world experience and community insights, it equips every chapter with learning objectives, worked examples, and hands-on exercises.

Author

About the Author

Daniel Vaughan

Daniel Vaughan is a technology leader and software architect based in the United Kingdom, specialising in agentic AI. He has spent approaching thirty years across enterprise, startup, and academic settings, with a career-long focus on engineering quality and developer productivity. His work now centres on the shift where AI stops being an experiment and becomes core to how organisations build software.

Daniel is Head of Forward Deployed Engineering at HCLTech AI Labs, where he leads a global practice embedding engineers and coding agents inside complex enterprise environments to take production AI from prototype to live systems. He built the practice from the ground up, running lean regional pods in which a shared architect, a small number of engineers, and a team of agents working through tools such as Codex, Claude Code, Cursor, and GitHub Copilot deliver at the output of a much larger team.

Before HCLTech AI Labs, Daniel was director of software engineering at Mastercard in London, leading cloud strategy and architecture for real-time payment products in a highly regulated financial services environment. Earlier, he spent eight years at the European Bioinformatics Institute in Cambridge, moving from software engineer into engineering leadership, working on the same problems of software quality and developer productivity that he now solves with agentic tooling.

He is the author of Cloud Native Development with Google Cloud (O'Reilly, 2024) and Ext GWT 2.0: Beginner's Guide (Packt, 2010), a Google Developer Expert, and a Green Software Champion. He writes about agentic engineering and AI-assisted development at blog.danielvaughan.com.

The Leanpub Podcast

Launch

Launch Video

Podcast

Podcast Episode

Subscribe on YouTube

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub