Skip to content

Evaluate jpx-engine as JMESPath backend #594

@joshrotenberg

Description

@joshrotenberg

Summary

Evaluate replacing jmespath + jmespath_extensions with jpx-engine for a unified, more powerful JMESPath implementation.

Current setup

jmespath = "0.4"
jmespath_extensions = "0.7"

Proposed

jpx-engine = "x.y"

Benefits of jpx-engine

Same engine as jpx CLI and MCP server - consistent behavior across tools.

Core evaluation

  • evaluate() - Evaluate JMESPath expression against JSON
  • batch_evaluate() - Multiple expressions against same input
  • validate() - Check expression syntax with better error messages

Function discovery (could power --help or introspection)

  • functions() - List all 320+ functions by category
  • describe_function() - Get detailed function info
  • search_functions() - Fuzzy search by keyword

JSON utilities (potential new commands)

  • format() - Pretty-print JSON
  • diff() / patch() / merge() - JSON Patch (RFC 6902) and Merge Patch (RFC 7396)
  • stats() - Analyze JSON structure
  • paths() - Extract all paths in dot notation

Query store (enables #593)

  • define_query() - Store named queries
  • run_query() - Execute stored queries
  • list_queries() - List all stored queries

This would enable features like:

# Pre-baked query files
redisctl cloud cost-report download $ID -q @queries/focus/top-resources.jmespath

# Named queries
redisctl query define top-costs 'sort_by(@, &BilledCost) | reverse(@) | [:10]'
redisctl cloud cost-report download $ID -q @top-costs

# Introspection
redisctl jmespath functions --category Array
redisctl jmespath describe group_by

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelated to CLI UX and commandsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions