Introducing Nib
Lately I’ve been taking some time to focus on creative hobbies. Somewhere along the way they got shoved to the margins to make way for work and life. I want to correct that. One of my favorite creative hobbies is writing fiction. For the longest time I used Scrivener but it never became second nature. Don’t get me wrong, it’s an amazing product and works well for a lot of people. It just missed the mark for me.
So I wrote nib. I’ve used it to write a 90k word rough draft of a novel, fixing bugs and adding features as I’ve needed them. And now I’d like to share it.
Guiding Beliefs
Building nib has been an iterative process. Build a feature and try it out. Tweak it until it feels right. Rinse. Repeat. As nib has progressed I’ve had to think about the sources of friction when it comes to writing and my beliefs about art and creativity. I’ve used these four rules to guide me.
1. Writers should focus on writing.
I discovered the first one years ago during my first attempt at writing a story longer than fifty pages. Put simply, continuity is a PITA. In a long story subtle continuity breaks can slowly creep in. These are maddening to find and fix. For example, you describe your main character as having green eyes on page two. Later, on page sixty-five you write “their blue eyes glittered with fury.” Whoops!
Some writing tools, like Scrivener, can help with this but only if you remember to update the story metadata. Updating, however, is a manual process which is easy to forget in the heat of the moment. Once it’s out of sync with the story it stops being useful. This is one of the most frustrating issues I’ve had trying to write longer stories.
2. AI should augment, not replace, human creativity.
I think generative AI is pretty cool. I have a few Stable Diffusion tools installed on my home machine and enjoy making my dogs look like superheroes or creating new desktop backgrounds of strange alien vistas. It’s a tool for my creativity. I’ll be honest, my art skills are trash. The gap between what I can imagine and what I can actually draw is enormous. Like really big. You could easily fit several Grand Canyons in it with room to spare. I use tools like ComfyUI and Forge to create things that’d be impossible for me otherwise. In other words, the tools augment my imagination. They don’t replace it.
I think replacing human artists with AI is a mistake. Every piece of art is a statement from its creator. “This is my experience. This is what I believe.” LLMs don’t have beliefs. LLMs don’t have experiences. LLMs can be pseudo-inventive but only within a narrow focus controlled by their training. Art is made by humans for humans. The minute we automate it or delegate its creation to machines, we lose something irreplaceable as a species.
Nib isn’t an AI ghostwriter and never will be. It takes care of complicated and tedious tasks, which resisted automation in the past, allowing the author to focus on creating. Its goal is to help the writer create their best work.
3. Be editor agnostic.
Deep down I’m an engineer. I still like to code. I have strong opinions about certain tools like, for example, editors. I’ve never quite felt at home in Word or Scrivener. The UX really grates. I’m much more comfortable in Emacs or VS Code. Muscle memory built up over the years makes me insanely fast. I think this is true for many writers with technical backgrounds. Downshifting into a different editing environment slows you down so let’s not do that.
4. Version control compatibility is a must.
Nib was designed to be version control friendly from the start. Everything, and I mean everything, is plain text. Scenes are written in Markdown. Character profiles and manuscript configuration are YAML documents. The continuity database is kept in CSV format and queried using the excellent csvq library. Tools you’re used to using, like git or jj, just work. Diffs are actually meaningful again.
Opaque formats, like Word or PDF or epub, are generated from the text sources. Just like building software.
Using Nib
Enough philosophy. Let’s walk through what it actually looks like to use nib. I’ll use a small example project I keep around for testing: a modern retelling of The Three Little Pigs. You can download the project here.
Starting a Project
$ nib init three-little-pigs
This creates a project directory with everything you need to get started:
three-little-pigs/
├── book.yaml # manuscript metadata and scene ordering
├── STYLE.md # voice and prose style guide
├── TROPES.md # writing anti-patterns to avoid
├── scenes/ # your prose lives here
├── characters/ # character profiles
├── storydb/ # structured story data (continuity)
├── appendices/ # research, notes, reference material
├── assets/ # images or other media
└── pandoc-templates/ # manuscript formatting templates
Everything is plain text. Clone it, branch it, diff it, merge it. Your manuscript is source code now.
The Heart of It: book.yaml
The book.yaml file is where your manuscript takes shape. It defines what you’re writing and the order scenes appear:
---
title: three-little-pigs
author: "Kevin Smith"
---
book:
base_dir: "scenes"
chapters:
- scenes:
- brad-house
- scenes:
- terence-house
- scenes:
- susan-house
Each chapter lists its scenes by name. Those names map to Markdown files in the scenes/ directory. Want to reorder chapters? Move lines around. Want to split a chapter? Add a new entry. It’s YAML, not a proprietary format locked inside some application’s database.
Writing Scenes
Scenes are just Markdown files. Open them in whatever editor you like – VS Code, Emacs, vim, Sublime, iA Writer, whatever. Nib doesn’t care.
$ nib scene add 1 brad-house
This creates scenes/brad-house.md and wires it into chapter 1 in your book.yaml. Then you write. That’s it. No special syntax, no proprietary markup. Markdown.
You can also manage scenes without leaving the terminal:
$ nib scene edit 1.1 # open chapter 1, scene 1 in $EDITOR
$ nib scene move 1.1 2.1 # move a scene between chapters
$ nib scene list # see what you've got
That 1.1 notation is something nib uses everywhere. It’s called dotted notation: chapter.scene. So 3.2 means chapter three, scene two. Ranges work too: 1-5 means chapters one through five, 1.1-3.2 means from chapter one scene one through chapter three scene two. Once you internalize it, it’s fast.
Character Profiles
Characters are defined as YAML files in the characters/ directory. Here’s Susan, the eldest pig sibling:
---
name: "Susan"
age: "38"
location: "Piglet Pines"
occupation: "Bricklayer"
role: |
Eldest of the little pig siblings she's the
constant voice of reason in the family
background: |
Very serious and dour from years of getting
her younger brothers out of scrapes
goal: "Keep her family safe"
values:
- logic
- reason
- family
personality: |
Gruff on the outside, she's a soft teddy
bear on the inside
habits:
- Facepalms whenever she's annoyed
relationships:
brad: "older sister"
terence: "older sister"
kevin: "sworn enemy"
---
These profiles aren’t just notes for you to reference. They’re structured data that nib’s AI features use to check your work. More on that in a moment.
The Style Guide
Every project gets a STYLE.md file. This is where you define the voice and prose rules for your manuscript – POV, tense, dialogue conventions, pacing preferences. Here’s a snippet from the three-little-pigs project:
## Voice
First-person-close or tight third person, depending
on the POV character. Internal monologue rendered in
italics -- the narrative just slides into a character's
thoughts mid-paragraph.
## Dialogue
People talk the way people talk. Incomplete thoughts,
interruptions, dialect markers, profanity where it
belongs. Characters have distinct speech patterns that
reveal personality and power dynamics.
When nib’s AI features critique or copy-edit your work, they use this style guide as their reference. It’s your voice, codified. The AI adapts to you, not the other way around.
Building Your Manuscript
When you’re ready to see your work assembled:
$ nib manuscript build
This compiles all your scenes into a single manuscript in Markdown. Need a different format? Nib uses Pandoc under the hood:
$ nib manuscript build --format docx
$ nib manuscript build --format pdf
$ nib manuscript build --format epub
Other useful commands for keeping tabs on your work:
$ nib manuscript toc # table of contents
$ nib manuscript status # word counts and progress
$ nib manuscript search "wolf" # find text across scenes
Where It Gets Interesting: AI-Assisted Editing
This is the part that makes nib different. Remember the guiding beliefs? AI should augment, not replace. Here’s what that looks like in practice.
Continuity tracking is the feature that started this whole project. Nib can index your manuscript, extracting characters, locations, facts, and timeline events into a structured database:
$ nib continuity index 1-2
This reads your scenes and builds a local database of everything that happens in your story – who appears where, what they look like, what events occur and in what order. All stored as plain text CSV files you can inspect yourself. Once indexed, you can query your own story:
$ nib continuity ask "What color are Brad's eyes?"
$ nib continuity ask "Which scenes does Kevin appear in?"
And the real power – checking your manuscript for consistency:
$ nib continuity check 1-3
This compares your scenes against the indexed facts and flags contradictions. It’ll catch the green-eyes-on-page-two, blue-eyes-on-page-sixty-five problem I mentioned earlier.
Critique and copy-editing work at the scene or chapter level:
$ nib manuscript critique 2.1 # narrative feedback on a scene
$ nib manuscript proof 1 # copy-edit an entire chapter
Critique gives you structural feedback – pacing, dialogue effectiveness, character consistency. Proof handles the line-level stuff – grammar, punctuation, style guide adherence. Both respect your STYLE.md, so the AI isn’t imposing some generic standard on your prose. It’s checking your rules.
Voice checking verifies that a character sounds like themselves across the manuscript:
$ nib manuscript voice brad
Checking brad: sampling 3 of 3 scenes
Voice consistent across 3 scenes.
This compares Brad’s dialogue and POV sections against his character profile and flags anywhere he sounds off. Useful when you’re juggling multiple characters and want to make sure each one has a unique voice.
And my personal favorite, talking to characters:
$ nib profile talk susan 3.1
● Go ahead. Ask your questions. I've got about two rows of repointing left before I lose the light, so let's not dawdle.
❯ what's your impression of kevin? are you scared?
● Scared. Of *Kevin*.
Let me tell you something about Kevin. The man showed up at my house wearing a tank top that said "100% LUPINE" in what I'm fairly sure was crayon, with wristbands he'd added somewhere between destroying Terence's place and mine. Like accessorizing was part of his strategy.
He tried to blow my house down. Multiple times. My curtains moved. A leaf blew off the step. That was the extent of it.
Then he wrestled my house. He put a rear naked choke on my drainpipe. He tried to armbar my front step. I watched the whole thing from my window drinking coffee. It was -- I don't even know what it was. Sad? Embarrassing? Both?
Kevin is not scary. Kevin is a problem, but not the kind you lose sleep over. He's the kind you see coming because he posts his plans on social media with captions like "DANA WHITE CALL ME." That video he put up in April benchpressing a log? That's the reason my south wall has double-thick mortar joints right now. He basically gave me his playbook.
What bothers me isn't Kevin himself. It's that my brothers had years to reinforce their houses and neither one of them listened to me. Not once. Brad's living in straw he saw at a TED talk. Terence built his house out of sticks he has emotional relationships with. I've been telling them both for years that those structures wouldn't hold up, and they looked at me like I was being dramatic.
So no. I'm not scared of Kevin. I'm tired of being the only one in this family who takes a tape measure seriously.
This starts an interactive conversation with Susan, grounded in everything that’s happened up through chapter 3, scene 1. The character’s responses are driven by its profile, relationships, and the story.
Pluggable AI Backends
Nib doesn’t lock you into a single AI provider. It uses an agent protocol – a simple JSON-over-stdin/stdout interface – to delegate AI operations to backend executables. Nib 1.0 will ship with Claude Code support. The source code repo contains a partially working implementation using locally executing agents.
- nib-agent-claude – wraps Claude Code for its AI operations
- nib-agent-local – targets OpenAI-compatible servers like Ollama, LM Studio, or vLLM
Switching backends is a single git config change:
$ git config nib.agent.default local
Your manuscript, your hardware, your choice.
What’s Next
Nib is open source and available on GitHub. Full documentation lives at nib.poiesic.com. I’m still actively developing it – there’s always another feature to add or rough edge to smooth out. If you’re a writer who thinks in terminals, give it a try. I’d love to hear what you think.
Comments