id = "csvq" name = "csvq" homepage = "https://mithrandie.github.io/csvq" description = "SQL-like query language for csv" executables = ["csvq"] platforms = ["macos", "linux"] [dotfiles] # The csvq reference manual lists all home-level configuration spellings: # `$XDG_CONFIG_HOME/csvq/` (the XDG default is ~/.config), ~/.csvq_env.json, # and ~/.csvq/csvq_env.json. It lists the matching csvqrc preload files too. # https://mithrandie.github.io/csvq/reference/command.html paths = [ "[configHome]/csvq/csvq_env.json", "~/.csvq_env.json", "~/.csvq/csvq_env.json", "[configHome]/csvq/csvqrc", "~/.csvqrc", "~/.csvq/csvqrc", ] exclude = [] secret = [] [commands] format = 1 label = "Run a query on CSV files" description = "Run one SQL-like query (or a script file) against CSV and other delimited files. Encoding, locale, subcommands and interactive mode are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "manual" kind = "manual" url = "https://mithrandie.github.io/csvq/reference/command.html" revision = "2026-10-27" evidence = """ csvq [options] [subcommand] ["query"|argument] --delimiter value, -d value --format value, -f value --no-header, -n --out FILE, -o FILE --quiet, -q --repository PATH, -r PATH --source FILE, -s FILE --write-delimiter value, -D value (The manual page typesets the double dash as an en dash.) value(case ignored): CSV, TSV, FIXED, JSON, JSONL, LTSV, GFM, ORG, BOX, TEXT """ [[commands.field]] id = "query" label = "Query" description = "A SQL-like statement, quoted. Leave empty when loading statements from a source file." type = "string" position = 0 sources = ["manual"] [[commands.field]] id = "source" label = "Source file" description = "Load the query or statements from a file." type = "path" option = ["--source", "-s"] path = { kind = "file", role = "input", must_exist = true } sources = ["manual"] [[commands.field]] id = "format" label = "Output format" type = "enum" option = ["--format", "-f"] choices = [{ value = "CSV", label = "CSV" }, { value = "TSV", label = "TSV" }, { value = "FIXED", label = "Fixed-length" }, { value = "JSON", label = "JSON" }, { value = "JSONL", label = "JSON Lines" }, { value = "LTSV", label = "LTSV" }, { value = "GFM", label = "GitHub Markdown table" }, { value = "ORG", label = "Org-mode table" }, { value = "BOX", label = "Box-drawing table" }, { value = "TEXT", label = "Text table" }] sources = ["manual"] [[commands.field]] id = "out" label = "Output file" description = "Export select results to a file instead of standard output." type = "path" option = ["--out", "-o"] path = { kind = "file", role = "output", must_exist = false } effect = "overwrite" sources = ["manual"] [[commands.field]] id = "repository" label = "Directory of data files" type = "path" option = ["--repository", "-r"] path = { kind = "directory", role = "input", must_exist = true } sources = ["manual"] [[commands.field]] id = "delimiter" label = "Input delimiter" type = "string" option = ["--delimiter", "-d"] suggestions = [{ value = ",", label = "Comma" }, { value = "\\t", label = "Tab" }, { value = ";", label = "Semicolon" }] sources = ["manual"] [[commands.field]] id = "write_delimiter" label = "Output delimiter" type = "string" option = ["--write-delimiter", "-D"] sources = ["manual"] [[commands.field]] id = "no_header" label = "Files have no header row" type = "boolean" option = ["--no-header", "-n"] sources = ["manual"] [[commands.field]] id = "quiet" label = "Quiet" type = "boolean" option = ["--quiet", "-q"] sources = ["manual"] [[commands.task]] id = "query" label = "Query CSV files" fields = ["query", "format", "repository", "no_header"] required = ["query"] [[commands.task]] id = "script" label = "Run a script file" fields = ["source", "format", "out", "repository"] required = ["source"] [[commands.group]] id = "basic" label = "Basic" fields = ["query", "source", "format", "out", "repository"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["delimiter", "write_delimiter", "no_header", "quiet"]