Skip to content

Command Reference

Every recs command, organized by category. Click any command name for full documentation with options, examples, and usage notes.

Input Operations

These commands create records from external data sources.

CommandDescription
fromapacheEach line of input (or lines of <files>) is parsed to produce an output record from Apache access logs
fromatomfeedProduce records from atom feed entries
fromcsvEach line of input (or lines of <files>) is split on commas to produce an output record
fromdbExecute a select statement on a database and create a record stream from the results
fromjsonarrayImport JSON objects from within a JSON array
fromkvRecords are generated from character input with the form "<record><record-delim><record>..."
frommongoGenerate records from a MongoDB query
frommultireMatch multiple regexes against each line of input (or lines of <files>)
frompsGenerate records from the process table
fromreThe regex <re> is matched against each line of input (or lines of <files>)
fromsplitEach line of input (or lines of <files>) is split on the provided delimiter to produce an output record
fromtcpdumpRuns tcpdump and puts out records, one for each packet
fromxferlogEach line of input (or lines of <files>) is parsed as an FTP transfer log (xferlog format) to produce an output record
fromxlsParse Excel files (xls, xlsx, xlsb, xlsm) into records
fromxmlReads either from STDIN or from the specified URIs

Transform Operations

These commands reshape, filter, sort, and aggregate records.

CommandDescription
annotateEvaluate an expression on each record and cache the resulting changes by key grouping
assertAsserts that every record in the stream must pass the given expression
chainCreates an in-memory chain of recs operations
collateTake records, grouped together by --keys, and compute statistics (like average, count, sum, concat, etc.) within those groups.
decollateReverse of collate: takes a single record and produces multiple records using deaggregators
deltaTransforms absolute values into deltas between adjacent records
evalEvaluate an expression on each record and print the result as a line of text
expandjsonExpand JSON strings embedded in record fields into actual JSON values
flattenFlatten nested hash/array structures in records into top-level fields
generateExecute an expression for each record to generate new records
grepFilter records where an expression evaluates to true
joinJoin two record streams on a key
multiplexTake records, grouped together by --keys, and run a separate operation instance for each group
normalizetimeGiven a single key field containing a date/time value, construct a normalized version of the value and place it into a field named 'n_<key>'
parsedateParse date/time strings from a field and output them in a normalized format
sortSort records from input or from files
stream2tableTransforms a list of records, combining records based on a column field
substreamFilter to a range of records delimited from when the begin snippet becomes true to when the end snippet becomes true, i.e
topnOutput the top N records from the input stream or from files
xformTransform records with a JS snippet

Output Operations

These commands render records into human-readable or machine-readable formats.

CommandDescription
tochartRender charts in the terminal from a record stream
tocsvOutputs records as CSV formatted lines
todbDumps a stream of input records into a database
togdgraphCreate a bar, scatter, or line graph
tognuplotCreate a graph of points from a record stream using GNU Plot
tohtmlPrints out an HTML table for the records from input or from files.
tojsonarrayOutputs the record stream as a single JSON array
toprettyprintPretty print records, one key to a line, with a line of dashes separating records
toptableCreates a multi-dimensional pivot table with any number of x and y axes
totablePretty prints a table of records to the screen

Released under the MIT License.