A command-line tool for filtering, mapping, and reducing data using JavaScript expressions, inspired by Unix utilities like sed and awk.
pjs is a command-line utility that allows developers to filter, map, and reduce data streams using JavaScript expressions directly in the terminal. It processes input from stdin or files, enabling quick text manipulation and transformation with familiar JavaScript syntax. The tool is designed as a modern alternative to traditional Unix utilities like sed, awk, and wc, but with the flexibility of JavaScript.
JavaScript developers and system administrators who need to perform text processing or data transformation tasks in the command line without switching to other languages or tools.
Developers choose pjs because it allows them to leverage their existing JavaScript knowledge for command-line data processing, with built-in support for lodash and Ramda for advanced operations, and a streaming API for efficient handling of large datasets.
Pipeable javascript. Quickly filter, map, and reduce from the terminal
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Processes input line-by-line for memory-efficient handling of large datasets and real-time streams, as emphasized in the README's examples with tail -f.
Leverages concise JS expressions for filter, map, and reduce, with automatic binding to string prototype methods, reducing boilerplate for developers.
Includes lodash (_) and Ramda (R) out of the box, enabling advanced functional programming and chaining without external dependencies.
Supports JSON formatting with the -j flag, making it easy to output structured data for integration with APIs or other JSON-based tools.
Requires a Node.js environment to run, which can be a barrier in systems where Node is not available or where minimal tooling is preferred.
Compared to native Unix utilities like awk or sed, pjs's JavaScript interpretation introduces overhead, especially for CPU-intensive or high-volume tasks.
Designed primarily for text streams, making it unsuitable for binary data or non-textual formats without additional preprocessing.