Skip to main content
← Back to list
01Issue
FeatureOpenSwamp ClubPublic
AssigneesNone

Relationships

#4200 Docs: swamp data query --sort, --cursor and nextCursor in the data reference

Opened by skunk-ape · 10/30/2026

swamp-club#4177 adds sorting and keyset paging to data.query (CLI, serve and the local dashboard). The manual's reference page content/manual/reference/data.md documents swamp data query flags and needs:

  • --sort [:asc|desc]: field is createdAt or tags.; values compare as strings (ISO 8601 UTC times sort in time order); ties break on the item identity so the order is total; a row without the sort tag sorts as the empty string (last in desc). Default direction asc.
  • --cursor : requires --sort; pass back the nextCursor of the previous page to get the rows after its last row (keyset, so a write between pages neither skips nor repeats an unchanged row). Opaque token.
  • nextCursor in --json output: present only when --sort is set and the page filled the limit.
  • A sort with no --limit is capped at 10000 results.
  • --single cannot be combined with --sort or --cursor.
  • The data.query serve request takes the same sort {field, direction} and cursor fields.

Example: swamp data query 'tags.type == "agent-session"' --select 'tags' --sort tags.startedAt:desc --limit 50 --json

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

10/30/2026, 8:19:45 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.