Skip to content

feat(cfl): port space list pagination cursor #41

Closed

Description

@rianjs

Port pagination cursor support from confluence-cli PR #105.

Files to modify:

  • tools/cfl/internal/cmd/space/list.go - Add --cursor flag
  • tools/cfl/internal/cmd/space/list_test.go - Add tests

Features:

  • Add --cursor flag for cursor-based pagination
  • Display cursor value for next page when more results available
  • Extract cursor from _links.next URL

Usage:

cfl space list                              # First page
cfl space list --cursor "eyJpZCI6MTIzfQ=="  # Next page
cfl space list --limit 100                  # Larger page

Source: open-cli-collective/confluence-cli#105

Activity

  1. rianjs commented on Jan 31, 2026

    @rianjs
    ContributorAuthor

    Implementation Plan

    1. Add cursor to listOptions struct - Add cursor string field
    2. Add --cursor flag - cmd.Flags().StringVar(&opts.cursor, "cursor", "", "Pagination cursor for next page")
    3. Pass cursor to API - Set apiOpts.Cursor = opts.cursor
    4. Extract and display next cursor - Parse cursor from _links.next URL query param and show it to users when HasMore() is true
    5. Add tests - Test cursor is passed to API, test cursor extraction and display

    The API layer already supports cursor (ListSpacesOptions.Cursor) - this just exposes it in the CLI.

  2. added a commit that references this issue on Jan 31, 2026
    8e68f5e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions