Write once, export everywhere - Documents, Slides, Sheets, Charts, Tables & More
🚀 Get Started • 📖 Documentation • 🧪 Playground • 💬 Discussions
NEW in v1.2.0:
- ✨ @table blocks - Markdown-style tables with captions, alignment, and styling
- ✨ @include directive - Modular documents with file composition and security
- 🔒 Security Grade A+ - Path traversal protection, ReDoS prevention, strict validation
- 📊 203 tests - 130 core + 73 converters, 100% passing with 19 security tests
- 🏗️ Refactored - 85-91% code reduction, highly modular architecture (46 focused files)
- ✅ Zero breaking changes - Fully backward compatible with v1.1
OmniScript Format (OSF) is a universal document DSL that lets you write structured content once and export to multiple formats:
@meta { title: "Sales Report"; date: "2025-10-16"; }
@doc {
# Q4 Sales Report
**Outstanding performance** across all regions!
}
@table {
caption: "Regional Performance";
style: "bordered";
alignment: ["left", "right", "center"];
| Region | Revenue | Status |
| --- | --- | --- |
| North | $120K | ✓ Growth |
| South | $95K | → Stable |
| East | $145K | ✓ Growth |
}
@chart {
type: "bar";
title: "Revenue by Region";
data: [
{ label: "North"; values: [120]; },
{ label: "South"; values: [95]; },
{ label: "East"; values: [145]; }
];
}
@include { path: "./sections/recommendations.osf"; }
Export to: PDF 📄 • DOCX 📝 • PPTX 🎞️ • XLSX 📊 • HTML 🌐 • Markdown 📃
# CLI tools (v1.2.1)
npm install -g omniscript-cli@1.2.1
# Libraries (v1.2.0)
npm install omniscript-parser@1.2.0
npm install omniscript-converters@1.2.0# Create document
echo '@doc { # Hello World }' > hello.osf
# Export to PDF
osf render hello.osf --format pdf --output hello.pdf
# Parse and validate
osf parse hello.osf
# Format code
osf format hello.osf| Package | Version | Description | Tests | Status |
|---|---|---|---|---|
| omniscript-parser | 1.2.0 | Zero-dependency TypeScript parser | 83/83 | ✅ NPM |
| omniscript-cli | 1.2.1 | Command-line tools | 47/47 | ✅ NPM |
| omniscript-converters | 1.2.0 | PDF, DOCX, PPTX, XLSX converters | 73/73 | ✅ NPM |
| omniscript-vscode | 0.1.0 | VSCode extension with IntelliSense | - | ✅ Stable |
| omniscript-examples | - | 25+ professional examples | All ✓ | ✅ Complete |
- @meta - Document metadata
- @doc - Markdown content with rich formatting
- @slide - Presentation slides
- @sheet - Spreadsheets with formulas
- @table - NEW v1.2 Markdown-style tables
- @chart - Bar, line, pie charts
- @diagram - Flowcharts, sequences (Mermaid/Graphviz)
- @code - Syntax-highlighted code blocks
- @include - NEW v1.2 File composition and modular documents
- PDF with charts and diagrams
- DOCX with tables and formatting
- PPTX with native charts
- XLSX with formulas
- HTML with live rendering
- Markdown with formatting
✅ Git-Friendly - Plain text format perfect for version control
✅ AI-Friendly - Easy for AI to generate and understand
✅ Developer-First - Designed for technical writers and developers
✅ Type-Safe - Full TypeScript support with 0 'any' types
✅ Secure - Grade A+ security with comprehensive testing
✅ Fast - Zero-dependency parser, blazing performance
✅ Modular - Compose documents from reusable sections
✅ Extensible - Easy to add custom blocks and renderers
OmniScript v1.2.0 achieves Security Grade A+:
- ✅ Path traversal protection (prevents directory escape)
- ✅ ReDoS prevention (bounded regex quantifiers)
- ✅ XSS protection (multi-layer sanitization)
- ✅ Strict input validation (all inputs validated)
- ✅ Defense-in-depth architecture
- ✅ 19 comprehensive security tests
| Metric | Value |
|---|---|
| Tests | 203/203 passing (100%) |
| Core Tests | 130 (parser + CLI) |
| Converter Tests | 73 (all formats) |
| Security Tests | 19 comprehensive |
| Security Grade | A+ |
| Lines of Code | 3,059 (highly modular) |
| Dependencies | 0 (parser) |
| Block Types | 8 |
| Export Formats | 6 |
| Examples | 25+ |
- 📚 Technical Documentation - Write once, export to multiple formats
- 🎓 Education - Create worksheets, slides, and exercises
- 💼 Business Reports - Generate reports with charts and tables
- 📊 Data Visualization - Build dashboards and analytics
- 🎨 Presentations - Professional slides with code and diagrams
- 📝 API Documentation - Version-controlled documentation
- 🔬 Research Papers - Academic papers with citations and tables
- GitHub: OmniScriptOSF
- Website: omniscript.dev
- Playground: omniscript.dev/playground
- Discussions: GitHub Discussions
- NPM: omniscript packages
We welcome contributions! See CONTRIBUTING.md for guidelines.
Ways to contribute:
- 🐛 Report bugs
- 💡 Suggest features
- 📝 Improve docs
- 🔧 Submit PRs
- 🎨 Create themes
- 📚 Add examples
MIT License - See LICENSE
Built with ❤️ by the OmniScript community
⭐ Star us on GitHub • 📖 Read the Docs • 🧪 Try the Playground