,---, ,----..
,`--.' | / / \
| : : / . :
: | ' . / ;. \
| : |. ; / ` ;
' ' ;; | ; \ ; |
| | || : | ; | '
' : ;. | ' ' ' :
| | '' ; \; / |
' : | \ \ ', . \
; |.' ; : ; |
'---' \ \ .'`--"
`---`
iq is a Gemini wrapper of jq, which converts your natural language questions into jq commands and runs them for you.
# Install
cargo install --git https://github.com/macebake/iq
# Setup (get free key: https://aistudio.google.com/app/apikey)
export GEMINI_API_KEY="your-key-here"iq "find all error logs" --path server.jsonl
iq "show users from last week" --path data/*.jsonl
iq "count requests by status code" --path access.log$ iq "find failed API calls" --path logs.jsonl
Sampling...
Extracts API calls where status indicates failure (4xx/5xx codes)
Run:
jq -s '[.[] | select(.status >= 400)] | sort_by(.timestamp)'
[y/N] y
[
{"timestamp": "2024-01-15", "status": 404, "path": "/api/users"},
{"timestamp": "2024-01-15", "status": 500, "path": "/api/orders"}
]- Validates commands before execution
- Always asks permission
- No dangerous operations allowed
- Works with
jqexpressions only
- jq installed
- Gemini API key (free)