# @jsware/jsonpath-cli

> Command-Line Interface for the jsonpath-plus library

Latest version **1.1.0** (published 2021-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jsware/jsonpath-cli
pnpm add @jsware/jsonpath-cli
yarn add @jsware/jsonpath-cli
bun add @jsware/jsonpath-cli
```

Provides the command `jpp`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-09-27 |
| First published | 2021-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 2 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | John Scott |
| Maintainers | johnscottuk |
| Keywords | json, jsonpath, jsonpath-plus |

## Links

- npm: https://www.npmjs.com/package/@jsware/jsonpath-cli
- Repository: https://github.com/jsware/jsonpath-cli
- Homepage: https://www.jsware.io/jsonpath-cli
- Issues: https://github.com/jsware/jsonpath-cli/issues
- npm.io page: https://npm.io/package/@jsware/jsonpath-cli

## Dependencies (2)

- [commander](https://npm.io/package/commander.md) ^8.2.0
- [jsonpath-plus](https://npm.io/package/jsonpath-plus.md) ^6.0.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2021-09-27
- 1.0.1 — 2021-09-25
- 1.0.0 — 2021-09-24

## README

# jsonpath-cli
Command-Line interface for the `jsonpath-plus` library.

The `jpp` command enables running the `jsonpath-plus` library against files from
the command line. JSONPath searches return a JSON array which `jpp` outputs.
The `--pretty` option pretty-prints the output.  Additional command line options
can be found below.

See the [documentation](https://www.jsware.io/jsonpath-cli) for examples,
JSONPath expression syntax and additional details.

## Installation
```
npm install -g @jsware/jsonpath-cli
```

## Usage

```
Usage: jpp [options] [JSONPath Expression] [JSON Input File]

Options:
  -V, --version                display version
  -i, --input <file>           input JSON file (default: stdin)
  -e, --jsonpath <expression>  matching expression
  -o, --output <file>          output file for matches (default: stdout)
  -p, --pretty                 pretty print matches (default: false)
  -s, --separate               output each match separately (default: false)
  -b, --before <text>          output text before any matches
  -r, --prefix [prefix]        prefix when using --separate (default: false)
  -u, --suffix <suffix>        suffix each match except last with <suffix>
  -U, --suffix-all <suffix>    suffix all matches with <suffix>
  -a, --after <text>           output text after all matches
  -h, --help                   display help for command
```

---
_Source: https://npm.io/package/@jsware/jsonpath-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
