Autocomplete

Stop guessing field names. jiq shows every available field and function as you type, pulled directly from your loaded JSON data.

You guess at field names, hit errors, scroll through raw JSON to find what you need:

$ cat data.json | jq '.users[0].emial' null $ cat data.json | jq '.users[0].mail' null $ cat data.json | jq '.users[0]' | less # scroll... scroll... found it: "email" $ cat data.json | jq '.users[0].email' "alice@example.com"

Type a dot and see every field with its type. Tab to insert. Navigate deeper instantly:

Query: .users[0]. name String age Number email String <-- Tab tags Array[String] profile Object active Boolean Query: .users[0].email "alice@example.com"

Accept a suggestion

When the suggestion list appears below the input:

  1. Use Up / Down to highlight the entry you want.
  2. Press Tab to insert it into the query.
  3. Press Esc to dismiss without accepting.
Field suggestions after typing .users[0].
Query: .users[0].
 
name String
age Number
email String
tags Array[String]
profile Object
active Boolean

Understand suggestion types

Each suggestion shows a label on the right indicating what it is. These come from the actual values in your data:

Kind What it means Example
Field A key from your JSON, with its value type name String
Function A jq built-in; auto-inserts ( for functions that take arguments select(, map(, keys
Operator Pipe and comparison tokens \|, ==, !=
Variable $name bindings from your query, plus $ENV and $__loc__ $item, $ENV
Iterator Array iterator in path-flow contexts []

Suggestions narrow as you type deeper into a path. Type .users[0].profile. and jiq shows only the fields inside profile.

.
.
.users
.
.users[0]
.
.users[0].profile.

Inside to_entries and with_entries, the suggestions automatically switch to .key and .value — matching the shape jq produces in those contexts.

Handle unusual field names

jq’s .field shorthand only works for simple ASCII identifiers. If a field name contains hyphens, spaces, starts with a digit, or uses non-ASCII characters, jiq inserts bracket notation automatically.

Field in your JSON
my-field 2nd-attempt cafe user name
->
What jiq inserts
.["my-field"] .["2nd-attempt"] .["cafe"] .["user name"]

You don’t need to think about this — jiq picks the right notation for you.

Use function suggestions

When your cursor is after a pipe | or at the start of an expression, jiq suggests jq built-in functions. Functions that take arguments auto-insert the opening parenthesis:

Function suggestions after typing .users | sel
Query: .users | sel
 
select( Function
setpath( Function
 
Tab inserts: .users | select(

Tune suggestions for mixed-shape arrays

When your JSON has an array whose elements don’t all share the same fields, jiq samples up to 10 elements to build the suggestion list. If that’s not enough to see all fields, increase the sample size in ~/.config/jiq/config.toml:

[autocomplete]
array_sample_size = 50   # default 10, range 1-1000

Higher values scan more elements for field discovery but add a small performance cost.

All keys

Key Action
Up / Down Move through the suggestion list
Tab Accept the highlighted suggestion
Esc Dismiss the list
Mouse click Highlight a suggestion
Mouse double-click Accept a suggestion