Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Queries and saved views

trk list QUERY and trk ready QUERY query the current project’s database, not other projects. ready adds the readiness filter to the same query language. Quote the query so your shell does not interpret operators, spaces, or globs.

trk list 'state!=closed'
trk ready 'priority<=P1'
trk list 'state in (open,claimed) type=code-change'
trk list 'claimed-by=me'
trk list 'claimed-by=agent:*'
trk list 'blocks=orch-m1 state!=closed'
trk list 'closed>-7d reason=done'
trk list 'text~"feature flag"'

Syntax

Terms are joined by implicit AND. Prefix a term with NOT or ! to negate it. Use name in (a,b,c) to match any listed value for one field; there is no general OR operator or grouping syntax.

name=value  name!=value  name<value  name<=value  name>value  name>=value
name~value
name in (a,b,c)
NOT term  !term
ready  blocked  due  stale-lease
FieldMeaning
id, title, state, priority, type, reasonIssue ID, authored fields, state, or close reason (done, abandoned)
claimed-by, created-byClaimant or creator actor
created, updated, closed, next-checkTimestamps
textFull-text search over titles, descriptions, and notes
blocks, blocked-byIssues on either side of a dependency edge
FlagMatches
readyOpen issues with every blocker closed
blockedNonclosed issues with at least one nonclosed blocker
dueWaiting issues with a check due now
stale-leaseClaims whose lease has expired; reading does not sweep them

Values can be words or quoted strings. Unquoted me resolves to the acting actor. Times accept now, relative durations such as -7d, -12h, and +30m, dates such as 2026-11-01 (midnight UTC), or RFC 3339 timestamps.

For ordinary text fields, = and != accept SQLite globs (*, ?, [...]), and ~ matches a glob or, without glob characters, a substring. For text, use text~"feature flag" for a full-text phrase. Dependency fields resolve issue IDs, including unique suffixes, rather than matching arbitrary strings.

Output and ordering

Both commands default to priority, then oldest creation time, then ID. --sort accepts comma-separated keys; prefix a key with - for descending order. Keys are id, state, title, priority, type, created, updated, closed, claimed-by, lease, and next-check. ID breaks remaining ties.

trk list 'state=waiting' --sort next-check
trk list 'state!=closed' --sort priority,-updated --limit 20
trk ready --fields id,priority,type,title --json

--fields chooses pretty-table columns or JSON object keys. --limit caps the number of issues. See JSON API and errors for output formats.

Saved views

Define named views in project or user config.toml:

[views.mine]
query = "claimed-by=me"

[views.waiting]
query = "state=waiting"
fields = ["id", "priority", "waiting", "next-check", "title"]
sort = "next-check"

Run trk list @mine or trk list '@waiting priority<=P1'. Extra terms narrow the view; explicit --fields, --sort, and --limit override its defaults. Settings follow the normal configuration layers.