Linux command
jnv 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Open a JSON file
jnv [path/to/data.json]
Filter JSON from stdin
cat [path/to/data.json] | jnv
Open with a default filter applied
jnv --default-filter '.[0]' [path/to/data.json]
Use a custom configuration file
jnv -c [path/to/config.toml] [path/to/data.json]
Write the filtered result to stdout on exit
jnv --write-to-stdout [path/to/data.json]
说明
jnv is an interactive JSON viewer and jq filter editor. It provides a split-pane interface with a filter editor at the top and a syntax-highlighted JSON view below that updates in real time as you type your jq filter. Inspired by jid and jiq, jnv uses jaq internally to apply filters, eliminating the need to install jq separately. The tool supports JSON files and JSON Lines input, configurable UI through TOML configuration, hint message toggling, and adjustable reactivity including debounce times.
参数
- -c, --config _file_
- Path to a TOML configuration file.
- --default-filter _filter_
- Default jq filter to apply to input data.
- --write-to-stdout
- Write the current JSON result to stdout when exiting.
- -h, --help
- Print help information.
- -V, --version
- Print version.
FAQ
What is the jnv command used for?
jnv is an interactive JSON viewer and jq filter editor. It provides a split-pane interface with a filter editor at the top and a syntax-highlighted JSON view below that updates in real time as you type your jq filter. Inspired by jid and jiq, jnv uses jaq internally to apply filters, eliminating the need to install jq separately. The tool supports JSON files and JSON Lines input, configurable UI through TOML configuration, hint message toggling, and adjustable reactivity including debounce times.
How do I run a basic jnv example?
Run `jnv [path/to/data.json]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c, --config _file_ do in jnv?
Path to a TOML configuration file.