π¦ Nika 0.65.0 β Native jq
π¦ Nika 0.65.0 β Native jq
Inference as Code Β· April 4, 2026 Β· 5 commits
| π§ͺ Tests | π§ Builtins | π¦ Transforms | π Providers |
|---|---|---|---|
| 9,930 | 45 | 39 | 9 |
β§ infer Β· β exec Β· β fetch Β· β invoke Β· β agent
β¨ The full jq language, inside your workflows. No external binary, no shell escaping, no limits. Nika now ships a complete jq engine powered by jaq-core, giving you 100+ jq functions for data transformation without leaving YAML. Plus a purpose-built treemap tool for dashboard hierarchies, and a public Rust API for embedding jq in your own crates.
π§ nika:jq -- Full jq, Zero Dependencies
The | jq() pipe transform is great for simple expressions, but it chokes on complex nested queries (500+ chars) because the template parser can't handle deeply nested parentheses. The new nika:jq builtin tool bypasses the template engine entirely and gives you the full power of jq.
- id: analyze_crawl
with: { results: $crawl_pages }
invoke:
tool: nika:jq
params:
data: "{{with.results}}"
expr: |
[.[] | select(.status == 200)]
| group_by(.domain)
| map({
domain: .[0].domain,
count: length,
avg_size: ([.[].size] | add / length | round)
})
| sort_by(.count)
| reverseWhat you get: Every jq function you know and love. group_by, sort_by, map, select, test, keys, length, to_entries, flatten, unique, limit, any, all, path, getpath, setpath, ascii_downcase, ltrimstr, rtrimstr, splits, scan, sub, gsub, indices, inside, contains, startswith, endswith, todate, fromdate... and 60+ more. The full jaq-core standard library.
Three reasons to use this over exec: "jq ...":
nika:jq |
exec: "jq ..." |
|
|---|---|---|
| π§ Binary needed? | No -- compiled into Nika via jaq-core | Yes -- jq must be installed |
| π‘οΈ Shell escaping? | None -- data passed as JSON values | Quoting nightmare for complex data |
| β‘ Performance? | LRU-cached filter compilation | New process per invocation |
Tip
Rule of thumb: Use | jq() for simple one-liners like | jq(.name) or | jq(length). Use nika:jq for anything multi-line, nested, or involving group_by/map/select chains.
π nika:tree_data -- Dashboard-Ready Hierarchies
Building treemap visualizations? Charting category breakdowns? The new nika:tree_data tool groups any array into a nested hierarchy format ready for D3, ECharts, or any squarified treemap renderer.
- id: build_treemap
with: { pages: $crawl_results }
invoke:
tool: nika:tree_data
params:
data: "{{with.pages | to_json}}"
group_by: category
sub_group_by: subcategory
value_field: word_countOutput:
[
{
"name": "Documentation",
"children": [
{ "name": "API Reference", "value": 15420 },
{ "name": "Tutorials", "value": 8930 }
]
}
]Pure Rust. Zero LLM calls. Handles thousands of items in milliseconds. Supports primary + secondary grouping with automatic item counting.
π¦ eval_jq() -- Public API for Rust Embedders
For Rust developers embedding Nika: the jq evaluation function is now publicly exported from nika-core::binding. Call it directly without going through the workflow engine:
use nika_core::binding::eval_jq;
use serde_json::json;
let data = json!({"users": [{"name": "Alice"}, {"name": "Bob"}]});
let result = eval_jq(&data, ".users | map(.name)")?;
// result = ["Alice", "Bob"]π Fixes (2 items)
- π§ Daemon test compilation -- Added missing
auth_tokenfield in 4GetSecrettest constructors after v0.63.x authentication hardening - π’ Router tool count -- Updated from 23/28 to 25/30 after adding
nika:jqandnika:tree_data
β¬οΈ Upgrade Notes
Note
Zero breaking changes. Drop-in upgrade from v0.64.0. The | jq() pipe transform still works exactly as before. nika:jq is an additional option for complex expressions.
π¦ Install
curl -fsSL https://raw.githubusercontent.com/supernovae-st/nika/main/install.sh | sh| Method | Command |
|---|---|
| πΊ Homebrew | brew install supernovae-st/tap/nika |
| π¦ npm | npx @supernovae-st/nika |
| π¦ Cargo | cargo install nika |
| π³ Docker | docker run --rm ghcr.io/supernovae-st/nika:0.65.0 |
| π» VS Code | ext install supernovae.nika-lang |
π All binaries: SHA256 checksums Β· SLSA provenance Β· macOS notarization
Made with π by SuperNovae Studio Β· Open Source, AGPL-3.0
Full Changelog: v0.64.0...v0.65.0