oq is an agent-first CLI for querying Org files with deterministic output.
.headings, .section, .search, .text, .todos, .scheduled, etc.).filter(...), map(...)).--now (RFC3339) and --tz (IANA timezone).>= 5.1>= 3.14git clone https://github.com/s-kostyaev/oq.git
cd oq
dune build
dune installdune build
dune runtestoq [--now RFC3339] [--tz IANA_TZ] [--strict] FILE_OR_DIR [QUERY]Examples:
oq notes.org ".tree"
oq notes.org ".tree | .length"
oq notes.org ".tree | filter(.level <= 2) | map(.title)"
oq notes.org ".tree[0:5] | map(.start_line)"
oq notes.org ".headings | map(.title)"
oq notes.org ".section('Inbox', 6:8) | .text"
oq notes.org ".todos | filter(.state == 'NEXT') | map(.title)"
oq --now 2026-02-17T08:00:00-08:00 --tz America/Los_Angeles notes.org ".scheduled('next_7d') | map(.title)"
oq --strict notes/ ".headings | .length"0: success1: query or usage error2: I/O, path, or permission error3: parse coverage failuredocs/PRD-oq-v1.mddocs/agent-contract.mddocs/agent-playbook.mdskills/oq-org-query/SKILL.mddocs/ci-gates.mddocs/performance-notes.mddocs/gh-operations.mddocs/release-flow.mdMIT. See LICENSE.