DEV Community

Erik anderson
Erik anderson

Posted on • Originally published at inkengine.ai

I Wrote a 56,000-Word Book in 2 Days With AI — Then Turned the Pipeline Into a Product

I wrote a book. A real one. 55,863 words across 13 chapters plus a preface and epilogue. It's called The Autonomous Engineer and it's on Amazon.

It doesn't sound like AI wrote it. That was the whole point.

I built a pipeline to make that happen. Then I cleaned it up, packaged it, and shipped it as an open-source CLI called InkEngine. This is the story of why, how, and what you can do with it.

The Problem: AI Books Are Garbage

You've read one. Maybe you bought one on Kindle for $2.99. You got two paragraphs in and your brain flagged it immediately. The em-dashes everywhere. "It's important to note." "Let's delve into." "In the realm of." "This multifaceted approach empowers you to navigate the complex landscape of..."

You closed it. So did everyone else.

The problem isn't that AI can't write. The problem is that most people use AI wrong. They say "write me a chapter about X" and paste whatever comes back. The output is technically correct. It's also soulless, generic, and reads like a corporate whitepaper wearing a trench coat pretending to be a book.

I wanted to write a real book. One with my stories, my opinions, my voice. But I also wanted to move fast. I'm a developer, not a full-time author. I needed AI as a tool, not as the author.

So I built the tool I wanted.

What I Built

InkEngine is an opinionated CLI for writing books with AI assistance. "Opinionated" means it has strong defaults about what makes writing good, and it will fight you (politely) if you try to ship something that sounds like ChatGPT.

Here's the core loop:

  1. Interview mode -- AI asks YOU questions, then drafts from your answers
  2. Voice matching -- it learns your writing style from samples and enforces it
  3. 5-reviewer panel -- dev editor, line editor, proofreader, fact checker, target reader
  4. AI pattern detection -- 20+ regex patterns that catch AI tells before you publish
  5. Definition of Done -- quality gates that say NO until the chapter actually passes

The whole thing runs in your terminal. Python, Typer, Rich for the pretty output.

Show Me the Code

# Start a new book project
$ inkengine init "my-killer-book"

Created project: /home/user/my-killer-book

  Project structure:
    inkengine.yaml
    config/
    chapters/
    drafts/
    reviews/
    exports/

Next steps:
  cd my-killer-book
  inkengine setup          # customize your author profile
  inkengine build ch01     # build your first chapter
Enter fullscreen mode Exit fullscreen mode

The setup wizard profiles your voice. Paste in some of your existing writing (blog posts, tweets, whatever) and it extracts a fingerprint: sentence length, tone, vocabulary level, favorite phrases, things you never say.

$ inkengine setup

InkEngine Setup Wizard

Answer these questions to build your author profile.

Author name: Erik Anderson
Book title: The Autonomous Engineer
Book type: non-fiction
Target reader: Engineers who want to automate themselves out of repetitive work

Voice Learning
How would you like me to learn your voice?
  [1] Paste writing samples
  [2] Paste tweets
  [3] Upload a text file
  [4] Skip

Choice: 1

# paste your writing, type DONE

Found 14 writing samples. Analyzing voice...

┌─ Extracted Voice Profile ────────────────────────┐
│ Perspective: first                                │
│ Tone: direct, confident, irreverent, practical    │
│ Vocabulary: technical                             │
│ Contractions: Yes                                 │
│ Paragraph style: short                            │
│ Avg sentence length: 12 words                     │
│ Punctuation: Heavy periods, rare semicolons       │
│ Personality: Builder who ships fast and explains   │
│   things by showing what he made.                 │
│ Avoids: moreover, furthermore, in conclusion      │
└──────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

That profile drives every draft. The AI doesn't write in "AI voice." It writes in your voice.

Then you build chapters:

$ inkengine build ch01

CHAPTER BUILDER: ch01-why-automate
  Words: 1,247 / 3,500 (need 2,253 more)
  Visuals: 1 table, 0 code blocks

# Interview starts -- AI asks you questions about YOUR experience
# You answer with real stories, real numbers, real opinions
# Draft generates from YOUR answers, not from thin air

  Draft: 4,128 words

DEFINITION OF DONE:
  [x] Minimum 3,500 words (4,128)
  [x] Zero high-severity AI patterns (0)
  [x] Reader score >= 7.0 (8.1/10)
  [x] At least 1 table or code block (2)

  CHAPTER DONE! Move to the next one.
Enter fullscreen mode Exit fullscreen mode

The Interview Mode (This Is the Key)

Most AI writing tools work like this: you give AI a topic, it generates text. The text is correct but generic. It could have been written by anyone about anything.

InkEngine flips this. Instead of "write about X," the AI interviews you:

  • "Tell me about a time you automated something and it actually backfired."
  • "What's a specific dollar amount or time savings you can cite?"
  • "You mentioned Ansible. Walk me through what the playbook actually does, step by step."
  • "What would you tell someone who says automation eliminates jobs?"

You answer in your own words. Messy, unpolished, real. Then the AI takes YOUR stories, YOUR examples, YOUR opinions, and drafts prose from that raw material.

This solves two problems at once. First, the content is genuinely yours. The AI is a ghostwriter working from your notes, not an author making things up. Second, it can't hallucinate your personal experiences. It's working from transcripts of what you actually said.

The output sounds human because the source material is human.

The Review Panel

Every chapter gets reviewed by five AI personas before it ships. Each one catches different problems.

Here's what a review cycle looks like:

