Skip to content

MichaelKMalak/hekaya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

اقرأ بالعربي

Hekaya (حكاية)

CI Release npm codecov License: MIT

A screenplay markup language and toolchain built for Egyptian and Arabic-speaking screenwriters.

Hekaya extends the Fountain specification with native support for RTL (right-to-left) text, enabling screenwriters across Egypt and the Arab world to write professionally formatted screenplays in plain text.

Hekaya was created for the Cairo Indie Filmmakers Club to standardize Arabic screenwriting and make it easier to write, share, and export screenplays in a standard PDF format.

What is Hekaya?

Hekaya is to Egyptian and Arabic-speaking screenwriters what Fountain is to English screenwriters: a simple, plain-text markup language that lets you write screenplays in any text editor. The syntax feels natural for writing in Egyptian dialect and formal Arabic while remaining fully backward-compatible with standard Fountain files.

العنوان: آخر أيام الصيف
سيناريو: سمير عبدالحميد

داخلي - قهوة بلدي - نهار

سمير قاعد لوحده في ركن القهوة، بيبص على فنجان القهوة اللي قدامه.

@سمير
(بهدوء)
قهوة سادة، لو سمحت.

@نادية
مكنتش عارفة إنك هنا.

@سمير
ولا أنا كنت ناوي أجي.

- قطع -

Packages

Package Description Coverage
@hekaya/parser Core markup parser (zero dependencies) parser
@hekaya/renderer HTML renderer with RTL-aware screenplay CSS renderer
@hekaya/pdf PDF generator with proper font support pdf
@hekaya/cli Command-line tool cli

Install

# Install the CLI globally
npm install -g @hekaya/cli

# Or use individual packages
npm install @hekaya/parser
npm install @hekaya/renderer
npm install @hekaya/pdf

Or download a pre-built binary from the Releases page — no installation needed, just Node.js 20+:

# Download the binary for your platform (example: macOS ARM)
curl -LO https://github.com/michaelkmalak/hekaya/releases/latest/download/hekaya-macos-arm64.tar.gz
tar -xzf hekaya-macos-arm64.tar.gz

Or build from source:

git clone https://github.com/michaelkmalak/hekaya.git
cd hekaya
pnpm install && pnpm build
node apps/hekaya-cli/dist/index.js render script.hekaya -o script.html

Quick Start

# Parse a Hekaya file
hekaya parse script.hekaya --format json

# Render to HTML
hekaya render script.hekaya -o script.html

# Export to PDF
hekaya export script.hekaya -o script.pdf

# Validate
hekaya validate script.hekaya

# Convert between .hekaya and .fountain
hekaya convert script.hekaya -o script.fountain

Samples

Full sample screenplays are available on the documentation site for best RTL readability:

Sample Description
آخر أيام الصيف Drama — a writer rediscovering hope in Cairo
بكرا السما ح تقع Comedy — a satirical tale of misinformation spreading across Cairo

Documentation

Roadmap

.hekaya Extension Registration

To establish .hekaya as a recognized file extension:

  • VS Code Extension — Create a VS Code language extension providing syntax highlighting, snippets, and autocomplete for .hekaya files
  • npm Packages — Publish @hekaya/parser, @hekaya/renderer, @hekaya/pdf, @hekaya/cli to npm
  • GitHub Linguist — Submit a PR to github-linguist to add .hekaya as a recognized language for syntax highlighting on GitHub
  • IANA Media Type — Register text/x-hekaya as a media type via IANA
  • Domain & Website — Launch hekaya.com with documentation, playground, and download links

Phase 2: Desktop & Web App

  • Port parser to Dart (zero-dep design enables this)
  • Flutter desktop app (macOS + Windows) with WYSIWYG editor
  • StudioBinder-style autocomplete for character names, scene headings, and transitions
  • Real-time preview pane
  • app.hekaya.com — Web-based screenplay editor (Flutter web app)

Website

  • hekaya.com — Landing page with documentation, download links, and getting started guide

Development

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run tests
pnpm test

# Watch mode
pnpm test:watch

License

MIT

About

Hekaya (حكاية) is a screenplay markup language and toolchain built for Egyptian and Arabic-speaking screenwriters. It extends the Fountain specification with native RTL support.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors