Blue Pencil
Text

Blue Pencil

The Blue Pencil app is a proofreader that runs on your own model. Type or paste a draft into the top field and the checked version fills in below as you write: spelling, grammar, punctuation and capitalization corrected, the wording left alone.

What Blue Pencil is for

  • A proofread before your words go out. Write here, or paste what you wrote elsewhere. Every change is marked, so you see what the pencil did before you take it: Accept puts the checked text in place of yours, and Copy takes it somewhere else.
  • Your words stay yours. The pencil is told to change only what is wrong and to leave the rest as you wrote it.
  • Your own rules. A Custom prompt in the options tells the pencil how you write — "I prefer writing in lowercase" — and every check follows it.
  • Private on a local model. The check runs on the Ollama endpoint exe is pointed at, so with a local model nothing you write leaves this machine. A ChatGPT subscription is the other choice.
  • Several drafts at once. Each draft has a row down the left of the window and is kept as you type. The pencil goes on checking the ones you are not looking at.
  • The same pencil in the Hub. Once Blue Pencil works on this node, the Hub app's composer is proofread in place as you write a post.

An app, a script or a coding agent that talks to exe over HTTP gets one thing from it: the call Blue Pencil is built on, which asks the model one question and streams the answer. Ask the model from an app or a script, at the end of this chapter, describes it.

The window

Blue Pencil: a draft in the top field, and below it the checked text with five corrections marked in blue

Your drafts are listed down the left, with New under them. Beside the list, the top field is where you write, and the field under it shows the checked text. Clear, Copy and Accept are in a row below the two fields.

The status line at the foot says how the check stands: Checking…, then No changes or the number of changes. Its right end names the model and its thinking level. Click that name for the options.

Check a draft

  1. Type or paste into the top field.
  2. Pause. Once you have stopped typing for 0.7 seconds the pencil starts on what you changed. Command-Return or Control-Return in the field starts it at once.
  3. Watch the lower field fill in, a paragraph at a time. A paragraph the pencil has not reached yet stands in grey as you typed it, and the one it is on is written out as the model answers.
  4. Take the result. Accept puts the checked text into the top field, and Copy puts it on the clipboard.
ButtonWhat it does
ClearEmpties the top field to start over.
CopyCopies the checked text: the paragraphs checked so far as corrected, the rest as you typed them.
AcceptPuts that same text into the top field, in place of what you typed.

Clear and Accept go in as typing does, so Undo brings your text back. Copy and Accept stay grey until a paragraph has been checked.

Blank lines separate the paragraphs. A draft of more than 20,000 characters is not checked, and the status line says so.

Read the marks

  • Words on pale blue, with a blue rule under them, are what the pencil wrote. Hover over them to see what they replaced, or that they were added.
  • Words struck out in red are what the pencil removed, with nothing put in their place.
  • Everything else is as you typed it.

The status line counts the changes. To see the corrected text with no marks at all, turn off Mark changes in the checked text in the options.

What the pencil leaves alone

The model is told to correct every error of spelling, grammar, punctuation and capitalization, and to leave alone:

  • Your words, their meaning, tone and voice. A sentence that is already correct is not rewritten, and nothing is shortened, expanded or reordered.
  • Line breaks, Markdown, code, URLs, names and numbers.
  • The language. A passage is corrected in its own language, never translated.
  • Questions and instructions in the draft. The passage is a document to proofread, not a message to the model, so it answers and follows none of them.

To have it leave more alone, or work to a rule of your own, see Tell the pencil how you write, below.

Keep several drafts

The column down the left lists your drafts, the way a Claude Code or Codex window lists its sessions: one row per draft, newest first, titled by its first line.

  • Click a row to open that draft.
  • New starts another beside it.
  • An empty draft is dropped the moment you leave it, so the list never fills with blank rows.
  • Drag the line between the list and the fields to set the list's width.

The pencil keeps working on the drafts you are not looking at: the open one first, then the rest. While the window shows one draft, a mark on another row says how that one stands. Hover a row for which.

Mark on a rowWhat it means
A pulsing green dotThe pencil is still checking that draft.
A black dotThe pencil finished it, and it is waiting for you.

Right-click a row for its contextual menu. It opens with when the draft was started, in grey, and then offers:

  • New Draft, which starts a new draft;
  • Copy Text, which copies the row's text as you typed it;
  • Copy Checked Text, which copies its checked text;
  • Delete…, which deletes the draft after a dialog. The draft then goes from every desk sharing this node.

On a phone the column is a strip of tabs above the fields, with New at its right end. There, Clear and then any other row is how a draft goes.

Every draft is kept, checked paragraphs included. Reload the window, or open it on another desk sharing this node, and the column comes back as it was without asking the model again. Drafts are app data, so desks joined to this one get them too, merged draft by draft; see Joining desks together. Which draft is open, and how wide the list is, are this browser's own.

One draft on two desks

