The SquibView CLI (squibv) is a command-line tool that converts Markdown files into high-quality HTML documents using SquibView's powerful rendering engine. It supports all the advanced features that make SquibView special, including math expressions, Mermaid diagrams, CSV tables, SVG graphics, and syntax-highlighted code blocks.
Unlike basic markdown converters, SquibView CLI provides:
- Rich Content Support: Math (MathJax), diagrams (Mermaid), SVG graphics, CSV/TSV tables
- Advanced Code Highlighting: Syntax highlighting for dozens of programming languages
- Self-Contained Output: Generate fully portable HTML files that work offline
- Professional Styling: Clean, readable default styles with customization options
- Government/Enterprise Ready: Offline bundling for environments without internet access
- Documentation Generation: Convert technical docs with math, diagrams, and code
- Static Site Generation: Create standalone HTML pages for websites
- Report Generation: Build professional reports with tables, charts, and formatting
- Offline Environments: Generate fully self-contained files for air-gapped systems
- CI/CD Integration: Automate document generation in build pipelines
- Academic Publishing: Convert research papers with mathematical notation
# No installation required - run directly
npx squibv document.mdnpm install -g squibview
squibv document.mdnpm install squibview
npx squibv document.md# Convert markdown to HTML
squibv document.md
# Specify output file
squibv document.md -o report.html
# Use alias command
squibv build document.md -o report.html# Bundle all dependencies offline (4MB+ but fully self-contained)
squibv document.md --bundle-offline
# Custom CSS styling
squibv document.md --css custom-theme.css
# Watch for changes and rebuild automatically
squibv document.md --watchsquibv <file.md> # Convert markdown file
squibv build <file.md> # Explicit build command
squibv --help # Show help
squibv --version # Show version| Option | Short | Description | Default |
|---|---|---|---|
--input <source> |
-i |
Input source (file path or "-" for stdin) | Positional argument |
--output <dest> |
-o |
Output destination (file path, "-" or "stdout" for stdout) | input.html |
--standalone |
-s |
Create self-contained HTML | true |
--css <file> |
Custom CSS file | Default styles | |
--bundle-offline |
Bundle all libraries locally | CDN links | |
--log <file> |
Log file for messages | stderr | |
--quiet |
Suppress progress messages | Off | |
--watch |
-w |
Watch file and rebuild on changes | Off |
# Basic conversion
squibv README.md
# Professional report with custom styling
squibv report.md --css corporate-theme.css -o quarterly-report.html
# Academic paper with offline bundling
squibv research-paper.md --bundle-offline -o paper.html# Live development with auto-rebuild
squibv documentation.md --watch
# Custom output location
squibv src/docs/api.md -o dist/api-docs.html# Read from stdin, write to stdout
cat document.md | squibv -i - -o - > output.html
# Clean pipeline (no progress messages)
curl -s https://api.github.com/repos/user/repo/readme | \
jq -r .content | base64 -d | \
squibv -i - -o - --quiet > readme.html
# Chain with compression
cat report.md | squibv -i - -o - | gzip > report.html.gz
# Process with logging
squibv document.md --log conversion.log --quiet# Build all documentation
for file in docs/*.md; do
squibv "$file" -o "dist/$(basename "$file" .md).html" --log build.log
done
# Generate offline documentation package
squibv documentation.md --bundle-offline -o standalone-docs.html
# Pipeline processing in CI
find docs/ -name "*.md" | \
xargs -I {} squibv {} --log ci.log --quietSquibView CLI supports all the advanced features of the SquibView editor:
Inline math: $E = mc^2$
Display math:
$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$
Fenced math blocks:
\`\`\`math
\\begin{pmatrix}
a & b \\\\
c & d
\\end{pmatrix}
\`\`\`\`\`\`mermaid
graph TD
A[Start] --> B{Decision}
B --> C[Option 1]
B --> D[Option 2]
\`\`\`\`\`\`csv
Name,Age,City
Alice,30,New York
Bob,25,Los Angeles
\`\`\`
\`\`\`tsv
Name Age City
Alice 30 New York
\`\`\`\`\`\`svg
<svg width="200" height="100">
<circle cx="50" cy="50" r="40" fill="blue" />
</svg>
\`\`\`\`\`\`javascript
function greet(name) {
console.log(\`Hello, \${name}!\`);
}
\`\`\`- Size: Small (~7KB)
- Dependencies: Requires internet for MathJax/Mermaid
- Use Case: Online environments, smaller files
- Command:
squibv document.md
- Size: Large (~5MB)
- Dependencies: Fully self-contained
- Use Case: Air-gapped systems, archival, reliability
- Command:
squibv document.md --bundle-offline
SquibView CLI includes professional default styles:
- Clean typography with system fonts
- Responsive design for mobile/desktop
- Syntax highlighting for code blocks
- Professional table styling
- Print-optimized layouts
# Override with custom styles
squibv document.md --css my-theme.cssExample custom CSS:
/* Override default styles */
body {
font-family: 'Georgia', serif;
background-color: #f8f9fa;
}
h1, h2, h3 {
color: #2c3e50;
}
.mermaid {
background-color: white;
border: 1px solid #ddd;
border-radius: 8px;
padding: 1rem;
}name: Generate Documentation
on: [push]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npx squibv README.md -o docs/index.html
- run: npx squibv API.md --bundle-offline -o docs/api.html{
"scripts": {
"docs": "squibv README.md -o dist/documentation.html",
"docs:watch": "squibv README.md --watch",
"docs:offline": "squibv README.md --bundle-offline -o standalone.html"
}
}docs: README.md
squibv README.md -o docs/index.html
docs-offline: README.md
squibv README.md --bundle-offline -o docs/offline.html
.PHONY: docs docs-offlineFile not found errors
# Use absolute paths if needed
squibv /full/path/to/document.mdPermission errors
# Check file permissions
ls -la document.md
chmod 644 document.mdLarge file sizes with --bundle-offline
- This is expected (~5MB) for full offline capability
- Use regular mode for smaller files with internet dependency
Math not rendering
- Ensure proper LaTeX syntax in math blocks
- Check browser console for MathJax errors
Mermaid diagrams not showing
- Verify mermaid syntax is correct
- Check browser console for rendering errors
- Use
--bundle-offlinefor maximum reliability - Use regular mode for faster builds and smaller files
- Custom CSS can significantly impact file size
- Watch mode is efficient for development workflows
- Node.js: >= 14.0.0
- Core Libraries: MathJax 3, Mermaid 11, Highlight.js 11
- Build Tool: Commander.js for CLI, jsdom for headless rendering
- Parse: Markdown parsed with SquibView's enhanced markdown-it
- Render: Headless browser simulation with jsdom
- Process: Special content types (math, diagrams, tables) processed
- Bundle: CSS and JavaScript embedded or linked
- Output: Clean, standalone HTML generated
- No external network requests during build (except CDN mode)
- Sandboxed execution environment
- No arbitrary code execution from markdown
- Safe handling of SVG and HTML content
For more information about SquibView's web editor capabilities, see the main README.