πŸ”Œβ€‚AI Integration

How do I wire an AI assistant up to Narro so it can write and build decks?

There are two ways to point an AI assistant at Narro. Which you want depends on whether the assistant already has a terminal.

If your assistant has shell access

Coding agents β€” Claude Code, Cursor’s agent, Copilot Workspace β€” can just use the CLI. They need the documentation, not tools:

Read https://getnarro.com/llms.txt, then write a deck about <topic> to deck.md
and run `npx @getnarro/cli build deck.md` to check it.

Every docs page is available as markdown by appending .md, and https://getnarro.com/llms-full.txt is all of them in one fetch.

Offline or sandboxed? Install the docs:

npm install --save-dev @getnarro/docs
import { getDoc, listDocs, getComponent } from "@getnarro/docs";

listDocs();                    // every page's slug, title, description
getDoc("markdown-mode").body;  // the markdown
getComponent("List").props;    // generated from the TypeScript source

The component data is generated at build time from the types, so it describes the version you installed rather than a hand-maintained copy.

One question, three chunks

@getnarro/docs hands over whole pages, and markdown-mode alone is ~8,000 tokens. When the agent should be asking questions rather than reading manuals, install the same documentation as a docspack:

npm install --save-dev @getnarro/docspack docspack
npx docspack sync
npx docspack ask "which layout values are valid in slide frontmatter"

sync indexes every installed docspack into a local SQLite database. ask answers from it β€” at most three chunks and 3,000 tokens, ranked by full-text search, with no network call. The index holds every documentation page, one chunk per component, and the catalog of valid names.

Then two lines in AGENTS.md or CLAUDE.md are the whole setup:

Run `docspack ask "<question>"` for documentation on this project's
dependencies. It answers from the installed versions.

npx docspack mcp serves the same index over MCP for assistants that would rather have a declared tool.

If your assistant does not

@getnarro/mcp-server exposes Narro over the Model Context Protocol.

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows:

{
  "mcpServers": {
    "narro": {
      "command": "npx",
      "args": ["-y", "@getnarro/mcp-server"]
    }
  }
}

Claude Code

claude mcp add narro -- npx -y @getnarro/mcp-server

Cursor, Cline, Continue

Same shape, under whatever key the extension uses for MCP servers β€” for Cline it is cline.mcpServers in VS Code settings.

Tools

ToolWhat it does
create_presentationScaffolds a project and returns its path
list_slidesStructured slide data from a deck
add_slideInserts a slide into the file
update_slideRewrites one slide
delete_slideRemoves a slide
apply_themeApplies a marketplace theme
check_presentationValidates names without building; fast enough for every edit
build_presentationBuilds, returning errors on failure
export_presentationPPTX, PDF, Google Slides
bundle_presentationSingle-file HTML
import_presentationFrom PPTX or Google Slides
get_presentation_infoDocumentation on a topic
manage_commentsSlide comments

And for @getnarro/video, whose timeline is derived from the narration so every step is an edit to sentences an assistant can make:

ToolDoes
video_scriptThe brief for a first draft of the narration, then that answer as script.ts
video_renderThe masters, reusing every scene whose inputs have not changed
video_checkOverflow in every format, every citation against its source, the brand policy
video_reviewThe director’s pass, as a briefing video_apply reads back
video_applyA feedback export as a patch to script.ts
video_briefThe brief for a translation or a channel cut
video_coverThe brief for a cover image, and the image from the answer
video_retentionA retention export mapped onto the sentences that cost the most audience
video_recordScripted product footage on virtual time; check says whether the product changed
video_staleWhich cited sources have moved since the last render
video_approveThe one document a person approves

Terminal demos

@getnarro/terminal holds a terminal session as text. These five are narro-terminal <command> against a playbook file, and each returns the command’s output.

ToolDoes
terminal_renderThe playbook as an animated GIF, or an SVG with svg
terminal_stillOne frame as a PNG β€” at a mark, a second or a frame
terminal_checkWhat will be wrong before anything renders: unimplemented sequences, lines wider than the grid, a mask that matches nothing, timing that will read badly
terminal_importAn asciicast, a VHS .tape or a ttyrec, read into a playbook
terminal_exportA playbook written back out as an asciicast

