DEV Community

German Yamil
German Yamil

Posted on

I Automated My Way to a Technical Ebook in 4 Hours — Here's the Exact Cost Breakdown

I Automated My Way to a Technical Ebook in 4 Hours — Here's the Exact Cost Breakdown


🎁 Free resource: AI Publishing Checklist — 7 steps to ship a technical ebook with Python (free, no email required) · Full pipeline + 10 scripts: germy5.gumroad.com/l/xhxkzz (pay what you want, min $9.99)

Most "passive income" breakdowns hide the real costs.

So here's mine — completely transparent: every dollar, every hour, every tool.


The pipeline behind this: Everything described here runs on a system available at germy5.gumroad.com/l/xhxkzz ($12.99 launch price, includes all 10 Python scripts and the complete automation stack).


The Stack (with real prices)

Tool Purpose Cost
Claude Code Pro LLM API + pipeline orchestration $20/month
Gumroad Sales + delivery Free (10% per sale)
Amazon KDP EPUB distribution Free (30–70% royalty)
Canva Cover design Free
Google NotebookLM Research + outline Free
Pandoc EPUB assembly Free
GitHub Version control Free
epubcheck EPUB validation Free

Total monthly infrastructure: $20.

Claude Code Pro is the only paid tool. Everything else is free.

The Time Breakdown (per book)

Here's where one working day goes:

Hour 1: Setup (~60 min active)

  • Write outline.json — 10 chapters, each with title, slug, target word count, and Python script deliverable
  • Configure the pipeline: API key, output directory, model parameters
  • Validate the manifest and run a test chapter to check the pipeline is working

Hours 2–3: Generation + Fixing (~90 min active, rest automated)

The pipeline runs mostly unattended. You monitor for NEEDS_REVIEW states.

In my experience: 2–3 chapters out of 10 fail on first pass. Common reasons:

  • Import that doesn't exist in the clean execution environment
  • Script that times out (infinite loop in generated code)
  • Code fence count mismatch in translation

Each fix cycle: read the error log, adjust the prompt for that chapter, re-run. Usually 10–15 minutes per failure.

Hour 4: Translation QA (~45 min active)

Spanish generation runs automatically. I spot-check 2–3 chapters for:

  • Variable names that slipped into Spanish
  • Technical terms that were over-translated
  • Code fence count alignment between EN and ES versions

Hours 5–6: Assembly + Publishing (~90 min active)

pandoc combined_en.md -o book_en.epub --metadata-file=metadata.yaml --epub-cover-image=cover.png --toc
epubcheck book_en.epub
Enter fullscreen mode Exit fullscreen mode

Same for Spanish. Then:

  • Gumroad: API creates listing, manual upload for EPUB files
  • KDP: Upload, metadata, pricing, submit for review (KDP takes 24–72 hours)

Total active time: 4–6 hours. The pipeline runs the rest.

The Economics

Break-even

Monthly cost: $20 (Claude Code Pro)
Price per copy: $12.99
Break-even: ceil($20 / $12.99) = 2 sales
Enter fullscreen mode Exit fullscreen mode

After 2 sales: every copy is pure margin.

Per-book scenario

Sales/month Gross Infrastructure Net
2 $25.98 $20 $5.98
5 $64.95 $20 $44.95
10 $129.90 $20 $109.90
20 $259.80 $20 $239.80

Note: Gumroad takes 10% ($1.30/sale), so actual per-sale net is ~$11.69.

The catalog math

The infrastructure cost is flat — it doesn't increase per book.

Book #1: $20/month infrastructure.
Book #5: still $20/month infrastructure.
Book #20: still $20/month infrastructure.

At 5 books averaging 5 sales each:

  • 25 sales × $11.69 = $292.25/month
  • Minus $20 = $272.25 net
  • Infrastructure stays at $20

At 20 books averaging 5 sales each:

  • 100 sales × $11.69 = $1,169/month
  • Minus $20 = $1,149 net

This is why I'm building a catalog, not a single book.

What "4-6 hours" actually means

It doesn't mean sitting at your computer for 4–6 hours straight.

It means:

  • ~2 hours of focused setup and monitoring at the start
  • ~1 hour of review and fixing NEEDS_REVIEW chapters (spread throughout the day)
  • ~1.5 hours of final assembly and uploading at the end

The pipeline runs for 3–5 hours in the background while you do other work.

What's not automated (yet)

Manual steps remaining:

  1. Uploading the EPUB file to Gumroad (REST API doesn't support binary upload)
  2. KDP cover upload (requires the KDP dashboard)
  3. Google Console redirect URI for YouTube (if you want YouTube OAuth)

Everything else runs from the command line.

The honest risk

Will you make sales?

Depends entirely on topic selection and distribution.

The pipeline guarantees:

  • ✅ Code that actually runs (AST + subprocess validation)
  • ✅ Bilingual output (EN + ES) in one run
  • ✅ EPUB assembly and validation
  • ✅ Gumroad listing creation

The pipeline does not guarantee:

  • ❌ Traffic to your Gumroad page
  • ❌ A topic with an existing audience
  • ❌ Sales

Those are editorial and marketing decisions. The technology is a solved problem.

Is it worth it?

For me: yes.

The alternative is writing manually, spending 40–80 hours on a book, and having no code validation guarantee. My pipeline produces a validated bilingual ebook in 4–6 hours. The marginal cost of books 2–20 is API calls + my time reviewing failures.

If you already know Python and want a reusable system to produce technical ebooks — the pipeline is at germy5.gumroad.com/l/xhxkzz ($12.99 launch price).

If you want to understand the architecture first, the complete technical breakdown is on Dev.to.


Further Reading

Top comments (0)