0.2.1 • Published 1 year ago

@y13i/sort-keys-cli v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

sort-keys-cli

Sort keys of the given YAML/JSON via STDIN.

Install

npm install -g sort-keys-cli

The container image is also available.

Usage

Usage: sort-keys [options]

Sort keys of the given YAML/JSON.

Options:
  -V, --version                    output the version number
  -d, --depth <number>             how many times to recursively sort keys in a nested object or an array
  -k, --prioritize-keys <keys...>  prioritize the given keys in sorting
  -p, --prioritize-primitives      prioritize primitive values in sorting
  -o, --output <json|yaml>         output format (default: "yaml")
  -h, --help                       display help for command

Example

echo '{"b": "foo", "a": "bar"}' | sort-keys
kubectl -n kube-system -o yaml get configmap kube-root-ca.crt | docker run --rm -i ghcr.io/y13i/sort-keys-cli:latest -k kind metadata name namespace labels annotations

Node.js Library

See y13i/sort-keys.

0.2.1

1 year ago

0.2.0

1 year ago