HeyLuke

I built Nib to learn Japanese. It became a pipe for selected text.

2026-11

I work in English, Chinese and Japanese, and my Japanese was the one not getting better. The fix turned out to be small: put my own tools one click away from any text on my Mac. That became Nib, and the tools turned out to be more than a tutor.

My days are mixed. A design review in English, a chat in Chinese, a Japanese email I can read about two-thirds of. The third I couldn’t read was where the learning should have happened, and it rarely did, because every way of looking something up cost more attention than the sentence was worth.

What a lookup used to cost

The macOS dictionary gives you a word. It doesn’t give you the grammar around the word, or how a person would actually say the sentence at lunch. An LLM can do all of that: give it the sentence and ask it to teach, and it becomes a patient tutor. But getting the sentence to it meant copy, switch to the chat window, paste, type the same instruction again, read, switch back. Six steps for every sentence, so I stopped doing it.

I tried the launchers and selection tools Mac people use, PopClip and Alfred among them. Each did part of the job. None of them was built around the thing I wanted:

Select text anywhere, run my own command or my own LLM on it, and read the answer beside the text, without leaving the app I’m in.

I wanted the LLM to be one I run myself, Gemma on Ollama on the same Mac, so a sentence from a work email never has to leave it. So I built the first version of Nib for exactly that.

Nib at work: text is selected in a document, a small bar of actions appears beside it, and the chosen action's result comes back beside the text.

One action: a Japanese tutor

An action in Nib is a few lines of JSON: an icon, a name, where to run, and what to do with the result. This is the one I use most:

{
  "icon": "graduationcap",
  "name": "LearnJP",
  "output": "answer",
  "run": { "openai": {
    "url": "http://127.0.0.1:11434/v1",
    "model": "gemma4",
    "prompt": "If this is not Japanese, translate it into Japanese first. Then teach it: the grammar, the words, and a few everyday conversations that use it. Write the reading of every kanji in katakana.\n\n{text}"
  } }
}

url is Ollama on this Mac; {text} becomes whatever I selected; "output": "answer" puts the reply on a card next to the selection. Six steps became one click, and the click happens inside the email, so I actually do it. The katakana line is there because reading kanji aloud is the part I’m worst at.

The same action works the other way round: select an English sentence I’m about to send, and it shows me the Japanese, then teaches it.

Every command is an action

The tutor is an LLM call, but an action can just as well be a shell command. The selection arrives on standard input or in $NIB_TEXT; whatever the command prints comes back.

What I selectThe action runsWhat comes back
A Japanese sentencean LLM on Ollama, with the tutor prompta card that teaches it
A YouTube linkyt-dlpthe downloaded file’s path
A wordthe macOS dictionary, through open dict://the dictionary, opened at the word
Any texttr '[:lower:]' '[:upper:]'the text in capitals, ready to replace the original

The YouTube row is a whole action:

{
  "icon": "arrow.down.circle",
  "name": "Grab",
  "output": "answer",
  "run": { "shell": {
    "input": "env",
    "script": "yt-dlp -q --no-warnings --no-simulate -P \"$HOME/Downloads\" --print after_move:filepath \"$NIB_TEXT\""
  } }
}

This is the part I didn’t plan for, and the part I now think matters most. A Mac full of small scripts, CLIs and local LLMs is a Mac full of tools that each take text in and put text out. Nib is the missing step in front of all of them: the text you’re looking at, handed to the tool, with the result put back where you were. Agents are making those scripts cheap to write; Nib makes them cheap to reach. It can even ask the agent: with “Connect a Coding Agent…”, Claude Code, Codex or Cursor can write new actions into the bar for you, and Nib checks each one before keeping it.

Quotes, for Anki

Some sentences are worth more than a lookup. A line in a book, a phrase in a colleague’s message, a good explanation an agent gave me: I want to see it again in three days, and again in a week, which is what Anki is for.

Nib’s Quote action saves the selection with where it came from: the app, the time, and the page’s address or the document’s title when the app states it. Everything lands in one searchable list that exports to Markdown, and from there it becomes Anki cards. The sentence and its context travel together, so the card still makes sense in a week.

Sync, with no server in between

I use more than one Mac, and I want the same bar on each: the same actions, prompts, quotes and keys. Most apps that sync do it through their own server, which means my prompts, my quotes and my API keys sit in a database I can’t see. I didn’t want that for my own data, so Nib doesn’t do it.

Nib syncs through CloudKit, in the user’s own iCloud account. There is no Nib server: no account to create, nothing of yours stored with me, nothing for me to read or lose. The app is a client and nothing more.

Try it

Nib is free, for macOS 14 or later on Apple silicon: nibformac.com. Pro is US$19, once, and adds the longer bar and iCloud sync. Start with one action you already do by hand. Mine was a Japanese sentence; yours might be a script you run twice a day.

I’d most like to hear which apps Nib doesn’t work in yet. Every Mac app handles selected text a little differently, and that’s where my time goes now.