A simple CLI for combining json and yaml files

Overview

yamine Mean Bean CI

A simple CLI for combining json and yaml files

Install

Available via Homebrew/Linuxbrew

brew install avencera/yamine/yamine

or

Install from a github release:

curl -LSfs https://avencera.github.io/yamine/install.sh | sh -s -- --git avencera/yamine

or

Download a release directly from github: github.com/avencera/yamine/releases

Usage

yamine --help

Combine JSON/YAML files into a single file

USAGE:
    yamine [FLAGS] [OPTIONS] 
   
    ...

FLAGS:
        --dry-run    Default mode
    -h, --help       Prints help information
    -s, --std-out    Outputs combined file contents to STDOUT
    -V, --version    Prints version information
    -w, --write      Write new output file

OPTIONS:
    -d, --depth 
    
           Number of folder depth to recurse into [default: 1]
    -f, --format 
     
          The format for the output file, defaults to yaml, options are: 'yaml', 'json', 'k8s-json'
                             [default: yaml]
    -o, --output 
          Output file name [default: combined.yaml]

ARGS:
    
       
        ... File(s) or folder you want to run in 
       
     
    
   

Examples

  • Combine all yaml and json files in the current folder and creates combined.yaml file
    • yamine -w .
  • Combine all yaml and json files in the current folder and creates a combined.json file in json-k8s format:
    • yamine --write --format json-k8s --output combined.json .
  • Output the combined file to STDOUT in json-array format:
    • yamine --std-out -f json-array .

Formats

  • yaml - a multi document yaml file separated by --- (a kubernetes multi resource document)

    ---
    apiVersion: traefik.containo.us/v1alpha1
    kind: IngressRoute
    ---
    apiVersion: v1
    kind: Namespace
    metadata:
      name: example
    ---
    kind: ServiceAccount
    apiVersion: v1
    ---
    apiVersion: v1
    kind: Service
    ---
    apiVersion: apps/v1
    kind: Deployment
  • json-array - a json file with each combined file being an element in the array

    [
        {
          "apiVersion": "traefik.containo.us/v1alpha1",
          "kind": "IngressRoute"
          ...
        },
        {
          "apiVersion": "v1",
          "kind": "Namespace",
          ...
        },
        {
          "apiVersion": "v1",
          "kind": "ServiceAccount",
          ...
        },
        {
          "apiVersion": "v1",
          "kind": "Service",
          ...
        },
    ]
  • json-k8s - a kubernetes multi resource json document ex:

    {
      "kind": "List",
      "apiVersion": "v1",
      "items": [
        {
          "apiVersion": "traefik.containo.us/v1alpha1",
          "kind": "IngressRoute"
          ...
        },
        {
          "apiVersion": "v1",
          "kind": "Namespace",
          ...
        },
        {
          "apiVersion": "v1",
          "kind": "ServiceAccount",
          ...
        },
        {
          "apiVersion": "v1",
          "kind": "Service",
          ...
        },
      ]
    }
You might also like...
A Rust based simple cli to delete all files included in `.gitignore` file from your repo

clean-local A simple CLI to remove all the files and folders included in the .gitignore file. Written in RUST Supports glob and wildcard paths in .git

A Faster(⚡)  formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS Lapce Plugin
A Faster(⚡) formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS Lapce Plugin

Lapce Plugin for Rome Lapce-rome is a Lapce plugin for rome, The Rome is faster ⚡ , A formatter, linter, compiler, bundler, and more for JavaScript, T

A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.
A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.

FileQL - File Query Language FileQL is a tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK. Sampl

CLI Tool for tagging and organizing files by tags.

wutag 🔱 🏷️ CLI tool for tagging and organizing files by tags. Install If you use arch Linux and have AUR repositories set up you can use your favour

CLI tool to bake your fresh and hot MD files

At least once in your Rust dev lifetime you wanted to make sure all code examples in your markdown files are up-to-date, correct and code is formated, but you couldn't make that done with already existing tools - fear not!

 miniserve - a CLI tool to serve files and dirs over HTTP
miniserve - a CLI tool to serve files and dirs over HTTP

🌟 For when you really just want to serve some files over HTTP right now!

Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

CLI and library for uploading files to Arweave.

arloader Command line application and library for effortlessly uploading files to Arweave. Arweave enables you to store documents and applications for

A cli tool to download specific GitHub directories or files

cloneit A cli tool to download specific GitHub directories or files. Installation From git git clone https://github.com/alok8bb/cloneit cd cloneit car

Releases(v0.2.0)
Owner
Avencera
Avencera
An ultra-fast CLI app that fixes JSON files in large codebase or folders

minosse An ultra fast CLI app that fixes json files in large codebase or folders USAGE: minosse [OPTIONS] <input-dir> FLAGS: -h, --help Prints

Antonino Bertulla 5 Oct 17, 2022
CLI application to run clang-format on a set of files specified using globs in a JSON configuration file.

run_clang_format CLI application for running clang-format for an existing .clang-format file on a set of files, specified using globs in a .json confi

martin 6 Dec 16, 2022
CLI application to run clang-tidy on a set of files specified using globs in a JSON configuration file.

run-clang-tidy CLI application for running clang-tidy for an existing .clang-tidy file on a set of files, specified using globs in a .json configurati

martin 7 Nov 4, 2022
Patch binary file using IDA signatures and defined replacement bytes in YAML.

fabricbin Patch binary file using IDA signatures and defined replacement bytes in YAML. Install: cargo install --git https://github.com/makindotcc/fab

makin 3 Oct 24, 2023
YAML(ish) - Terminal UI framework based on templates focused on simplicity

A YAML(ish) based terminal GUI framework for- and by Rust, focussed on making it quick and easy to create a functional UI for an app or game. Based on Crossterm and inspired by Kivy.

null 27 Dec 18, 2022
A simple CLI tool for converting CSV file content to JSON.

fast-csv-to-json A simple CLI tool for converting CSV file content to JSON. 我花了一個小時搓出來,接著優化了兩天的快速 CSV 轉 JSON CLI 小工具 Installation Install Rust with ru

Ming Chang 3 Apr 5, 2023
Tool to allow parsing large JSON files without laoding into memory

Tool to allow parsing large JSON files without laoding into memory. Developed in Rust with adapters in other programming langauges for easy adoption

Salaah Amin 7 Jul 11, 2023
A Rust CLI to provide last publish dates for packages in a package-lock.json file

NPM Package Age A Rust CLI which if you provide a npm lockfile (package-lock.json to start), it will give you a listing of all of the packages & the l

Benjamin Lannon 1 Feb 4, 2022
A small CLI tool to query ArcGIS REST API services, implemented in Rust. The server response is returned as pretty JSON.

A small CLI tool to query ArcGIS REST API services, implemented in Rust. The server response is returned as pretty JSON.

Andrew Vitale 2 Apr 25, 2022
This is a simple command line application to convert bibtex to json written in Rust and Python

bibtex-to-json This is a simple command line application to convert bibtex to json written in Rust and Python. Why? To enable you to convert very big

null 3 Mar 23, 2022