Calculations embedded in markdown documents.
CalcMark is a terminal-based calculation notepad. Write your thinking in plain text, add calculations that reference each other, and watch results update as you type.
Unlike spreadsheets, CalcMark files are human-readable, diffable, and live in your terminal.
macOS/Linux (Homebrew):
brew install calcmark/tap/calcmarkDownload binary:
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | calcmark_VERSION_darwin_arm64.tar.gz |
| macOS (Intel) | calcmark_VERSION_darwin_amd64.tar.gz |
| Linux (x64) | calcmark_VERSION_linux_amd64.tar.gz |
| Linux (arm64) | calcmark_VERSION_linux_arm64.tar.gz |
| Windows (x64) | calcmark_VERSION_windows_amd64.zip |
After downloading, extract and move cm to a directory in your PATH. On macOS, you may need to run xattr -d com.apple.quarantine ./cm before first use.
- Create a file called
budget.cm:
# Monthly Budget
income = $5000
rent = $1500
savings_rate = 20%
savings = income * savings_rate
remaining = income - rent - savings
- Open in the TUI editor:
cm budget.cm- Or evaluate from command line:
cm eval budget.cm- Or convert to other formats:
cm convert budget.cm --to=html -o budget.htmlExplore example files to see CalcMark in action:
- Budget planning - Monthly budget with income, expenses, savings
- Unit conversion - Converting between units
- Capacity planning - Engineering calculations with constants
Run any example:
cm testdata/examples/budget.cm- Variables flow downward - Define once, reference anywhere below
- Units are first-class -
5 miles in km,20 celsius in fahrenheit - Currencies -
$100,50 EUR, automatic formatting - Percentages -
savings_rate = 20%, thenincome * savings_rate - Functions -
avg(),sqrt(),capacity(), and more - YAML front matter - Define document-level constants
- Export formats - Convert to HTML, Markdown, JSON, or plain text
cm help # General help
cm help functions # List all functions with descriptions
cm help constants # List built-in constants
cm convert --help # Export format optionsPress Ctrl+H (or F1) in the TUI editor for keybindings.
- Documentation - Complete documentation with examples
- Language Reference - Formal language specification
Prerequisites:
Optional (for recording demo GIFs):
- VHS — terminal recorder (
brew install vhs) - VHS requires
ttydandffmpeg, installed automatically by Homebrew
task test # Run all tests
task quality # Lint, vet, staticcheck
task build # Build the cm binary
task record-demos # Regenerate all demo GIFs (requires VHS)MIT

