Skip to content

cortex query — generic metadata filters #273

Closed

Description

@hurttlocker

Summary

Add metadata filtering to cortex query (and cortex search). Generic, not Obsidian-specific.

Motivation

obsidian_query.sh proved the pattern: query notes by frontmatter fields. This belongs in Cortex as a native capability across all facts.

CLI Interface

cortex search "trading" --meta hub_type=person
cortex search "QQQ" --meta confidence>0.9
cortex query --where "source=trading_journal" --where "type=decision"
cortex query --where "confidence>0.8" --format json|table|list

Features

  • Filter by fact type, source, confidence, state, date range
  • Operators: eq, ne, gt, lt, gte, lte, contains, exists
  • Composable: multiple --where flags AND together
  • Output formats: json, table, list (like obsidian_query.sh)
  • Works with both search (text query + filters) and query (filters only)

Part of epic #267 (folded from x7's suggestion to generalize frontmatter queries)

Activity

  1. added
    enhancement
    on Feb 28, 2026
  2. hurttlocker commented on Feb 28, 2026

    @hurttlocker
    OwnerAuthor

    Shipped in v1.3.0-dev — merged to main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions