Skip to main content

mustmatch

mustmatch is a single Rust CLI for assertion pipelines and executable Markdown specs. Pipe a command's output in and assert it matches an expected text / JSON / regex contract, or run documentation-first Markdown with mustmatch test so your examples are also your tests. It ships static quality commands (lint, verify-matrix) too.

This README is itself a spec: the assertion examples below run under make spec.

Install

uv tool install mustmatch

(The install line above is documentation — mustmatch test only runs a bash block when it pipes into | mustmatch, so commands shown for reference are never executed.)

Assertion pipelines

Compare stdin against one expected value — exactly, as a substring with like, as a regex in /slashes/, or as a JSON subset.

printf 'hello world\n'                  | mustmatch like "world"
printf 'v1.2.3\n'                       | mustmatch "/^v[0-9]+[.][0-9]+[.][0-9]+$/"
printf '{"status":"ok","count":42}\n'   | mustmatch like '{"status":"ok"}'
printf 'all systems go\n'               | mustmatch not like "error"

Executable Markdown

mustmatch test PATH... runs the code blocks in your Markdown as tests. A document is the documentation a reader sees and the contract make spec enforces — at once.

$ mustmatch test spec/
...
passed

The full, runnable guide lives in spec/, one feature per file:

Topic File
CLI assertions spec/01-cli-assertions.md
Comparison modes spec/02-comparison-modes.md
Ellipsis (...) spec/03-ellipsis.md
Normalization spec/04-normalization.md
Executable Markdown & the safety model spec/05-executable-markdown.md
Console examples & streams spec/06-console-and-streams.md
Named runs spec/07-named-runs.md
Tables & scenario outlines spec/08-tables-and-outlines.md
Embedded fixture files spec/09-embedded-files.md
Contexts spec/contexts/10-contexts.md
Lifecycle hooks spec/lifecycle/11-lifecycle-hooks.md
Linting specs spec/12-lint.md
Verifying a proof matrix spec/13-verify-matrix.md
Authoring guide & runner self-test spec/14-authoring-and-self-test.md
Release smoke gate spec/15-release-smoke.md

Quality commands

mustmatch lint spec/14-authoring-and-self-test.md | mustmatch like "findings=0"

mustmatch verify-matrix DESIGN --repo-root ROOT confirms a design document's backticked file references resolve inside the repo.

Gates

make lint
make test
make spec
make smoke

make spec builds the binary and runs both the runner and every inline assertion against the build under test, so CI always exercises the current source. make smoke builds or selects a wheel, installs it into an isolated environment, and runs the package smoke document through the installed mustmatch entry point before release.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mustmatch-0.1.0.tar.gz (43.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mustmatch-0.1.0-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

mustmatch-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

mustmatch-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

mustmatch-0.1.0-py3-none-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

mustmatch-0.1.0-py3-none-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file mustmatch-0.1.0.tar.gz.

File metadata

  • Download URL: mustmatch-0.1.0.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mustmatch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bdac3f3b36f588dd801b6c9521f2f158addd7f329d13c775b999941dd2727320
MD5 df0bd474af8946bf5b31127fbad2eea2
BLAKE2b-256 b1447ca6f5742dc43099e4dec129158c472e63c6fc38835a5775e3c1401df05e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.1.0.tar.gz:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: mustmatch-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mustmatch-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 efeb6adf266f5f98c53be99583611a64458984a7df5502e97188abdbb4c60217
MD5 43523ecfdd8cff16156b13bb69a8a720
BLAKE2b-256 af687784ac40a8b1e7a0aedbcd8695d3ecbb913720654e56402c671b9c9cba3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.1.0-py3-none-win_amd64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mustmatch-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 86c6c250578413009eed9ff591d5fa3107c9695176d418dbfc2ccae87d472e77
MD5 3c5a153745e613d30c1339488889bcc8
BLAKE2b-256 ab301260a42494e3a19d91f0820e1ca9d23a7d4c1428c0ccfce56fd07e7d9b4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mustmatch-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f5135a5bdb43fac45217ebad723169eb92629630b931b0fdd78b763ae2468bd4
MD5 bb45fc9e3c229b0f61f255f2bddb3050
BLAKE2b-256 940b7919757b9ab110f401119d3b93b15968d0186817c19ccb466a70f8412452

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mustmatch-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92e8395793d175525f241158a4833a02b00fcf889321e228973cff643eff2411
MD5 d60bba922138335882dc70ee9e5936b4
BLAKE2b-256 1ca8f250355c74b95aa6098b05b211de5ca93da7996e141b3bdb098ca1188cf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.1.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.1.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mustmatch-0.1.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 be600301724e3cac580cbe4c14d109bd9e4c41e054d63f6484199a66fa6d5ba1
MD5 4bbed11d69ff1fb5977af8b7b5badf5b
BLAKE2b-256 e474d52dc2957269254828271c5923e48e8b11aa4e24e5b81db138a8be186b58

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.1.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 files

0.0.4

10 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page