id = "gron" name = "gron" description = "Transforms JSON into discrete assignments to make it greppable." homepage = "https://github.com/tomnomnom/gron" executables = ["gron"] [commands] format = 1 label = "Flatten JSON" description = "Turn JSON from a file or URL into greppable assignments, or reverse it with ungron." quality = "ai-draft" base = "fig:gron" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gron.ts" license = "MIT" [[commands.field]] id = "input" label = "File or URL" description = "Leave empty to read standard input." type = "string" position = 0 sources = ["fig"] [[commands.field]] id = "ungron" label = "Ungron" description = "Turn assignments back into JSON." type = "boolean" option = ["--ungron", "-u"] sources = ["fig"] [[commands.field]] id = "values" label = "Values only" type = "boolean" option = ["--values", "-v"] sources = ["fig"] [[commands.field]] id = "monochrome" label = "No colour" type = "boolean" option = ["--monochrome", "-m"] sources = ["fig"] [[commands.field]] id = "stream" label = "Stream lines" description = "Treat each input line as a separate JSON object." type = "boolean" option = ["--stream", "-s"] sources = ["fig"] [[commands.field]] id = "json" label = "JSON stream output" type = "boolean" option = ["--json", "-j"] sources = ["fig"] [[commands.field]] id = "no_sort" label = "Do not sort" description = "Don't sort output (faster)." type = "boolean" option = ["--no-sort"] sources = ["fig"] [[commands.field]] id = "insecure" label = "Skip certificate validation" type = "boolean" option = ["--insecure", "-k"] sources = ["fig"] [[commands.task]] id = "gron" label = "Flatten" fields = ["input", "monochrome"] required = ["input"] [[commands.task]] id = "ungron" label = "Rebuild JSON" fields = ["input", "ungron"] required = ["input"] set = { ungron = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["input", "ungron", "values", "monochrome"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["stream", "json", "no_sort", "insecure"]