frontmatterkit

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 2 Imported by: 0

README

frontmatterkit

A Unix-style CLI for validating, querying, asserting, and minimally updating front matter in Markdown files.

Features

  • Validate YAML front matter for correctness
  • Get front matter values by path, output as YAML or JSON
  • Set front matter fields with minimal document changes
  • Unset front matter fields cleanly
  • Assert conditions on front matter for CI/CD checks
  • Reads from --in or stdin and writes to --out or stdout
  • Strict YAML validation with helpful exit codes

Installation

go install github.com/UnitVectorY-Labs/frontmatterkit@latest

Quick Usage

# Validate front matter
frontmatterkit validate --in post.md

# Get a field value
frontmatterkit get --path .title --in post.md

# Set a field
frontmatterkit set --set '.title=New Title' --in post.md --in-place

# Remove a field
frontmatterkit unset --path .draft --in post.md --in-place

# Assert conditions in CI
frontmatterkit assert --assert '.draft == false' --assert '.title exists' --in post.md

# Show command-specific help
frontmatterkit get help

License

This project is licensed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL