Skip to main content

Yamark

Yamark is a formatter for YAML and Markdown, written in Rust. It formats whole files and embedded content, keeping source readable and changes easy to review. Regions without a supported rewrite stay unchanged.

For supported embedded code, Yamark can also call Ruff, Air, Prettier, or another configured formatter.

See the documentation for examples, configuration, editor integrations, and the full syntax reference.

Install

With uv installed, run Yamark directly from PyPI without a separate install:

uvx yamark format config.yaml docs/

This formats the selected files in place. To install a persistent yamark command:

uv tool install yamark

Usage

The examples below use an installed yamark command. To keep running from PyPI without installing it, replace yamark with uvx yamark.

Format one or more files or directories in place:

yamark format config.yaml docs/

Format the current directory:

yamark format

Check whether files are already formatted without writing changes:

yamark format --check docs/

Show a unified diff without writing changes:

yamark format --diff docs/

Format stdin for editor and CI integrations:

yamark format --stdin-file-path config.yaml < config.yaml

Directory traversal skips hidden paths and respects .gitignore, .ignore, and global Git ignore files by default. Pass a hidden path explicitly to format it.

Editor integrations

The VS Code and Positron formatter extension lives in editors/vscode/. See the editor guide for installation and configuration.

Development

Build or install the binary from a checkout with Rust 1.88 or newer:

cargo build --bin yamark
cargo install --path .

Build a Python wheel for local testing:

uvx maturin build --release

Run the Rust tests, formatting check, and lints:

cargo test
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings

Run the external CLI and VS Code extension tests separately:

uv run external-tests/run.py
cd editors/vscode
npm test

When tests/yaml-test-suite/data exists, cargo test also runs the YAML Test Suite round-trip test. Populate that directory with:

tools/bootstrap-yaml-test-suite-data.py --source ~/github/posit-dev/r-yaml12/tests/testthat/yaml-test-suite

Use website/reference.qmd and the public CLI tests as behavior references.

Release

Update the package versions in Cargo.toml, pyproject.toml, and editors/vscode/package.json, refresh Cargo.lock and uv.lock, then push a matching vX.Y.Z tag:

git tag vX.Y.Z
git push origin vX.Y.Z

The release workflow validates the tag, builds binary archives and Python distributions, smoke-tests each wheel, creates the GitHub release with generated release notes, and publishes the Python distributions to PyPI.

Download files

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

Source Distribution

yamark-0.2.1.tar.gz (433.7 kB view details)

Uploaded Source

Built Distributions

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

yamark-0.2.1-py3-none-win_amd64.whl (1.7 MB view details)

Uploaded Python 3Windows x86-64

yamark-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

yamark-0.2.1-py3-none-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

yamark-0.2.1-py3-none-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file yamark-0.2.1.tar.gz.

File metadata

  • Download URL: yamark-0.2.1.tar.gz
  • Upload date:
  • Size: 433.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for yamark-0.2.1.tar.gz
Algorithm Hash digest
SHA256 010f5c9f42f76630a09f884c4370e1ae8995c3b27c31f0ee6f64be1b493ac617
MD5 a442668a8686852fff44d81cc0012324
BLAKE2b-256 8ccf27da98e728de4b38b5d7089d449b6ab7a33d80f2c104a4f1c1469e308830

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.2.1.tar.gz:

Publisher: release.yml on t-kalinowski/yamark

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

File details

Details for the file yamark-0.2.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: yamark-0.2.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for yamark-0.2.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5ba5072587f5cebdf0d100b95e67e821ed989829c9e6068670006cd755bc6e8e
MD5 fb69506ad5268bbb9d54af570d484da8
BLAKE2b-256 620caaef8c21b9d8ea1ba094d7a49470d748914482a5405b09e5011d6e3b0b15

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.2.1-py3-none-win_amd64.whl:

Publisher: release.yml on t-kalinowski/yamark

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

File details

Details for the file yamark-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for yamark-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6d126baeccbf3c29dee968d46023cd5a97b9e4e1b7904f51e669e41f548af4f
MD5 3d9ff41acf9e0c3078e6c49182a4d77d
BLAKE2b-256 18dff45cfbeaebe2e1faea7e1b6dcca8a1633f7ce8c0c497d50952babdc7f39c

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on t-kalinowski/yamark

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

File details

Details for the file yamark-0.2.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for yamark-0.2.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2aa319dac58320123844daed74be8ce877cc36c7303c181888fac7864ee01fb5
MD5 baa6f6730aa1398bb3ea721d3ba2b40b
BLAKE2b-256 f2015c5d79e0f354c8bea118f8fdf782bc2a2dcdbd6af0ac39b154772ed0d3bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.2.1-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on t-kalinowski/yamark

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

File details

Details for the file yamark-0.2.1-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for yamark-0.2.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7eb7595b76cab0c67cd67ab56494ef540bf88b849781eaee2e7103289dc30eb6
MD5 4c09b61580b11408920ac17240322590
BLAKE2b-256 ae8d0d864aaa6f338d615161f219164db8d790537f2f8faf03f45e9be851eddd

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.2.1-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on t-kalinowski/yamark

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

Release history Release notifications | RSS feed

0.3.0

5 files

This release

0.2.1 This release

5 files

0.2.0

5 files

0.0.1

1 file

Supported by

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