diff --git a/apps/docs/content/docs/cli/cli-reference.mdx b/apps/docs/content/docs/cli/cli-reference.mdx index f3076683723..ea9965cdb98 100644 --- a/apps/docs/content/docs/cli/cli-reference.mdx +++ b/apps/docs/content/docs/cli/cli-reference.mdx @@ -2425,18 +2425,23 @@ Linear, Paradev tasks are not listed or resolved, and the reverse. Pass { flag: "--due-to ", description: "Tasks due on or before this date (YYYY-MM-DD)." }, { flag: "--sort-by ", description: "createdAt | updatedAt | dueDate | priority. Default: createdAt." }, { flag: "--sort-order ", description: "asc | desc." }, - { flag: "--limit ", description: "Default 50." }, - { flag: "--offset ", description: "Default 0." }, + { flag: "--limit ", description: "Results per page, from 1 to 500. Default: 50." }, + { flag: "--offset ", description: "Skip this many results. Default: 0." }, ]} output="Array" humanColumns={["SLUG", "TITLE", "PRIORITY", "ASSIGNEE", "PROJECT"]} quiet="task IDs" > -List tasks in the active organization. +List one page of tasks in the active organization. To retrieve the next page, +keep the same filters and increase `--offset` by `--limit`. +Each offset applies to the current task list. Changes between requests can +cause missing or repeated tasks. ```bash paradev tasks list --assignee-me paradev t list -s "auth" --json +paradev tasks list --limit 500 --offset 0 --json +paradev tasks list --limit 500 --offset 500 --json ``` diff --git a/packages/cli/src/commands/tasks/list/command.ts b/packages/cli/src/commands/tasks/list/command.ts index 1a421569059..1c63a868731 100644 --- a/packages/cli/src/commands/tasks/list/command.ts +++ b/packages/cli/src/commands/tasks/list/command.ts @@ -52,7 +52,12 @@ export default command({ .enum("createdAt", "updatedAt", "dueDate", "priority") .desc("Sort field (default: createdAt)"), sortOrder: string().enum("asc", "desc").desc("Sort direction"), - limit: number().int().min(1).max(500).default(50).desc("Max results"), + limit: number() + .int() + .min(1) + .max(500) + .default(50) + .desc("Results per page (1-500)"), offset: number().int().min(0).default(0).desc("Skip results"), }, display: (data) => {