Scripts2026年7月20日·1 分钟阅读

jid — JSON Incremental Digger for Interactive Exploration

An interactive CLI tool for exploring and filtering JSON data with real-time feedback. Type queries and see results update instantly as you drill into nested structures.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
jid
先审查命令
npx -y tokrepo@latest install 188ef1c1-8458-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

Introduction

jid is a command-line JSON explorer that provides instant visual feedback as you type filter queries. It helps developers navigate complex JSON structures interactively, making it faster to find the right jq-style path.

What jid Does

  • Opens an interactive terminal UI for browsing JSON data
  • Updates the displayed result in real-time as you type a filter expression
  • Supports dot notation and bracket syntax for navigating nested objects and arrays
  • Provides tab completion for object keys at each nesting level
  • Outputs the final query result to stdout for piping to other tools

Architecture Overview

jid is written in Go and uses a custom terminal UI built with the termbox library. It reads JSON input from stdin, parses it into an in-memory tree, and evaluates the user's query incrementally on each keystroke. The rendering engine displays both the query input and the filtered result in a split view.

Self-Hosting & Configuration

  • Install via Homebrew, AUR, or go install github.com/simeji/jid/cmd/jid@latest
  • No configuration file needed; works out of the box
  • Accepts JSON input from stdin or from a file argument
  • The final selected path is printed to stdout when you press Enter
  • Works in any terminal that supports basic ANSI escape sequences

Key Features

  • Real-time query feedback showing matching results as you type
  • Tab completion for JSON object keys at any depth
  • Support for array indexing and filtering
  • Lightweight single binary with no dependencies
  • Pipe-friendly output for integration with jq and other tools

Comparison with Similar Tools

  • jq — batch query tool; jid is interactive with live feedback for discovering paths
  • fx — interactive JSON viewer; jid focuses on incremental query building
  • gron — makes JSON greppable; jid provides a TUI for visual exploration
  • jless — JSON pager; jid combines navigation with query construction
  • fq — binary format querying; jid is specifically designed for JSON data

FAQ

Q: Can jid handle large JSON files? A: It loads the entire file into memory, so performance depends on available RAM. For very large files, consider pre-filtering with jq.

Q: Does it support YAML? A: No. jid is designed specifically for JSON. Convert YAML to JSON first with a tool like yq.

Q: Can I use jq syntax? A: jid uses a similar dot-notation syntax but does not support the full jq expression language.

Q: How do I get the selected path as a jq filter? A: Press Enter to output the filtered result. The query you typed is a valid path expression.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产