Skip to main content

Yamark

Yamark is a fast formatter for YAML and Markdown. 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

Convert JSON-family input from stdin to formatted YAML on stdout:

yamark to-yaml --stdin-file-path data.json5 < data.json5

The path is not read or written. Its suffix selects the exact JSON dialect. This is a conversion, not source formatting.

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 the pages linked from 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.3.0.tar.gz (488.3 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.3.0-py3-none-win_amd64.whl (1.9 MB view details)

Uploaded Python 3Windows x86-64

yamark-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

yamark-0.3.0-py3-none-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

yamark-0.3.0-py3-none-macosx_10_12_x86_64.whl (1.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for yamark-0.3.0.tar.gz
Algorithm Hash digest
SHA256 adc9dd7d02adadff26f16ef67e3839dded0938e1ec53997a95b1b83d67148ea8
MD5 2c418261192efbe4abfea353f65a60d8
BLAKE2b-256 487b4bff14645570908ec7ee0bd0c02a28bf41d0544901a85cd971604e391775

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.3.0.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.3.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: yamark-0.3.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.9 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.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f313103fac2188a22576c78f2b727e8ecdeabbfa2d2917e3e68fa6cb23d73b3a
MD5 f967731fdfa7a3a6c9b48bce2ed522c8
BLAKE2b-256 5d8e848920de63792a3c22c552bed8e80cc47122f40e69511cc4d534e3bb7aa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.3.0-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.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for yamark-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4710c423f17111100dc89e4072e91dd78729365be60644c3f9d986d6872ff97d
MD5 5aed5cdf91ea9524397bd28f5984fd67
BLAKE2b-256 58579a3055f043ab51c875032dbf82e01cb960ea3643414c09d89ce88b9e3f75

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.3.0-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.3.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for yamark-0.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b0e4abf54c21cf6e0a44a66057f18d09d89da171f38ea759d1f82627d101a0ff
MD5 2be3ac6c199ee4a978f353f4cc67338a
BLAKE2b-256 6392dc9e495211e12039183b5bbd9f88424862ede20c4e832e720c66916d7455

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.3.0-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.3.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for yamark-0.3.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 18884b69019775fc90d3cb1cfcead059449400c73bbc81dac1404d5ce8f2c162
MD5 f14b76b6440336cda11a8ce65df66cb1
BLAKE2b-256 1972dcc3e96bc60d49d88156c1f9fcfeb4c47b920b9e15a1a9e3f2c9fb22eacf

See more details on using hashes here.

Provenance

The following attestation bundles were made for yamark-0.3.0-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

This release

0.3.0 This release

5 files

0.2.1

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