Skip to content

feat:add start appium inspector from the cli#14932

Merged
wswebcreation merged 12 commits intomainfrom
ws/add-appium-service-global
Dec 23, 2025
Merged

feat:add start appium inspector from the cli#14932
wswebcreation merged 12 commits intomainfrom
ws/add-appium-service-global

Conversation

@wswebcreation
Copy link
Member

@wswebcreation wswebcreation commented Dec 13, 2025

Proposed changes

This pull request introduces a new CLI tool to the wdio-appium-service package, making it easier to start the Appium server and open the Appium Inspector in a browser. The implementation includes robust process management, cross-platform support, and comprehensive tests for the new utilities. The documentation is also updated to guide users on using the new CLI.

The Appium inspector can be started with the new CLI command, start-appium-inspector. It will

  • start the Appium server
  • open the Appium Inspector in the default browser,

and has support for custom ports and all Appium server arguments.

This is how it looks like

npx start-appium-inspector --port=4723                                                                            ─╯
npm warn Unknown project config "shamefully-hoist". This will stop working in the next major version of npm.
⏳ Checking inspector plugin...
🚀 Starting Appium server...
📡 Command: /Users/wimselles/Git/wdio/appium-boilerplate/node_modules/.pnpm/appium@3.1.2/node_modules/appium/index.js server --port=4723 --port=4723 --log-timestamp --use-plugins=inspector --allow-cors
⏳ Waiting for Appium server to be ready...
ℹ️  Press Ctrl+C to stop Appium server and exit


2025-12-17 06:36:45:299 - [Appium] Attempting to load plugin inspector...
2025-12-17 06:36:45:300 - [Appium] Requiring plugin at /Users/wimselles/Git/wdio/appium-boilerplate/node_modules/appium-inspector-plugin/index.mjs
2025-12-17 06:36:45:304 - [Appium] AppiumInspectorPlugin has been successfully loaded in 0.004s
2025-12-17 06:36:45:322 - [Appium] Welcome to Appium v3.1.2 (REV ecee5de5c5981ef6cb68e6103457493e19ec187c)
2025-12-17 06:36:45:323 - [Appium] Non-default server args:
2025-12-17 06:36:45:323 - [Appium] { allowCors: true, logTimestamp: true, usePlugins: [ 'inspector' ] }
2025-12-17 06:36:45:324 - [Appium] The autodetected Appium home path: /Users/wimselles/Git/wdio/appium-boilerplate
2025-12-17 06:36:45:324 - [Appium] Attempting to load driver xcuitest...
2025-12-17 06:36:45:325 - [Appium] Attempting to load driver uiautomator2...
2025-12-17 06:36:45:325 - [Appium] Requiring driver at /Users/wimselles/Git/wdio/appium-boilerplate/node_modules/appium-xcuitest-driver/build/index.js
2025-12-17 06:36:45:463 - [Appium] XCUITestDriver has been successfully loaded in 0.138s
2025-12-17 06:36:45:463 - [Appium] Requiring driver at /Users/wimselles/Git/wdio/appium-boilerplate/node_modules/appium-uiautomator2-driver/build/index.js
2025-12-17 06:36:45:524 - [Appium] AndroidUiautomator2Driver has been successfully loaded in 0.200s
2025-12-17 06:36:45:534 - [Appium] You have enabled CORS requests from any host. Be careful not to visit sites which could maliciously try to start Appium sessions on your machine
2025-12-17 06:36:45:536 - [Appium] Appium REST http interface listener started on http://0.0.0.0:4723
🌐 Opening Appium Inspector in your default browser...
✅ Opened Appium Inspector in your default browser.
2025-12-17 06:36:45:536 - [Appium] You can provide the following URLs in your client code to connect to this server:
        http://127.0.0.1:4723/ (only accessible from the same host)
        http://192.168.1.135:4723/
2025-12-17 06:36:45:536 - [Appium] Available drivers:
2025-12-17 06:36:45:536 - [Appium]   - xcuitest@10.1.4 (automationName 'XCUITest')
2025-12-17 06:36:45:536 - [Appium]   - uiautomator2@5.0.7 (automationName 'UiAutomator2')
2025-12-17 06:36:45:537 - [Appium] Available plugins:
2025-12-17 06:36:45:537 - [Appium]   - inspector@2025.11.1 (ACTIVE)
2025-12-17 06:36:45:681 - [HTTP] --> GET /inspector 
2025-12-17 06:36:45:696 - [HTTP] <-- GET /inspector 304 14 ms - - 
2025-12-17 06:36:45:714 - [HTTP] --> GET /inspector/assets/index-Bt3qyDS5.js 
2025-12-17 06:36:45:728 - [HTTP] --> GET /inspector/assets/index-DgynOtCi.css 
2025-12-17 06:36:45:731 - [HTTP] <-- GET /inspector/assets/index-Bt3qyDS5.js 304 16 ms - - 
2025-12-17 06:36:45:733 - [HTTP] <-- GET /inspector/assets/index-DgynOtCi.css 304 4 ms - - 
2025-12-17 06:36:45:929 - [HTTP] --> GET /inspector/assets/atom-one-dark-DPnaj3qP.css 
2025-12-17 06:36:45:930 - [HTTP] <-- GET /inspector/assets/atom-one-dark-DPnaj3qP.css 304 1 ms - - 
^C
🛑 Stopping Appium server...
2025-12-17 06:36:51:413 - [Appium] Received SIGINT - shutting down
2025-12-17 06:36:51:413 - [AppiumDriver@0359] There are no active sessions for cleanup
2025-12-17 06:36:51:414 - [HTTP] Closing Appium HTTP server
2025-12-17 06:36:51:414 - [HTTP] Appium HTTP server has been successfully closed after 1ms
✅ Appium server stopped successfully

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

