MarginNote 5

MarginNote CLI · Lab

Let your own AI assistant
keep organizing your materials.

MarginNote CLI lets an AI assistant on your computer — Codex or Claude Code, for example — connect to MarginNote, read the materials you choose, and help you split books, organize mind maps, make review cards and export files. Results go back into your study set, where you check them and keep studying.

  • Turn it on in Settings → Lab
  • Reading needs no Max; writing requires Max
  • Uses no MarginNote AI credits; your assistant bills separately

What you can hand over

Ask the way you would in a chat.

01

Split a textbook into a linked mind map

Try saying“Turn chapter 3 into a mind map, and let every card jump back to its page.”

A chapter-by-chapter map, with excerpts anchored in the source — tap a card to return to it.

02

Pair questions with answers

Try saying“Questions are on pages 3–6, answers on 51–57. Make one card per question.”

Each question paired with its explanation, with room left for your answer if you like.

03

Build or fix a table of contents

Try saying“This scanned PDF has no TOC. Build one I can jump with.”

A clickable TOC — and old ones with wrong page numbers can be corrected.

04

Reorganize an existing map

Try saying“Regroup this map as claim, evidence, example, and shorten the titles.”

Cards moved, titles and comments edited, rebuilt around the relationships you ask for.

05

Make review cards and image occlusion

Try saying“Turn this lymphatic diagram into an image-occlusion card and add it to my deck.”

Review cards created in MarginNote, using its native image occlusion.

06

Export to Anki, print assignments

Try saying“Export this chapter’s cards as an Anki deck.” “Print chapter 2 with my annotations.”

An APKG or PDF generated in the app and brought back to your computer.

Real results

What it looks like back in MarginNote.

Both examples are real screens after the assistant finished the task and wrote back to the study set.

Image-occlusion card

Image-occlusion card

On a lymphatic diagram, the assistant placed 8 native occlusions on the labels and added the card to a “Lymphatic Drainage” deck. Shown: the front, on the iPhone Duo outer screen.

Artwork comparison map

Artwork comparison map

Observations on Monet and Renoir linked to period criticism: the assistant structured the cards, then sources were added and checked by hand in MarginNote.

See the case and sources ↗

How to connect

Pick the one that fits.

On the same Mac

  1. In MarginNote, open Settings → Lab, turn on MarginNote CLI and copy the install command.
  2. Open Terminal, paste the line and press Return.
  3. Start a new chat with your AI assistant and ask it to check that it can read your materials.

iPad / iPhone with a computer

  1. Put the device and the computer on the same trusted network.
  2. In Settings → Lab → MarginNote CLI, tap Show Pairing Code.
  3. Open the address shown on screen in your computer’s browser, enter the code, and run the command the page generates.
  4. Keep MarginNote in the foreground on the iPad or iPhone while you work.

The computer can run macOS, Windows (PowerShell) or Linux. Some cross-platform flows are still being verified; what is available follows the list the app reports.

Safety and limits

  • Off by default — turn it on in Lab; turning it off stops the service.
  • Pairing codes last 5 minutes, work once and expire after three wrong tries; paired computers can be revoked one by one.
  • Use local-network connections only on trusted networks; authorization needs renewing after 8 hours.
  • Before a big change, save a history version and restore it if needed (requires Max).
  • Deleting cards or study sets, or restoring a version across devices, may ask you to tap Allow on the iPad or iPhone.
Connection help and developer docs ↗