← 返回命令列表

Linux command

jqp 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Open a JSON file

jqp -f [path/to/file.json]

Pipe JSON from stdin

cat [path/to/file.json] | jqp

Start with an initial query

jqp -f [path/to/file.json] -q '.[0]'

Use a specific theme

jqp -f [path/to/file.json] -t [monokai]

Use a custom config file

jqp -f [path/to/file.json] --config [path/to/.jqp.yaml]

说明

jqp is a TUI playground for exploring and experimenting with jq queries. It provides an interactive interface where you can type jq filters and see results update in real time against your JSON data. The tool internally uses gojq, a Go implementation of jq, and supports both JSON and newline-delimited JSON (NDJSON) input. Features include query history, auto-completion, customizable themes (light and dark), and the ability to start with a pre-defined query. Configuration can be provided via $HOME/.jqp.yaml or the --config flag; command-line options take precedence over the config file.

参数

-f, --file _FILE_
Path to the JSON or NDJSON input file.
-q, --query _QUERY_
Initial jq query to execute on startup.
-t, --theme _THEME_
Color theme name. Light themes work best with light terminal backgrounds, dark themes with dark backgrounds.
--config _FILE_
Path to config file (default: $HOME/.jqp.yaml).
-h, --help
Display help information.
-v, --version
Display version information.

FAQ

What is the jqp command used for?

jqp is a TUI playground for exploring and experimenting with jq queries. It provides an interactive interface where you can type jq filters and see results update in real time against your JSON data. The tool internally uses gojq, a Go implementation of jq, and supports both JSON and newline-delimited JSON (NDJSON) input. Features include query history, auto-completion, customizable themes (light and dark), and the ability to start with a pre-defined query. Configuration can be provided via $HOME/.jqp.yaml or the --config flag; command-line options take precedence over the config file.

How do I run a basic jqp example?

Run `jqp -f [path/to/file.json]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f, --file _FILE_ do in jqp?

Path to the JSON or NDJSON input file.