//: # (The current main branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against the v8 branch.)

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

Reviewers: @webdriverio/project-committers

@wswebcreation wswebcreation changed the title feat: initial setup of starting appium inspector from the cli feat:add start appium inspector from the clit Dec 13, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 13, 2025

Open in StackBlitz

create-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/create-wdio@14932

eslint-plugin-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/eslint-plugin-wdio@14932

@wdio/allure-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/allure-reporter@14932

@wdio/appium-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/appium-service@14932

@wdio/browser-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browser-runner@14932

@wdio/browserstack-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browserstack-service@14932

@wdio/cli

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cli@14932

@wdio/concise-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/concise-reporter@14932

@wdio/config

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/config@14932

@wdio/cucumber-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cucumber-framework@14932

@wdio/dot-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/dot-reporter@14932

@wdio/firefox-profile-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/firefox-profile-service@14932

@wdio/globals

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/globals@14932

@wdio/jasmine-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/jasmine-framework@14932

@wdio/json-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/json-reporter@14932

@wdio/junit-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/junit-reporter@14932

@wdio/lighthouse-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/lighthouse-service@14932

@wdio/local-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/local-runner@14932

@wdio/logger

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/logger@14932

@wdio/mocha-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/mocha-framework@14932

@wdio/protocols

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/protocols@14932

@wdio/repl

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/repl@14932

@wdio/reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/reporter@14932

@wdio/runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/runner@14932

@wdio/sauce-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sauce-service@14932

@wdio/shared-store-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/shared-store-service@14932

@wdio/smoke-test-cjs-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-cjs-service@14932

@wdio/smoke-test-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-reporter@14932

@wdio/smoke-test-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-service@14932

@wdio/spec-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/spec-reporter@14932

@wdio/static-server-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/static-server-service@14932

@wdio/sumologic-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sumologic-reporter@14932

@wdio/testingbot-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/testingbot-service@14932

@wdio/types

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/types@14932

@wdio/utils

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/utils@14932

@wdio/webdriver-mock-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/webdriver-mock-service@14932

@wdio/xvfb

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/xvfb@14932

webdriver

npm i https://pkg.pr.new/webdriverio/webdriverio/webdriver@14932

webdriverio

npm i https://pkg.pr.new/webdriverio/webdriverio@14932

commit: b2fb082

@wswebcreation wswebcreation changed the title feat:add start appium inspector from the clit feat:add start appium inspector from the cli Dec 13, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces a new CLI tool start-appium-inspector to the wdio-appium-service package, enabling users to quickly start an Appium server and open the Appium Inspector in their browser. The implementation includes comprehensive utility functions for cross-platform process management, extensive test coverage, and clear documentation.

Key Changes

  • Added CLI command start-appium-inspector with support for custom ports and Appium server arguments
  • Implemented robust process lifecycle management with proper cleanup on exit signals (SIGINT/SIGTERM)
  • Provided cross-platform browser opening support (macOS, Windows, Linux)

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
package.json Added bin entry for the CLI command and exports configuration for the new CLI module
bin/start-appium-inspector.js Entry point script that invokes the CLI with error handling
src/cli.ts Main CLI logic handling argument parsing, Appium startup, browser opening, and cleanup
src/cli-utils.ts Utility functions for port extraction, Appium resolution, process spawning, and browser opening
tests/cli.test.ts Comprehensive test suite for CLI functionality including signal handling and error scenarios
tests/cli-utils.test.ts Extensive tests for utility functions covering edge cases and platform-specific behavior
README.md Documentation for the new CLI command with usage examples and prerequisites

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@eglitise
Copy link
Contributor

Nice idea 👍

I would just like to add that the https://inspector.appiumpro.com/ site is hosted by HeadSpin, and maintenance of this site is done by the Appium team members who work there. However, as of right now, nobody from the Appium team works at HeadSpin anymore, which is why the hosted Inspector version is out-of-date, and is unlikely to be updated.
We are exploring the solution of hosting the Inspector under appium.io, but no specific plans yet.

In the meantime I could suggest the option of integrating the Inspector's Appium plugin version. You can check the documentation here: https://appium.github.io/appium-inspector/latest/quickstart/installation/#appium-plugin

@wswebcreation
Copy link
Member Author

Hi @eglitise

Thanks, I'll do that and will move the PR to in draft. Thanks. I missed that memo 😅

@wswebcreation wswebcreation marked this pull request as draft December 16, 2025 12:55
@wswebcreation wswebcreation marked this pull request as ready for review December 17, 2025 06:30
@wswebcreation
Copy link
Member Author

@eglitise

I've changed it, WDYT now?

@wswebcreation wswebcreation added PR: New Feature 🚀 PRs that contain new features PR: Polish 💅 PRs that contain improvements on existing features labels Dec 18, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


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

Copy link
Member

@erwinheitzman erwinheitzman left a comment

Choose a reason for hiding this comment

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

I didn't go through everything yet but have left some feedback @wswebcreation 🙂

@wswebcreation
Copy link
Member Author

I didn't go through everything yet but have left some feedback @wswebcreation 🙂

Np @erwinheitzman , already appreciate that you took the time. I've fixed the last things, maybe we can merge it now and release it

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@wswebcreation wswebcreation merged commit a3069d5 into main Dec 23, 2025
33 of 36 checks passed
@wswebcreation wswebcreation deleted the ws/add-appium-service-global branch December 23, 2025 07:06
mccmrunal added a commit to mccmrunal/webdriverio that referenced this pull request Dec 23, 2025
@mccmrunal mccmrunal mentioned this pull request Dec 23, 2025
13 tasks
christian-bromann pushed a commit that referenced this pull request Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: New Feature 🚀 PRs that contain new features PR: Polish 💅 PRs that contain improvements on existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants