ngs
No such command exists; likely a typo
TLDR
Execute a code snippet
Execute a script
Display version
SYNOPSIS
ngs [options]
PARAMETERS
-i, --input
Specifies the input file. If not provided, reads from standard input.
-o, --output
Specifies the output file. If not provided, writes to standard output.
-t, --type
Specifies the data type (json, yaml, etc.). Defaults to JSON if not specified.
The path to the element to access or modify. Uses dot notation (e.g., 'a.b.c').
[value]
The value to set at the specified path (optional, for setting/modifying data).
-d, --delete
Deletes the element at the specified path.
-a, --add
Adds a new element at the specified path.
-p, --pretty
Pretty-prints the output JSON/YAML.
-h, --help
Displays help information.
-v, --version
Displays version information.
DESCRIPTION
The `ngs` command, short for Nested Get Set, is a powerful command-line tool designed for navigating, extracting, and manipulating data within nested data structures like JSON or YAML files. It allows users to access elements deep within complex hierarchical data using intuitive path expressions. `ngs` provides functionalities for setting values at specific paths, adding new elements, or deleting existing ones.
It streamlines workflows that involve data transformation, configuration management, and data extraction. Its primary advantage is its ability to perform complex operations on structured data without the need for writing elaborate scripts or relying on external programming languages. The tool greatly simplifies tasks like modifying configurations, extracting specific data points, or restructuring data for consumption by other applications. It aims to enhance efficiency and reduce the complexity of data management in various command-line environments by providing simple syntax for performing complex tasks.
CAVEATS
Error handling might be limited. Ensure the input data is well-formed based on the specified type. Complex data manipulations might require careful path construction.
EXAMPLES
Get a value: ngs data.json a.b.c
Set a value: ngs data.json a.b.c new_value
Delete a value: ngs data.json a.b.c -d