Skip to content

bob query

Run Dataview or Tasks queries against the vault

bob query --help
Run Dataview source expressions, Dataview DQL, or Obsidian Tasks queries against the Bob vault.

The default native engine is headless and local. Dataview DQL supports paths, JSON, and markdown output. Native Tasks queries support Tasks v8 filters, JavaScript by-function instructions, sorting, grouping, layout, and whole-note block execution. The explicit Obsidian engine runs Dataview queries against the live plugin when exact installed-plugin behavior is needed.

Usage: bob query [OPTIONS] <--query <DQL>|--query-file <PATH>|--source <SOURCE>|--tasks <QUERY>|--tasks-file <PATH>|--tasks-note <VAULT_RELATIVE_PATH>>

Options:
  -b, --bob-dir <PATH>
          Bob vault root; defaults to BOB_DIR or ~/bob

  -e, --engine <ENGINE>
          Query engine: native for Dataview and Tasks, obsidian for live Dataview

          [default: native]
          [possible values: native, obsidian]

  -f, --format <FORMAT>
          Output format: paths, structured json, or rendered markdown

          [default: paths]
          [possible values: json, markdown, paths]

  -h, --help
          Print help

  -o, --origin <VAULT_RELATIVE_PATH>
          Origin note for Dataview this or Tasks query context

  -q, --query <DQL>
          Full Dataview DQL query

  -Q, --query-file <PATH>
          Read a Dataview DQL query from a file; use - for stdin

  -s, --source <SOURCE>
          Dataview source expression for page path lookup

  -S, --strict-paths
          Fail when paths output cannot derive clean note paths

  -t, --tasks <QUERY>
          Inline Obsidian Tasks query

  -T, --tasks-file <PATH>
          Read an Obsidian Tasks query from a file; use - for stdin

  -n, --tasks-note <VAULT_RELATIVE_PATH>
          Run every Tasks code block in a vault note

  -v, --vault <NAME_OR_ID>
          Obsidian engine vault name or ID; defaults to BOB_DATAVIEW_VAULT

Examples:
  bob query --source '#project and -"archive"'
  bob query --query 'LIST FROM #waiting'
  bob query --format json --query-file ~/queries/projects.dql
  bob query --tasks 'status.type is TODO' --origin dash.md
  bob query --format json --tasks-file ~/queries/tasks.txt
  bob query --tasks-note dash.md --format markdown
Tested rolling snapshot bob-cli 41afa14 bob-mac-capture 556bb67 bob-plugins af1e691 Built 2026-10-24T22:34:13Z (zensical) build.json