Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Terraform
  3. yj

yj

Apache-2.0Gov5.1.0

A CLI tool that converts between YAML, TOML, JSON, and HCL while preserving map order.

GitHubGitHub
1.0k stars59 forks0 contributors

What is yj?

yj is a command-line interface (CLI) tool that converts data between YAML, TOML, JSON, and HCL formats. It solves the problem of inconsistent key ordering during conversions, ensuring that map structures remain predictable and human-readable across different serialization formats.

Target Audience

Developers, DevOps engineers, and system administrators who work with multiple configuration formats and need reliable, order-preserving conversions for scripting, automation, or data processing.

Value Proposition

Developers choose yj for its strict preservation of map order, support for modern format versions, and simplicity as a single-binary CLI tool, making it more reliable than ad-hoc conversion scripts or other tools that may lose structural details.

Overview

CLI - Convert between YAML, TOML, JSON, and HCL. Preserves map order.

Use Cases

Best For

  • Converting configuration files between YAML, TOML, JSON, and HCL without losing key order
  • Automating data format transformations in CI/CD pipelines
  • Processing structured data in shell scripts with predictable output
  • Migrating projects between different configuration formats
  • Testing serialization/deserialization behavior across formats
  • Integrating format conversion into Go applications via its package API

Not Ideal For

  • Projects requiring conversions to or from unsupported formats like XML or CSV
  • Applications needing high-performance, in-memory serialization without CLI overhead
  • Teams looking for a graphical user interface or interactive conversion features
  • Scenarios where key order preservation is irrelevant and a simpler tool like jq suffices

Pros & Cons

Pros

Map Order Preservation

Maintains original key order across conversions, crucial for readability and consistency in version-controlled files, as emphasized in the project's philosophy.

Standard Format Support

Uses up-to-date specifications like YAML v1.2 and TOML v1.0.0, ensuring compatibility with modern standards for reliable conversions.

CLI Flexibility

Supports stdin/stdout operations with various conversion flags, making it easy to integrate into shell scripts and pipelines for automation.

Go Package Availability

Provides a Go API for programmatic conversion into ordered Go objects, though it is noted as not stable in the README.

Cons

Unstable Go API

The README explicitly states the Go API should not be considered stable, which poses risks for production use in Go applications.

Limited Format Support

Only covers YAML, TOML, JSON, and HCL; lacks common alternatives like XML or CSV, requiring additional tools for broader conversion needs.

No Comment Preservation

Focuses on data structure and key order but does not preserve comments, which can be important for documentation in configuration files.

Frequently Asked Questions

Quick Stats

Stars1,049
Forks59
Contributors0
Open Issues19
Last commit2 months ago
CreatedSince 2017

Tags

#yaml#converter#convert#cli-tool#hcl#golang#cli#configuration-management#json#go#toml#data-conversion

Built With

G
Go

Included in

Terraform6.3k
Auto-fetched 7 hours ago

Related Projects

terraformerterraformer

CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code

Stars14,559
Forks1,836
Last commit4 months ago
InfracostInfracost

Cloud cost intelligence for engineers, AI coding agents, and CI/CD 💰📉 Shift FinOps Left!

Stars12,413
Forks679
Last commit21 days ago
TerragruntTerragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.

Stars9,726
Forks1,215
Last commit14 hours ago
atlantisatlantis

Terraform Pull Request Automation

Stars9,200
Forks1,304
Last commit21 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub