runemarkv0.9.1

CASOON Open Source

One way for your CLI tools to talk.

runemark renders status lines, reports, error blocks and file-change previews with one colour policy: TTY-aware, NO_COLOR-compliant, plain when redirected. The crate and the npm package share the same Rust renderer.

cargo add runemark
npm install @casoon/runemark
MITcrates.ionpmRust 1.85+Node 20+
A terminal running cargo run --example hero_demo: a progress bar fills as four pages are audited, then a site audit report appears with its metrics, two accessibility findings and a next step.
required dependency (unicode-width)
1
prebuilt Node platforms
5
minimum Rust version
1.85
ecosystems, one renderer
2

What it does

How it renders

One report, any width

Reports adapt to the terminal they're given, not to a fixed layout. Pass a known width and narrow terminals stack summary metrics and wrap finding messages with a hanging indent instead of truncating.

  • Verdict symbols survive NO_COLOR. A tone disappears without color; the verdict's own symbol does not — a failing metric still reads as failing piped to a file.
  • Compact or detailed, same data. The host CLI chooses detailLevel; runemark never asks for two separate report shapes.
  • Determinism by construction. Identical input always walks the same path — no timing-dependent output, so fixtures can be committed and diffed.
44 columns
⚠ Content audit

  Errors: 0
  Warnings: 4 (+2)
  Score: 94/100 (+5%)

● Navigation (2)
  - The main navigation contains more links
    than can be reached comfortably with a
    keyboard [ux/nav-size]
  - Two landmarks share the label "Menu", so
    screen reader users cannot tell them
    apart [a11y/landmark-label]

Generated at build time

All examples →
⚠ Site audit v1.2.0

  Errors: 0   Warnings: 4 (+2)   Score: 94/100 (+5%)

● Accessibility violations (2)
  - [quick win] Image missing alt attribute [a11y/img-alt] (high confidence)
    at 
    Remedy: Add an alt="…" description to the <img> tag.
  - Low contrast ratio on hero button [a11y/contrast]
    at 

Next steps:
  • Run the auto-fixer for formatting issues
    $ audit --fix

Every terminal on this site is rendered by @casoon/runemark during the build – the same renderer as the crate. No screenshots.

site/src/showcase.ts

Quickstart

Three steps from install to consistent output. The full walkthrough lives in the documentation.

  1. Add the crate or the npm package to your command-line tool.
  2. Pick a colour mode – Auto is right for most tools.
  3. Pass your own data to semantic lines, reports, error blocks or diffs.
main.rsRust
use runemark::{ColorMode, Console, Tone, Verdict};

let console = Console::stdout(ColorMode::Auto);

println!("{}", console.paint(Tone::Title, "site audit"));
println!("{}", Verdict::Warning.render(console, "3 findings need review"));
println!("{}", console.paint(Tone::Muted, "Run with --details for every finding."));
audit.cjsNode
const { RunemarkConsole, renderReport } = require('@casoon/runemark')

const console = new RunemarkConsole({ color: 'auto' })
console.writeWarning('3 findings need review')

process.stdout.write(renderReport({
  schemaVersion: 1,
  title: 'Site audit',
  verdict: 'warning',
}, { width: process.stdout.columns }))

New in v0.9.1

Changelog →

Frequently asked questions

Do the Rust crate and the Node package produce identical output?

Yes. The npm package wraps the same Rust renderer through a native addon — there is one presentation layer, not a port kept in sync by hand.

Does runemark work on Windows?

Semantic output, color policy, reports and progress do. The optional select menu talks to the terminal directly through termios and is Unix-only — on Windows it reports Outcome::Unavailable and the caller falls back to render().

What does output look like under NO_COLOR or when piped to a file?

Plain and deterministic. Tones disappear, but a verdict's own symbol stays, so a failing metric still reads as failing without color.

Does runemark parse my CLI arguments or define my report data?

No. It owns terminal presentation only — color policy, layout, semantic tones. Argument parsing, configuration, domain finding types and output formats like JSON or SARIF stay yours.

Consistent CLI output in three steps.

Read the quickstart