structured-text-tools

A list of command line tools for manipulating structured text data

Github stars Tracking Chart

Structured text tools

The following is a list of text-based file formats and command line tools for manipulating each.

Contents

DSV

Delimiter-separated values, including CSV, TSV, etc.

Awk

Awk is a POSIX-standard command line tool and programming language for processing DSV data. If you use Linux, macOS or a BSD, you almost certainly have it installed. See below for Windows.

See the Grand Comparison Table of SQL-based Tools. It covers

  • AlaSQL CLI
  • csvq
  • csvsql
  • fsql
  • q
  • RBQL
  • rows
  • Sqawk (dbohdan)
  • sqawk (tjunier)
  • Squawk
  • termsql
  • trdsql
  • textql

With a format converter like Remarshal (below) you can use JSON tools to process YAML and TOML, but make sure you do not lose data in the conversion., Name and link, Description, ---------------, -------------, Mario, See the JSON section., Remarshal, Convert between JSON, MessagePack, TOML, and YAML. Validate each of the formats. Pretty-print JSON, TOML, and YAML., rq, See the JSON section., shyaml, Query YAML. Can output null-terminated strings for use in shell scripts., validtoml, Validate TOML., validyaml, Validate or pretty-print YAML., yaml-tools, A set of CLI tools to manipulate YAML files (merge, delete, etc...) with comment preservation, based on ruamel.yaml., yq (kislyuk), jq wrapper for YAML., yq (mikefarah), Query, modify, and merge YAML. Convert to and from JSON., ## Log files, Name and link, Description, ---------------, -------------, Squawk, Query Apache and Nginx log files. See the SQL-based tool comparison., lnav, Query and watch log files. Has batch and interactive mode. Supported formats include the Common Log Format, CUPS page_log, syslog, strace, and generic timestamped messages. Can perform SQL queries., ## Configuration files

Listed below are restricted programming language interpreters and templating tools that produce structured text output. They are generally intended to remove repetition in configuration files. They are distinct from unstructed templating tools like the jinja2 CLI program, which should not be added to this table., Name and link, Output format, Turing-complete?, Syntax, I/O, Description, ---------------, ---------------, ------------------, --------, -----, -------------, CUE, JSON, Yes?, Extended JSON, ?, A constraint language for JSON configuration data. Can generate and validates JSON., Dhall, JSON, YAML, No, Haskell-inspired, Limited to importing libraries from files and HTTP(S) URLs (with protection against leaking your data to the server), A statically-typed functional configuration language. Has a standard formatting tool., jk, JSON, YAML, plain text, Yes, JavaScript, Disk I/O, Generate configuration files using JavaScript (V8 VM)., Jsonnet, JSON, INI, XML, YAML, plain text, Yes, Extended JSON, None, A functional configuration language. Has a standard formatting tool., rjsone, JSON, YAML, No?, Extended JSON, None, A CLI tool for the JSON-e templating language., ytt, YAML, No, YAML/Python hybrid, None?, A templating tool for YAML built upon the Starlark configuration language., ## Bonus round: CLIs for single-file databases, Name and link, Description, File format, ---------------, -------------, -------------, Firebird, Firebird is a FOSS database that can be used from a single file, like SQLite. "isql is a program that allows the user to issue arbitrary SQL commands"., Binary, GNU Recutils, "[A] set of tools and libraries to access human-editable, plain text databases called recfiles.", Text-based, roughly "key: value", SDB, "[A] simple string key/value database based on djb's cdb disk storage and supports JSON and arrays introspection.", Binary, sqlite3(1), "[A] simple command-line utility [...] that allows the user to manually enter and execute SQL statements against an SQLite database.", Binary, ## License

The contents of this document is licensed under the Creative Commons Attribution 4.0 International License. By contributing you agree to release your contribution under this license.

Disclosure

csv2html, hosts, Sqawk, jsonwatch, Remarshal and initool are developed by the curator of this document.

Main metrics

Overview
Name With Ownerdbohdan/structured-text-tools
Primary Language
Program language (Language Count: 0)
Platform
License:
所有者活动
Created At2015-04-27 18:50:49
Pushed At2025-02-28 11:30:47
Last Commit At2025-02-28 11:30:10
Release Count0
用户参与
Stargazers Count7k
Watchers Count170
Fork Count249
Commits Count298
Has Issues Enabled
Issues Count70
Issue Open Count3
Pull Requests Count17
Pull Requests Open Count0
Pull Requests Close Count42
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private