Skip to content

πŸ¦‹ Nika 0.65.0 β€” Native jq

Choose a tag to compare

@github-actions github-actions released this 04 Apr 09:39

πŸ¦‹ 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)
        | reverse

What 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_count

Output:

[
  {
    "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_token field in 4 GetSecret test constructors after v0.63.x authentication hardening
  • πŸ”’ Router tool count -- Updated from 23/28 to 25/30 after adding nika:jq and nika: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