One format to generate documents, slides, sheets, charts, diagrams, and more
π Quick Start β’ π¦ Packages β’ π― Features β’ π Documentation β’ π§ͺ Playground
OmniScript Format v1.2.0 brings major new features and security hardening:
- β¨ @table - Markdown-style tables with alignment, captions, and styling
- β¨ @include - Modular documents with file composition
- ποΈ Refactored Architecture - 85-91% code reduction, highly modular
- π 130 tests - 70% more test coverage including 19 security tests
- π‘οΈ Path traversal protection - Prevents directory escape attacks
- π‘οΈ ReDoS prevention - Bounded regex quantifiers
- π‘οΈ Strict input validation - All inputs validated at multiple layers
- π‘οΈ Defense-in-depth - Multi-layer security architecture
- β All P0-P2 security issues fixed
- β 130/130 tests passing (was 56 - +132% increase)
- β Zero breaking changes - Fully backward compatible
- β Better error messages - Contextual debugging information
- β Type-safe - Zero 'any' types, strict TypeScript mode
View Full Release Notes β | Security Review β
OmniScript Format (OSF) is a universal document description language that lets you write structured content once and export it to multiple formats:
@meta {
title: "My Document";
author: "John Doe";
}
@doc {
# Hello World
This is **OmniScript** - write once, export everywhere!
}
@table {
caption: "Sales Report";
style: "bordered";
alignment: ["left", "right", "center"];
| Product | Revenue | Status |
| --- | --- | --- |
| Widget A | $100K | β Growth |
| Widget B | $85K | β Stable |
}
@chart {
type: "bar";
title: "Sales Data";
data: [
{ label: "Q1"; values: [100]; },
{ label: "Q2"; values: [150]; }
];
}
@include { path: "./sections/summary.osf"; }
@slide {
title: "Presentation Slide";
layout: TitleAndContent;
- Point 1
- Point 2
}
@sheet {
name: "Data";
cols: [Name, Value];
A1 = "Product"; B1 = "Price";
A2 = "Widget"; B2 = 99;
}
Export to: PDF π β’ DOCX π β’ PPTX ποΈ β’ XLSX π
npm install -g omniscript-cli# Create a new OSF file
cat > hello.osf << 'EOF'
@meta {
title: "My First Document";
}
@doc {
# Hello, OmniScript!
Welcome to the **universal document format**.
}
EOF
# Parse and validate
osf parse hello.osf
# Export to PDF
osf export hello.osf --format pdf --output hello.pdfnpm install omniscript-parser omniscript-convertersimport { parse } from 'omniscript-parser';
import { PDFConverter } from 'omniscript-converters';
const osf = `
@doc {
# My Document
Content here...
}
`;
const doc = parse(osf);
const converter = new PDFConverter();
const result = await converter.convert(doc);
// result.buffer contains the PDF| Package | Version | Description | Status |
|---|---|---|---|
| omniscript-parser | 1.2.0 | TypeScript parser engine | β Stable |
| omniscript-converters | 1.2.0 | PDF, DOCX, PPTX, XLSX converters | β Stable |
| omniscript-cli | 1.2.0 | Command-line tools | β Stable |
| omniscript-vscode | 0.1.0 | VSCode extension | β Stable |
| omniscript-examples | 1.2.0 | Professional examples | β Complete |
Zero-dependency TypeScript parser for OSF.
npm install omniscript-parserFeatures: Parse OSF β AST β’ @table & @include support β’ Security grade A+ β’ 83 tests passing
Enterprise-grade document converters.
npm install omniscript-convertersFeatures: PDF with charts β’ DOCX with tables β’ PPTX with native charts β’ XLSX with formulas
Professional command-line interface.
npm install -g omniscript-cliCommands: parse β’ lint β’ render β’ export β’ format β’ diff β’ Table
& include support
| Block | Purpose | Export Support | Version |
|---|---|---|---|
@meta |
Document metadata | All formats | v1.0 |
@doc |
Markdown content | PDF, DOCX | v1.0 |
@slide |
Presentation slides | PPTX, PDF | v1.0 |
@sheet |
Spreadsheet data | XLSX, PDF | v1.0 |
@table |
NEW Markdown tables | HTML, PDF, DOCX | v1.2 |
| Block | Purpose | Render | Version |
|---|---|---|---|
@chart |
Bar, line, pie charts | Chart.js (PDF), Native (PPTX) | v1.0 |
@diagram |
Flowcharts, sequences | Mermaid, Graphviz | v1.0 |
@code |
Syntax-highlighted code | Prism.js, Line numbers | v1.0 |
| Directive | Purpose | Use Case | Version |
|---|---|---|---|
@include |
NEW File composition | Modular documents, reusable sections | v1.2 |
- PDF - High-quality documents with charts and diagrams
- DOCX - Microsoft Word with tables and formatting
- PPTX - PowerPoint with native charts
- XLSX - Excel with formulas and data
10+ professional themes: corporate β’ modern β’ academic β’ minimal β’
colorful β’ dark β’ blueprint β’ ocean β’ forest β’ sunset
- Installation - Install OSF tools
- First Document - Create your first OSF file
- Examples - 16+ professional examples
- v1.0 Specification - Complete OSF v1.0 spec
- v0.5 Specification - Legacy spec
- Roadmap - Future features
- Architecture - System architecture
- Contributing - Contribution guidelines
- Development Guide - Development process
- Testing - Test results and coverage
- Release Notes - v1.0 release details
- Code Quality - Code review and fixes
- Security - Security measures
Interactive Playground: https://omniscript.dev/playground
- βοΈ Write OSF in Monaco editor
- ποΈ Live preview
- π₯ Export to PDF, DOCX, PPTX, XLSX
- π¨ Test different themes
Write technical documentation once, export to PDF for distribution and DOCX for editing.
Create classroom materials with sheets for exercises and slides for presentations.
Generate reports with charts and data tables, export to PDF for sharing.
Create dashboards with charts and diagrams, export to multiple formats.
Build professional presentations with charts, code samples, and diagrams.
git clone https://github.com/OmniScriptOSF/omniscript-core.git
cd omniscript-core
bun install
bun run build# Run all tests
bun test --recursive
# Test individual packages
cd omniscript-core/parser && bun test
cd omniscript-converters && bun test
cd omniscript-core/cli && bun test# Build all packages
bun run build --recursive
# Build individual packages
cd omniscript-core/parser && bun run build| Metric | Value |
|---|---|
| Total Tests | 130 (83 parser + 47 CLI) |
| Test Pass Rate | 100% |
| Security Tests | 19 comprehensive tests |
| Security Grade | A+ (path traversal, ReDoS, XSS) |
| Lines of Code | 3,059 (highly modular) |
| Dependencies | 0 (parser), minimal (converters) |
| Packages | 5 |
| Examples | 25+ |
| Themes | 10+ |
| Export Formats | 4 (PDF, DOCX, PPTX, XLSX) |
We welcome contributions! See CONTRIBUTING.md for guidelines.
- π Report bugs via GitHub Issues
- π‘ Suggest features
- π Improve documentation
- π§ Submit pull requests
- π¨ Create themes
- π Add examples
MIT License - see LICENSE for details.
- Website: https://omniscript.dev
- GitHub: https://github.com/OmniScriptOSF
- npm: https://www.npmjs.com/search?q=omniscript
- VSCode Extension: Marketplace
- Documentation: https://omniscript.dev/docs
- GitHub Issues: https://github.com/OmniScriptOSF/omniscript-core/issues
- GitHub Discussions: https://github.com/OmniScriptOSF/omniscript-core/discussions
Built with β€οΈ using:
- TypeScript - Type-safe language
- Puppeteer - PDF generation
- PptxGenJS - PowerPoint generation
- docx - Word generation
- ExcelJS - Excel generation
- Mermaid - Diagram rendering
- Chart.js - Chart rendering
Made with β€οΈ by the OmniScript team
β Star on GitHub β’ π Read the Docs β’ π§ͺ Try the Playground