The SquibView CLI (squibv
) converts Markdown files into high-quality HTML documents with full support for math, diagrams, and interactive content.
# Convert a markdown file to HTML
npx squibv document.md
# Specify output file
npx squibv document.md -o output.html
# Create offline-ready HTML
npx squibv document.md --bundle-offline
# No installation required
npx squibv document.md
npm install -g squibview
squibv document.md
npm install squibview
npx squibv document.md
squibv [options] [file]
squibv [options] build [file] # Explicit build command
Option | Short | Description | Default |
---|---|---|---|
--input <source> | -i | Input file or “-” for stdin | Positional arg |
--output <dest> | -o | Output file or “-” for stdout | input.html |
--standalone | -s | Self-contained HTML (default) | true |
--css <file> | Custom CSS file | Built-in styles | |
--bundle-offline | Bundle all dependencies | CDN links | |
--watch | -w | Watch for changes | Off |
--quiet | Suppress progress messages | Off | |
--log <file> | Log file for messages | stderr |
# Convert README.md to README.html
squibv README.md
# Custom output name
squibv README.md -o documentation.html
# Read from stdinecho"# Hello World" | squibv -i - -o output.html
# Bundle for offline use (larger file, no internet required)
squibv document.md --bundle-offline -o standalone.html
# Custom styling
squibv document.md --css custom-theme.css -o styled.html
# Development mode with auto-rebuild
squibv document.md --watch
# Quiet mode (suppress progress)
squibv document.md --quiet -o output.html
# Convert multiple filesfor file in *.md; do
squibv "$file" -o "${file%.md}.html"done# Using find
find . -name "*.md" -exec squibv {} -o {}.html \;
The --bundle-offline
option creates fully self-contained files:
squibv document.md --bundle-offline
Benefits:
Tradeoffs:
# Sample Document
## Math
$$E = mc^2$$
## Diagram
```mermaid
graph TD
A[Start] --> B[Process]
B --> C[End]
name | age | city |
---|---|---|
John | 25 | NYC |
Jane | 30 | LA |
console.log('Hello, World!');
## Custom Styling
### Using Custom CSS
```bash
squibv document.md --css custom.css
/* custom.css */body {
font-family: 'Georgia', serif;
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}
h1 {
color: #2c3e50;
border-bottom: 2px solid #3498db;
}
.squibview-data-table {
border-collapse: collapse;
width: 100%;
}
.squibview-data-tableth,
.squibview-data-tabletd {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
Monitor files for changes and auto-rebuild:
# Watch single file
squibv document.md --watch
# Watch with custom output
squibv document.md --watch -o docs/output.html
Perfect for development workflows where you want live updates.
# GitHub Actions example
- name: Generate Documentation
run: npx squibv README.md -o docs/index.html --bundle-offline
docs: README.md
npx squibv README.md -o docs/index.html
.PHONY: docs
File not found:
# Check file pathls -la document.md
squibv document.md
Permission errors:
# Check write permissionsls -la output-directory/
Large file warnings:
# For large files, increase memory if needed
NODE_OPTIONS="--max-old-space-size=4096" squibv large-document.md
# Enable detailed logging
squibv document.md --log build.log
# Check log filecat build.log