Skip to content

[INT-83] add devices list command #1020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 1, 2025
Merged

Conversation

perf2711
Copy link
Contributor

@perf2711 perf2711 commented Mar 31, 2025

Description

Adds devices list command:

$ saucectl devices list  --help
Returns the list of devices

Usage:
  saucectl devices list [flags]

Aliases:
  list, ls

Flags:
  -h, --help                help for list
  -n, --name string         Filter devices by name.
      --os string           Filter devices by OS.
      --os-version string   Filter devices by OS version. Accepts semver ranges.
  -o, --out string          OutputFormat format to the console. Options: text, json. (default "text")
      --status string       Filter devices by status. Implies --statuses if not set.
      --statuses            Fetch status for devices.

Global Flags:
      --disable-usage-metrics   Disable usage metrics collection.
      --no-color                disable colorized output
  -r, --region string           The Sauce Labs region. Options: us-west-1, eu-central-1. (default "us-west-1")
      --verbose                 turn on verbose logging

Sample output:

$ saucectl devices list                                              
 Name                             OS       OS Version 
──────────────────────────────────────────────────────
 iPhone 12 mini                   IOS      17.7       
 Google Pixel 9 Pro XL            ANDROID  15         
 iPad Pro 11 2024                 IOS      17.6.1     
──────────────────────────────────────────────────────
 showing 298 devices  
$ saucectl devices list --status available --os-version ">=15" --os ios
 Name                            OS   OS Version  Status    
────────────────────────────────────────────────────────────
 iPhone 12 mini                  IOS  17.7        AVAILABLE 
 iPad Pro 11 2024                IOS  17.6.1      AVAILABLE 
 iPhone 13                       IOS  17.7        AVAILABLE 
────────────────────────────────────────────────────────────
 showing 101 devices                                        

@perf2711 perf2711 added the enhancement New feature or request label Mar 31, 2025
@perf2711 perf2711 self-assigned this Mar 31, 2025
@perf2711 perf2711 requested a review from a team as a code owner March 31, 2025 12:34
@perf2711
Copy link
Contributor Author

If there should be more columns included for devices, let me know.

@perf2711 perf2711 merged commit c9b2707 into main Apr 1, 2025
17 checks passed
@perf2711 perf2711 deleted the feat/INT-83/cmd-get-devices branch April 1, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants