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:
Type a dot and see every field with its type. Tab to insert. Navigate deeper instantly:
Accept a suggestion
When the suggestion list appears below the input:
- Use Up / Down to highlight the entry you want.
- Press Tab to insert it into the query.
- Press Esc to dismiss without accepting.
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 | [] |
Navigate deeper paths
Suggestions narrow as you type deeper into a path. Type .users[0].profile. and jiq shows only the fields inside 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.
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:
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 |