Skip to main content

talon_cli/cli/
meta_args.rs

1//! Arguments for `talon meta`.
2
3use clap::Args;
4
5use crate::cli::SharedScopeArgs;
6
7/// Arguments for the `meta` subcommand.
8#[derive(Debug, Clone, Args)]
9#[command(about = "Query frontmatter metadata from your vault.")]
10pub struct MetaArgs {
11    /// Frontmatter field to project (repeatable).
12    #[arg(long)]
13    pub select: Vec<String>,
14
15    /// Emit tag counts.
16    #[arg(long)]
17    pub tag_counts: bool,
18
19    /// Resolve notes referencing this path via their sources: field.
20    #[arg(long)]
21    pub sources: Option<String>,
22
23    /// Frontmatter filter: KEY OP VALUE (repeatable). Ops: =, !=, <, <=, >, >=, contains, exists, ^= (prefix), ~= (glob).
24    #[arg(long)]
25    pub where_: Vec<String>,
26
27    /// Filter results indexed since this timestamp.
28    #[arg(long)]
29    pub since: Option<String>,
30
31    /// Search result limit.
32    #[arg(short = 'n', long)]
33    pub limit: Option<u16>,
34
35    #[command(flatten)]
36    pub scope: SharedScopeArgs,
37}