Skip to content

feat: add --limit and --page to accounts ls#1

Merged
MrDebugger merged 3 commits into
mainfrom
feat/accounts-pagination
Mar 17, 2026
Merged

feat: add --limit and --page to accounts ls#1
MrDebugger merged 3 commits into
mainfrom
feat/accounts-pagination

Conversation

@MrDebugger

Copy link
Copy Markdown
Collaborator

Summary

  • Add --limit and --page pagination options to accounts ls command
  • Matches the pagination pattern used by squid ls, task ls, run ls

Test plan

  • All 256 tests pass
  • Manual: lobstr accounts ls --limit 10 --page 1

🤖 Generated with Claude Code

MrDebugger and others added 2 commits March 17, 2026 15:45
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds pagination flags to the accounts ls CLI command to align with the project’s standard --page / --limit pattern used by other ls commands.

Changes:

  • Add --limit and --page options to lobstr accounts ls and pass them through to client.accounts.list(...).
  • Add --limit as an alias for results get --page-size to align results pagination with the same CLI flag naming.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/lobstr_cli/commands/accounts.py Adds --limit/--page options to accounts ls and forwards them to the SDK call.
src/lobstr_cli/commands/results.py Adds --limit alias for --page-size on results get for consistent pagination flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +23
def list_accounts(
limit: int = typer.Option(50, "--limit"),
page: int = typer.Option(1, "--page"),
):
"""List your accounts."""
from lobstr_cli.cli import get_client, _state
client = get_client()
items = client.accounts.list()
items = client.accounts.list(limit=limit, page=page)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

output: Optional[str] = typer.Option(None, "--output", "-o", help="Save to file"),
page: int = typer.Option(1, "--page"),
page_size: int = typer.Option(50, "--page-size"),
page_size: int = typer.Option(50, "--page-size", "--limit"),

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

@MrDebugger
MrDebugger merged commit 2d5370a into main Mar 17, 2026
4 of 12 checks passed
@MrDebugger
MrDebugger deleted the feat/accounts-pagination branch March 17, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants