Devicebase Mobile, Desktop & Browser AI Automation Tasks: Devicebase CLI Command Reference for Agents

Introduction

When building AI Agents or automation scripts, common requirements include clicking, typing on real devices, filling forms and scraping data in browsers, or operating applications on remote desktops. If you check documentation on the fly in every conversation, it is easy to miss -s, treat HTTP 200 as a successful operation, or occupy quota on cloud browsers without confirmation. Below is an introduction to Devicebase Mobile, Computer, and Browser AI Automation Tasks on SkillHub (coordinate @user_6620acfe/devicebase, version 1.0.5): it organizes the Devicebase CLI command tree, environment variables, and troubleshooting points into a reference that Agents can follow directly, rather than replacing the CLI itself.

What is this

One-sentence positioning: Devicebase CLI Command Reference Skill, for large models to select the correct subcommands and parameters when they need to control remote devices.

  • Origin and Distribution: Community published (community), publisher user_6620acfe; SkillHub category is ai-agent, tag requires_api_key=true.
  • Problems Solved: Unifies how to drive three types of remote devices via CLI — mobile (Android / HarmonyOS / iOS), browser (Chrome / Chromium / Edge via CDP), and computer (macOS / Windows / Linux), covering account queries, sign-in for credits, cloud browser lifecycle, and common error diagnosis.

The Devicebase platform provides device control APIs; this Skill focuses on “how an Agent should issue commands,” and the API Key needs to be obtained from devicebase.cn.

Core Features

The following capabilities come from the embedded SKILL.md description within the Skill and can be verified against the command tree.

Devices and Command Structure

Platform Coverage -s / --serialno Meaning
mobile Android, HarmonyOS, iOS Device serial number (adb / hdc / ios)
browser Chrome / Chromium / Edge (CDP) Serial number of registered browser devices
computer Desktop systems Serial number of registered computer devices

Top-level structure schematic:

devicebase
├── list-devices        # Discover devices, no -s required
├── mobile ...          # Mobile operations
├── browser ...         # Browser operations; create/delete/status/quota no -s
├── computer ...        # Desktop operations
└── user                # Account: info, checkin, no -s

Scale of leaf commands (for assessing coverage): mobile 18, browser 26, computer 16, plus 2 under list-devices and user. Capabilities include tap, swipe, text input, DOM automation, keyboard/mouse, start/stop apps, Shell, screenshot, UI hierarchy (dump-hierarchy), etc.

Device Discovery and Cloud Browsers

  1. First use devicebase list-devices to get the serialno; filtering is possible by --type, --state, --keyword.
  2. Except for browser create|delete|status|quota and user subcommands, platform commands must include -s; missing it will result in an error prompting to run list-devices --type browser first, etc.
  3. Cloud Browsers: browser create asynchronously creates instances on the platform cluster (headless by default), occupying account quota; delete is irreversible. The Skill explicitly requires: automatic create/delete is not allowed without user consent.

Account and Sign-in

  • devicebase user info: Username, phone, credits credits, can_checkin, etc.
  • devicebase user checkin: Claim credits daily (25 on the first day, increasing with consecutive checks, up to a limit of 95); repeated execution on the same day returns already_checked: true, suitable for scheduled tasks like cron, but the Skill requires the user to decide whether to configure automatic sign-in.

Agent Integration Points

  • On success, stdout is a JSON envelope (code / message / data); business failure might still be HTTP 200, so you must check the code inside the envelope, not just the HTTP status.
  • Vision models often return 0–1000 normalized coordinates, which must be converted by screen width and height before tap, otherwise the tap will be off-center.
  • browser execute and bash on each platform are high-privilege operations and should be used cautiously according to the “Danger Level” in the Skill.

Installation and Activation

Installing Devicebase CLI

Linux / macOS (Official Skill installation script):

which devicebase || curl -fsSL https://downloads.devicebase.cn/cli/install.sh | bash

Windows:

powershell -c "irm https://downloads.devicebase.cn/cli/install.ps1 | iex"

Environment Variables

Variable Required Description
DEVICEBASE_API_KEY Yes Bearer authentication; CLI won’t send requests if not set
DEVICEBASE_BASE_URL No Default https://api.devicebase.cn

The Skill requires Agents to check the environment first before asking the user for the Key: current shell, profile files like ~/.zshrc / ~/.bashrc, and the env block in Claude Code’s ~/.claude/settings.json; the Key provided by the user should be written to the global environment and exported in the current session, and should not be written to the repository or logs.

One-off execution example:

DEVICEBASE_API_KEY=your_api_key devicebase list-devices

Enabling this Skill on SkillHub

  • Skill page: https://www.skillhub.cn/skills/user_6620acfe/devicebase
  • API coordinate: https://api.skillhub.cn/user_6620acfe/devicebase

In tools that support SkillHub / SKILL.md such as Cursor, Claude Code, etc., simply add @user_6620acfe/devicebase to the project or user Skill list according to their respective documentation; this Skill’s body does not distinguish installation differences for various IDEs, so steps not appearing in the documentation are not elaborated here.

Typical Usage

After the above environment and discovery steps, you can chain the following commands by scenario (replace <serialno> with the result of list-devices).

1. List devices and drive a mobile phone

devicebase list-devices --type mobile --state free
devicebase mobile -s <serialno> launch-app com.android.settings
devicebase mobile -s <serialno> tap 540,500
devicebase mobile -s <serialno> input "Wi-Fi"

2. Browser login flow (CSS selectors)

devicebase list-devices --type browser
devicebase browser -s <serialno> navigate https://example.com/login
devicebase browser -s <serialno> fill "#username" "myuser"
echo "$PASSWORD" | devicebase browser -s <serialno> input
devicebase browser -s <serialno> click "button[type=submit]"
devicebase browser -s <serialno> exists ".dashboard"

3. When no browser is available: Create a cloud browser after user confirmation

devicebase browser quota
devicebase browser create --name my-browser
devicebase browser -s db-mtabc123 navigate https://example.com
# Execute only after explicit user request
devicebase browser delete db-mtabc123

4. Desktop automation snippets

devicebase computer -s <serialno> launch-app "Visual Studio Code"
devicebase computer -s <serialno> wait 3000
devicebase computer -s <serialno> hotkey Meta s

5. Conditional judgment and screenshot troubleshooting

if devicebase mobile -s <serialno> launch-app com.example.app; then
  echo "App launched successfully"
else
  devicebase mobile -s <serialno> screenshot -o /tmp/error.jpg
  exit 1
fi

6. Account and Sign-in

devicebase user info
devicebase user checkin

You can view details of each subcommand by running devicebase --help and devicebase mobile --help, etc.; this is consistent with the main body of this Skill.

Applicable Scenarios and Notes

Who is this for

  • Building Agents or CI pipelines that span mobile, browser, and desktop, and need a command cheat sheet aligned with the CLI.
  • Wanting to automatically handle business/gateway double-layer errors like HTTP 401, missing --serialno, and coordinate format errors in conversations.
  • Need to standardize API Key persistence, cloud browser quota, and sign-in scheduling patterns.

Limitations and Pitfalls

  • Must hold a valid DEVICEBASE_API_KEY; 401 errors are mostly due to missing or invalid Keys.
  • Creating a cloud browser consumes quota, and deletion is irreversible; do not confuse this with browser close (which only stops CDP).
  • Coordinates are uniformly comma-separated integers; computer wait unit is milliseconds, bash --timeout unit is seconds.
  • Screenshots are JPEG by default; CLI will give a warning if the extension does not match the actual format.
  • SkillHub statistics (based on scraped data): Rating 100000, downloaded 846 times; installation count shows as 0 on the page, please refer to SkillHub’s real-time data.

Conclusion

Devicebase Mobile, Computer, and Browser AI Automation Tasks compiles the Devicebase CLI for the three types of devices and accounts into a reference that Agents can execute: taking serialno from list-devices, issuing commands according to the platform, and observing the usage boundaries of cloud browsers and API Keys. When you need to consult or install, please use the official entry points: https://www.skillhub.cn/skills/user_6620acfe/devicebase and https://api.skillhub.cn/user_6620acfe/devicebase.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye