You have an order list and need a total column. Or user records where you want a lowercase username. The usual answers are a throwaway Python script or a spreadsheet round-trip. There's a shorter path.
The add operation computes new fields from existing ones. Given orders.json:
[
{ "name": "Alice", "price": 10, "qty": 2 },
{ "name": "Bob", "price": 5, "qty": 4 }
]
$ npx github:mahope/transmute orders.json \ --pipe '[{"op":"add","fields":{"total":"item.price * item.qty"}}]' \ --output json [ { "name": "Alice", "price": 10, "qty": 2, "total": 20 }, { "name": "Bob", "price": 5, "qty": 4, "total": 20 } ]
add works on CSV input too — the types are coerced first, so arithmetic just works:
$ npx github:mahope/transmute orders.csv \ --pipe '[{"op":"add","fields":{"total":"item.price * item.qty"}}]' -o csv
Combine with the other pipeline steps — here adding a field and filtering in one pass:
$ npx github:mahope/transmute orders.json \ --pipe '[{"op":"add","fields":{"total":"item.price * item.qty"}},{"op":"filter","expr":"item.total >= 20"}]' \ --output json
jq '. + {total: (.price * .qty)}' works, but jq's syntax is its own language — great once learned, easy to forget between uses."007" stays a string on purpose (IDs, zip codes); "7" becomes a number. Check edge-case rows once.null instead of crashing the whole run — handy for messy data, but scan for nulls afterwards ({"op":"filter","expr":"item.total === null"}).The Transmute CLI is free (npx github:mahope/transmute). The desktop app adds an interactive pipeline builder, live preview and batch processing — one-time $19, no subscription.
More guides: A simpler jq alternative · JSON to CSV pipelines