There is no terminal_record tool, deliberately. Every tool above draws text; record runs the playbook’s commands in a real shell, and the CLI guards it by printing the commands and asking a person. A tool would route around exactly that gate, so an assistant authors, renders and checks a demo β€” and a person runs it.

Recordings

@getnarro/replay records a web app as real DOM. Recording is a person’s job β€” it drives a browser through a flow β€” so there is one tool, and it reads.

ToolDoes
replay_infoA cast’s viewport, duration, size and chapter names
replay_reviewWhat is wrong with the recording, and what to do about each one

Call replay_info before writing <Replay chapter="…"> or <narro-replay start="…">. Those name a chapter as a string, and a name the cast does not have is not an error: seek falls back to the beginning, so the demo plays from the top and reads as a timing bug rather than a typo.

Call replay_review before publishing one. A cast is text that travels, and an email address or an API token typed into a form during the recording is in that text. The rest of the pass β€” a click that changed nothing, dead air, a scroll nobody could read, type that will be six pixels tall on a page β€” is about whether the demo is worth showing.

There is no replay_apply, deliberately. video_apply exists because rewriting narration in a video moves every cue after it, so the patch has to be computed. A recording has no such coupling: a finding asks either for a re-record, which is a person driving a browser, or for an edit to the .notes.md track β€” an ordinary markdown file an assistant edits directly and bakes in with narro annotate.

These edit files on disk. Point them at a directory you are willing to have written to.

Resources

The server also exposes the documentation as MCP resources (narro://docs/<slug>), which clients can cache and read without spending a tool call.

Getting good results

The AI prompts page covers this in detail. The short version:

  1. Give it the dialect. The most common failure is a model writing a markdown syntax Narro does not speak.
  2. Make it build. narro build deck.md is the pass/fail signal; without it nothing catches a bad prop.
  3. Say which package. Presentation, Slide, SlideContent, Notes are in @getnarro/core; Heading, Text, List, and the rest are in @getnarro/shared-ui.
IntroductionWhat is Narro, and should I be writing markdown or React?
InstallationWhat do I install, and what does the project look like afterwards?
First DeckWhat does a working React deck look like, end to end?
Markdown ModeHow do I split a slide, style one word, or reveal a line β€” without leaving the markdown file?
Writing AI PromptsWhat do I tell an AI so the deck it writes actually builds?
Rules for AI AgentsWhat do I paste into my repo so an agent stops writing decks that build wrong?
React APIWhich component or hook do I import, and what does it take?
CLIWhich command do I run, and what are its flags?
Markdown APIHow do I read, edit, or validate a deck file from my own code instead of by hand?
Component ReferenceWhat props does this component take, and which package do I import it from?
Verifying a deckHow do I know my deck is actually correct?
AnimationHow do I reveal a list one line at a time, or move between slides with something other than a cut?
NavigationHow does the audience move through the deck, and how do I present it?
Canvas & PositioningHow do I put something at an exact position instead of in the flow?
Images & MediaHow do I use an image as a background, tint it, or embed a video?
ArchitectureWhich package owns what, and why is the seam where it is?
Zooming canvasHow do I zoom and pan across one big canvas instead of cutting between slides?
Transform ModeHow do I zoom and pan across one big canvas instead of cutting between slides?
Import & ExportHow do I get this deck out as PPTX, PDF, or one file I can email?
VideoHow do I turn a story into a video, and keep it right when the words, the product or the source changes?
Recording a web appHow do I put a demo of my product in a deck or on a landing page without shipping a video of it?
Embedding a replayHow do I embed a recorded demo of my app in my React app, my Astro site, or any other page?
TerminalHow do I put a terminal demo in a deck, a README or a video, and find out when the tool it demonstrates stops saying what the demo says?
AI IntegrationHow do I wire an AI assistant up to Narro so it can write and build decks?
ThemingHow do I change the colours, fonts, and overall look of a deck?
Deck TemplatesHow do I define one house style with named layouts my slides can reference, like a PowerPoint master?
TroubleshootingSomething is wrong with my deck. What is it, and how do I fix it?
LimitationsWhat can't Narro do, and what do I do instead?