rtfs
FADE IN: // OPEN-SOURCE SCREENPLAY ENGINE

Read the script.
Parse the craft.

rtfs searches, fetches, caches, and parses movie & TV screenplays across IMSDb, Script Slug, TV Writing, and transcripts, transforming PDFs via PyMuPDF x0-clustering (including dual-column dialogue), HTML, and Final Draft .fdx into a single canonical AST for terminals, Python SDKs, and AI agents via FastMCP.

$ brew install AtaCanYmc/tap/rtfs
Providers
IMSDb · Script Slug · TV Writing · SubsLikeScript
Parsers
PyMuPDF x0 + Dual-Column · HTML · Final Draft .fdx
Cache Protocol
disk:// · redis:// · memory:// · none://
AI Integration
FastMCP 5 Token-Efficient Tools
SCENE 02 // COORDINATE PARSER

From archival ink to canonical AST.

Toggle x0 Clusters to inspect how parsers/pdf/ groups horizontal bounding boxes and dual-column overlaps into Scene Headings, Action, Character, Parenthetical, Dialogue, and Transitions.

SOURCE: scriptslug // PDF (US Letter, Courier 12pt) PAGE 01
Heading / Transition Action Character Parenthetical Dialogue

          
SCENE 03 // CLI WORKBENCH

Built for the command line.

Run parallel async queries across every configured provider, filter by character or scene range, parse local PDFs and Final Draft files offline, batch-export corpora, or spin up a local FastMCP server over stdio.

Select a command to inspect
STDOUT // RTFS CLI v0.1.1 READY

            
SCENE 04 // ARCHITECTURE

Decoupled by design. Zero lock-in.

01 / PROVIDERS httpx + DNS pinning

Multi-Source Async Aggregation

Queries all active providers concurrently via asyncio.gather with fault isolation and SSRF / DNS-rebinding protection. Results are deduplicated and ranked by fuzzy similarity plus source fidelity (PDF > HTML > Transcript).

IMSDbHTML
Script SlugPDF
TV WritingPDF
SubsLikeScriptFallback
02 / PARSERS PyMuPDF · XML

Coordinate & Bidirectional FDX

Plain text dumps destroy screenplay structure. rtfs clusters PDF x0 bounding boxes dynamically, detects dual-column simultaneous dialogue, strips headers and revision stamps, parses IMSDb layouts, and reads/writes native Final Draft .fdx.

RawScript(pdf | html | fdx | text)
|--> ScriptDocument (Pydantic v2 AST)
`--> JSON · Fountain · FDX · Stats
03 / CACHE LAYER Protocol + URI

Pluggable Async CacheBackend

Zero-config SQLite-backed DiskCache out of the box, or switch backends via a single RTFS_CACHE_URL URI: no pickle serialization, strict bytes contract, CLI inspection (rtfs cache info), and custom backend injection.

disk://~/.cache/rtfs DEFAULT
redis://localhost:6379/0 pyrtfs[redis]
memory://  |  none:// CI / NO-OP
04 / FASTMCP SERVER pyrtfs[mcp]

Progressive Disclosure for AI Agents

Full screenplays run 30,000+ tokens. Instead of flooding context windows, rtfs mcp exposes 5 surgical tools so Claude Desktop, Cursor, and Claude Code navigate scripts scene-by-scene.

  • ->search_scriptsCross-provider discovery
  • ->get_script_overviewCompact scene & cast index
  • ->get_scenesCapped range in Fountain/JSON
  • ->search_dialogueFilter by character or keyword
  • ->get_script_statsINT/EXT & dialogue analytics
SCENE 05 // RELEASE & DOWNLOAD HUB

Configure your stack. Ship immediately.

Syncing with github.com/AtaCanYmc/rtfs...
Interactive Stack Configurator
1. Select Optional Extras
2. Cache Backend URI
Generated Install Command
Environment Variable
claude_desktop_config.json

                
Latest Release v0.1.1

rtfs v0.1.1

Active

Includes multi-source async providers (IMSDb, Script Slug, TV Writing, SubsLikeScript), PyMuPDF x0-clustering with dual-column dialogue, bidirectional Final Draft (.fdx) support, DNS-pinned HTTP transport, batch export, pluggable URI cache backends, and the FastMCP server layer.

Direct Archives & Assets
Repository Telemetry
STARS
--
FORKS
--
LICENSE
AGPL-3.0
Copied to clipboard