============================================================
  REVIEW PANEL: ch05-infrastructure-as-code
  Words: 4,312
============================================================

  AI PATTERN SCAN
  Found 3 AI pattern matches:

    [!!!] Em-dash (replace with comma, period, or rewrite) (2x)
         L47: ...the server configuration — which had been...
         L183: ...monitoring stack — Prometheus, Grafana...

    [ ! ] 'Utilize' (just say 'use') (1x)
         L92: ...utilize the existing playbook to...

  REVIEWER FEEDBACK (5 reviewers)

  --------------------------------------------------
  Developmental Editor
  --------------------------------------------------
  VERDICT: Strong chapter with a clear build-up, but the
  ending fizzles. The reader is pumped about IaC and then
  you just... stop.
  STRENGTHS:
  - The "3 AM server fire" opening is great
  - Ansible walkthrough is concrete and useful
  PROBLEMS:
  - No transition to the next chapter
  - The cost comparison table needs actual numbers

  --------------------------------------------------
  Target Reader
  --------------------------------------------------
  SCORE: 8

  The Ansible section sold me. I could actually follow along
  and try this myself. The opening story about the 3 AM
  production fire hooked me immediately.

  Reader Score: ########.. 8.1/10
Enter fullscreen mode Exit fullscreen mode

The five reviewers are: a developmental editor (structure and arc), a line editor (sentence-level quality and AI tells), a proofreader (spelling, grammar, consistency), a fact checker (claims, numbers, technical accuracy), and a target reader (would they actually keep reading?).

Each persona has a custom system prompt. You can edit them in config/reviewers.yaml to match your genre and audience.

The AI Pattern Detector

This is the last line of defense. A library of 20+ regex patterns that scan every chapter for AI writing tells. Some of the patterns:

Pattern Severity Why It Matters
Em-dashes High The #1 AI tell. Real writers use them occasionally. AI uses them constantly.
"delve" / "delving" High Humans almost never say "delve." ChatGPT can't stop.
"it's important to note" High AI filler. If it's important, just say the thing.
"in the realm of" Medium Nobody talks like this in real life.
"moreover" / "furthermore" Medium Academic connectors that sound robotic in a book.
"utilize" Medium Just say "use."
"navigate" (abstract) Medium "Navigate the complex landscape" is peak AI.
"tapestry" / "multifaceted" Medium AI-favorite adjectives that add nothing.
"empower" / "foster" Medium Corporate AI filler verbs.
Sentence-initial "This approach ensures..." Medium AI loves to start summary sentences this way.

The scanner runs automatically during inkengine build and inkengine review. High-severity patterns block the Definition of Done. Your chapter won't pass until they're gone.

Before:

It's important to note that this multifaceted approach empowers engineers to navigate the complex landscape of infrastructure automation, ultimately fostering a more robust and seamless deployment pipeline.

After:

This cuts deployment time from 45 minutes to 3. Your servers match. Every time.

Same idea. One reads like AI wrote it. The other reads like a person who actually ships code.

The Results

I used the prototype of this pipeline to write The Autonomous Engineer:

  • 55,863 words across 13 chapters plus preface and epilogue
  • 7.8/10 average reader score from the review panel
  • Zero high-severity AI patterns in the final manuscript
  • Written in roughly 2 days of active work (interviews, review cycles, edits)
  • The book is on Amazon

The voice profile caught drift early. The review panel caught structural problems I would have missed. The pattern detector caught every "delve" and em-dash before a reader could.

Could I have written it without AI? Sure. It would have taken months. Could I have written it with raw ChatGPT? Sure. It would have been unreadable.

InkEngine sits in the middle. You bring the knowledge and the voice. It brings the speed and the quality control.

Try It

pip install inkengine
Enter fullscreen mode Exit fullscreen mode

InkEngine is BYOK (bring your own key). You provide your own Claude API key. The tool costs $99 per book project, which unlocks the full pipeline: interview mode, all five reviewers, the pattern detector, voice profiling, and the build system.

It's Python 3.10+, runs anywhere, and the CLI is built with Typer so the help docs are actually useful:

$ inkengine --help

Usage: inkengine [OPTIONS] COMMAND [ARGS]...

  InkEngine -- AI-powered book writing toolkit.

Commands:
  init    Create a new book project with default configs
  setup   Interactive wizard to customize your author profile
  build   Run the full chapter build pipeline
  review  Run the review panel on a chapter
  ideas   Generate expansion ideas from expert agents
  write   Draft content from an idea in your voice
  status  Show book progress dashboard
Enter fullscreen mode Exit fullscreen mode

Source: inkengine.ai

What's Next

Right now InkEngine is a CLI. That's intentional. I wanted the pipeline to be solid before adding a UI.

Here's the roadmap:

  • Web UI after 50 paying CLI users. If the core works, the interface is just packaging.
  • Voice profiler v2 that learns from your existing blog posts, tweets, or published work automatically.
  • Export pipeline for KDP, ePub, and print-ready PDF.
  • Chapter dependency graphs so InkEngine knows when Chapter 7 references something from Chapter 3 and keeps them consistent.

If you write (or want to write) non-fiction and you're tired of AI output that sounds like AI output, give it a shot. The whole point is that the book should sound like you, not like a language model.

Questions, bugs, or feature requests: open an issue or find me on Bluesky.


InkEngine is MIT licensed. Built with Python, Claude API, Typer, and Rich. The $99 project fee covers the commercial license. Your API costs are your own (typically $5-15 per chapter with Claude Sonnet).

Top comments (0)