Jegan - A terminal JSON editor

Go Test License Go Reference GitHub

( English / Japanese )

Features

🛡️ Preserve original JSON with minimal changes

Jegan keeps your JSON as close to the original as possible. Only the parts you edit are modified.

⚡ Instant startup even with large JSON files

Jegan starts immediately, even when loading large JSON files.

Instead of blocking on file loading, data is processed in the background and becomes available progressively.

🔄 Undo support for safe editing

Deleted entries are not removed immediately but marked as <DEL>:

🧩 Collapsible view for containers

📦 Supports real-world JSON formats

🧭 Structured navigation in terminal

🔌 CLI-friendly

jegan < input.json > output.json

⌨️ Efficient editing

Install

Manual Installation

Download the binary package from Releases and extract the executable.

⚠️ Note: The macOS build is experimental and not yet tested. Please let us know if you encounter any issues!

Use eget installer (cross-platform)

brew install eget        # Unix-like systems
# or
scoop install eget       # Windows

cd (YOUR-BIN-DIRECTORY)
eget hymkor/jegan

Use scoop-installer (Windows only)

scoop install https://raw.githubusercontent.com/hymkor/jegan/master/jegan.json

or

scoop bucket add hymkor https://github.com/hymkor/scoop-bucket
scoop install jegan

Use "go install" (requires Go toolchain)

go install github.com/hymkor/jegan/cmd/jegan@latest

Note: go install places the executable in $HOME/go/bin or $GOPATH/bin, so you need to add this directory to your $PATH to run jegan.

Usage

jegan some.json

or

jegan < some.json

Key bindings

Non-interactive mode (-auto)

The -auto option allows scripted, non-interactive execution by simulating key inputs.

Inputs are provided as a single string, where each step is separated by |. Each step corresponds to either a key press or a line input.

Example:

jegan -auto "@|.architecture.\"32bit\".url|r|1|w|-|q|y" - < jegan.json > new-jegan.json

This performs the following steps:

  1. @ : jump to a JSON path
  2. .architecture."32bit".url : input the path
  3. r : modify the item
  4. 1 : new value
  5. w : save
  6. - : write to standard output
  7. q : quit
  8. y : confirm

Changelog

Acknowledgements

Author