With a draft open on two desks at once, the text belongs to the desk you type in.

  • A check that finishes on the other desk adds its corrections and never changes your words.
  • Text that does arrive from another desk waits for a word still being composed (an IME, a phone keyboard) and leaves the caret where it was.
  • Words typed into a draft that another desk has changed since this window last read it — on waking, or before a slow read comes back — are never traded for that desk's. The draft takes the other desk's version, what you typed goes into a draft of its own at the top of the column, and a note says so.

Choose the model

Click the model name at the right end of the status line, and Blue Pencil Options opens:

OptionWhat it sets
Check onThe backend the check runs on: Ollama, the endpoint in Configuration, or ChatGPT, the subscription signed in under Configuration → OpenAI.
ModelA model of that backend for this app alone. Configured keeps the one named in Configuration.
ThinkingHow hard the model thinks. Max is the default: the best reading of the passage is worth the wait.
Custom promptYour own instructions to the model, sent with every check.
Mark changes in the checked textWhether changes are marked at all.
  • Which models. The list is what the backend serves. The ChatGPT list is what the subscription serves: gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, … The Ollama list is what ollama ls shows, cloud models too: ollama pull muse-spark-open:cloud on the node puts that model on it. The dialog's own advice is that a small local model is plenty for proofreading and answers faster.
  • Which level. Ollama's Off is fastest, but some models then think out loud in the answer. A level a ChatGPT model rejects runs at its default. Configured keeps the effort set in Configuration.

Another backend, model or thinking level takes over from where the pencil is: what was checked stays checked, and what you type or edit from then on goes to the new choice. Another custom prompt is new rules, so every draft is checked again under it, the open one first. The options are kept with the app's data: every desk on this node checks with them, and so does the Hub composer.

Tell the pencil how you write

Custom prompt, in the same options, is for what the pencil should know about your writing. Say it in your own words, in any language:

  • I prefer writing in lowercase.
  • Use British spelling.
  • 中英文之间加一个空格。

It goes to the model with every check, behind the pencil's own rules, and wins where the two differ. With the first line above, a lowercase draft keeps its lowercase and still has its spelling and grammar put right.

  • Return starts a new line in the field. Command-Return or Control-Return presses OK.
  • The field takes up to 2,000 characters.
  • Empty it to go back to the pencil's rules alone.

Where your text goes

The check runs on the Ollama endpoint in Configuration (ollama.base_url, ollama.model) unless the options point it at ChatGPT. With a local model nothing you write leaves this machine. On ChatGPT the passage goes to OpenAI.

What a check costs

Text is checked a paragraph at a time, and only the paragraph you touched is checked again, which keeps long documents cheap.

A draft open on two desks of this node — or in the Hub composer too — still costs one model call a paragraph. The desk you type in asks first, and the others join its answer as it streams. A paragraph edited mid-check has its call cancelled once every desk has let go of it.

If nothing is checked

The status line says why, in red:

  • The backend is not set up. Ollama has no address, or nobody is signed in to ChatGPT. Both are set in Windows → Configuration, the sign-in on its OpenAI pane.
  • No model is chosen for the backend, here or in Configuration. Click the model name and pick one.
  • The draft is too long: over 20,000 characters.
  • The model failed, or answered nothing. The line gives the reason, and your next edit tries again.

In the Hub composer

A working Blue Pencil also proofreads the Hub app's composer, in place: blue rules under what it would change, and a floating menu to accept them. It runs on the settings chosen here. The Hub says how to use it.

Ask the model from an app or a script

Any app can ask the model a question the way Blue Pencil does. POST /v1/chat/complete asks one question and streams the answer back, with no session, no tools and no history. The daemon holds the model's address and key, so the caller needs neither. Like every /v1/ call it takes the daemon's API token where one is set.

The body is JSON:

FieldWhat it is
promptThe question. It cannot be empty, and holds up to 64 KB.
systemThe instructions the model answers under, up to 8 KB.
provider"openai" runs the call on the ChatGPT subscription: openai.model, openai.effort, and the sign-in under Configuration → OpenAI. Left out, the call runs on the Ollama endpoint.
model, effortOptional. They override the configuration for this one call.
optionsOptional. Ollama options such as temperature and seed, for this one call.
shareOptional. true lets identical calls be one model call.

The answer is newline-delimited JSON: {"delta": …} lines, a fragment of the answer in each, then {"done": true} with the model and the provider that ran it.

$ curl -sN 127.0.0.1:7777/v1/chat/complete -d '{"prompt": "Say hello."}'
{"delta":"Hello"}
{"delta":"!"}
{"done":true,"model":"…","provider":"ollama"}

A call that cannot start answers a JSON {"error": …} with an error status, and one that fails part way ends on an {"error": …} line. Closing the request cancels the model call.

With "share": true, identical calls — the same backend, model, effort, prompts and options — are one model call:

  • Whoever asks while another asker's call is running reads that answer from its start.
  • The call ends when the last asker hangs up.
  • A finished answer is kept ten minutes for whoever asks next.
  • An asker who joined a call, or read a kept answer, finds "shared": true on the done line.

Leave share off when every call should sample afresh. Blue Pencil itself asks with share on and Ollama's temperature at 0: proofreading wants the likeliest correction, and the same one each time.

Contents