Documentation-first markup language for embedding spreadsheet tables and visualizations in technical documentation
Like Mermaid for diagrams, Moss enables version-controlled, text-based data tables and charts that render beautifully in markdown documents.
Moss v1.0.0 is now stable and production-ready! This release includes:
- ✅ 20 spreadsheet functions
- ✅ Multiple output formats (HTML, SVG, Markdown, JSON)
- ✅ Comprehensive documentation & examples
- ✅ 185 passing tests with 71% coverage
- ✅ WCAG 2.1 AA accessibility
- ✅ Security audit completed (5/5 rating)
- ✅ Performance optimizations
See CHANGELOG.md for full details.
Experiment with Moss markup, formulas, and visualizations in your browser. No installation required!
- YAML-based syntax - Clean, readable markup for spreadsheet data
- Excel-style cell references - A1, B2, AA10, etc.
- 20+ spreadsheet functions - Math, logic, text, and counting functions
- Bar charts with SVG - Vertical and horizontal orientations
- Multiple display modes - Full, paginated, compact, and virtual scrolling
- Accessibility-first - WCAG 2.1 AA compliant
- Type-safe - Written in TypeScript with strict types
- Lightweight - < 100KB bundle size
npm install moss-js---
metadata:
title: "Q1 Sales Data"
theme: light
cells:
- A1: "Product"
- B1: "Sales"
- A2: "Widget A"
- B2: 1250
- A3: "Widget B"
- B3: 1890
- A4: "Widget C"
- B4: 3420
formulas:
- B5: =SUM(B2:B4)
---
metadata:
title: "Q1 Sales Report"
cells:
- A1: "Product"
- B1: "Sales"
- A2: "Widget A"
- B2: 1250
- A3: "Widget B"
- B3: 1890
- A4: "Widget C"
- B4: 3420
visualizations:
sales_chart:
type: bar
title: "Q1 Sales by Product"
labels: A2:A4
data: B2:B4
orientation: vertical
showValues: true
import Moss from 'moss-js';
const markup = `
---
cells:
- A1: 100
- A2: 200
- A3: =A1 + A2
`;
const result = Moss.render(markup, {
target: '#container',
format: 'html'
});
if (result.success) {
console.log('Rendered successfully!');
} else {
console.error('Errors:', result.errors);
}# Validate a Moss file
moss validate example.moss
# Render to HTML
moss render example.moss output.html
# Evaluate formulas
moss eval example.moss --format=jsonSUM(range)- Sum of valuesAVERAGE(range)- Arithmetic meanMIN(range)- Minimum valueMAX(range)- Maximum valueROUND(value, decimals)- Round to N decimalsABS(value)- Absolute valueFLOOR(value)- Round downCEIL(value)- Round upMOD(dividend, divisor)- ModuloPOWER(base, exp)- Exponentiation
IF(condition, true_val, false_val)- ConditionalAND(val1, val2, ...)- Logical ANDOR(val1, val2, ...)- Logical ORNOT(value)- Logical NOT
COUNT(range)- Count numeric cellsCOUNTA(range)- Count non-empty cellsCOUNTIF(range, criteria)- Conditional count
CONCAT(text1, text2, ...)- Concatenate stringsLEN(text)- String lengthUPPER(text)- Convert to uppercaseLOWER(text)- Convert to lowercase
- Float - Default numeric type:
100,-45.5,1e6 - String - Double-quoted text:
"Hello" - DateTime - Date/time values:
DATETIME(2024-01-15)
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Lint code
pnpm lint
# Format code
pnpm formatmoss/
├── packages/
│ ├── moss-parser/ # YAML parser and AST
│ ├── moss-evaluator/ # Formula evaluator
│ ├── moss-renderer/ # HTML/SVG renderer
│ ├── moss/ # Main package
│ └── moss-cli/ # CLI tool
├── docs/ # Documentation
└── examples/ # Example files
- Quick Start Guide - Get up and running in 5 minutes
- API Reference - Complete API documentation
- Format Specification - Moss markup language reference
- Function Reference - All 20 functions with examples
- Migration Guide - Version migration and compatibility
- Performance Guide - Optimization and benchmarks
- Security Audit - Security analysis and compliance
- Changelog - Version history and release notes
- Requirements - Complete requirements specification
- Language Design - Design decisions
- ✅ Basic parser and evaluator
- ✅ Core functions (SUM, AVERAGE, MIN, MAX, COUNT)
- ✅ Simple HTML table renderer
- ✅ CLI tool
- ✅ Complete function library (20 functions)
- ✅ Bar chart visualization
- ✅ Display modes (full, paginated, compact, virtual)
- ✅ Error handling
- ✅ Complete documentation (8 guides)
- ✅ 71% test coverage (185 tests)
- ✅ Performance optimization (formula cache, topological sort)
- ✅ WCAG 2.1 AA compliance
- ✅ Security audit (OWASP Top 10)
- ✅ Markdown plugins (markdown-it, remark)
- ✅ CSV import with auto-detection
- ✅ Multiple output formats
- 🔮 Additional chart types (line, pie, scatter)
- 🔮 Framework integrations (React, Vue, Svelte)
- 🔮 VS Code extension
- 🔮 Docusaurus/VitePress plugins
- 🔮 Data filtering and sorting
- 🔮 Conditional formatting
- 🔮 Export to Excel/Google Sheets
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details
- GitHub Issues: Report bugs or request features
- Documentation: Full documentation
Status: ✨ v1.0.0 Stable - Production Ready
Built with ❤️ for the technical documentation community
Moss © 2026 | MIT License | Changelog | Contributing