How to start the Appium server from command prompt in MAC machine?

I am automating ios native mobile application using appium. Until now I was launching the server from the Appium GUI by clicking on the Launch button. Now I want to start the server from a command prompt.

I was able to do the same in Windows machine by following the below steps:

  1. Launch Node.js command prompt
  2. Navigate till the Appium bin folder
  3. Use the command node appium

I got blocked on how to start the Node.js command prompt on a Mac. Can you pleases tell me how I can start the Appium server from a command prompt on a Mac.


if you used npm install -g appium then you should be able to directly open one with the command

appium //plus any server args you want ex: appium -p 4474 

Or you can still navigate to the folder of your node_modules and into appium and go with

node. //plus any server args you want

if you want to have additional server flags, all are available at their site with documentations.

/Applications/ /Applications/ --address --chromedriver-port 9516 --bootstrap-port 4725 --no-reset --local-timezone --command-timeout 7200 --session-override --debug-log-spacing --platform-version 9.0 --platform-name iOS --app /Users/chennareddy/u/apps/TestApp/build/release-iphonesimulator/Handstand/ --show-ios-log --device-name iPhone-6s --native-instruments-lib --orientation Portrait

Open the terminal and type in the following command

appium --address --port 4723 

Press enter then it will register itself to and will listen 4723 port. You can extend this command by adding app type etc.

Hope this will help you


To start appium in MAC, all you need to do is to type => appium & in the terminal application. In order for the above command to work, you have to install appium in terminal mode. However there are 2 ways of doing it, one is with HomeBrew and the other directly with Node.js . You can find the tutorial of installing HomeBrew online. Follow the steps below to install it directly with node.js -

  1. Go to
  2. Download and install the latest stable version of node.js package in your mac
  3. Now open the terminal application
  4. Run the following command => npm install -g appium
  5. This should install Appium in your system with global privileges. After installation of appium, you can run the command => appium-doctor in the same terminal window to verify if everything is installed properly.
  6. If everything is in green ticks, run => appium & to start the appium server

Hope this helped.

As other answers points out, if you have installed Appium thru terminal then simply type appium & on a terminal window to start appium server. Here all you need to know, how to install appium thru terminal. 1. Install Homebrew.

ruby -e "$(curl -fsSL"

2. Give Following commands one by one to install appium

brew install node      # get node.js
npm install -g appium  # get appium
npm install wd         # get appium client
appium &               # start appium

You can find refer to step by guide for appium download osx here.

String tellCommand = "tell application \"Terminal\" to do script \"/usr/bin/node_modules/appium/bin/appium.js";
        String parameters = " -p "+port;
        parameters += " "+ (fullReset ? "--full-reset" : "--no-reset")+"\"";
        tellCommand += parameters;

        String[] command = { "osascript", "-e",
        tellCommand };

        ProcessBuilder pBuilder = new ProcessBuilder(command);

Try this to launch your appium server programmatically for mac os, it includes automating the webkit debug proxy as well which is needed for debugging.

    //customize the below in start server method
//Webkit Proxy command

CommandLine iOSProxyCommand = new CommandLine("ios_webkit_debug_proxy");
iOSProxyCommand.addArgument(udid+":27753");//provide your udid of the device
iOSProxyCommand.addArgument("-F");//to disable console output in eclipse

DefaultExecuteResultHandler iOSProxyresultHandler = new DefaultExecuteResultHandler();
DefaultExecutor iOSProxyexecutor = new DefaultExecutor();
try {
iOSProxyexecutor.execute(iOSProxyCommand, iOSProxyresultHandler);
System.out.println("iOS Proxy started.");
} catch (IOException e) {
} catch (InterruptedException e) {

CommandLine command = new CommandLine(
command.addArgument( "/Applications/",
command.addArgument("--address", false);
command.addArgument("--port", false);
command.addArgument("--full-reset", false);
command.addArgument("--log-level", false);//to disable console output in eclipse
command.addArgument("--log", false);
Timestamp currentTimestamp = new java.sql.Timestamp(Calendar.getInstance().getTime().getTime());
DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
DefaultExecutor executor = new DefaultExecutor();
try {
executor.execute(command, resultHandler);
System.out.println("Appium server started.");
} catch (IOException e) {
} catch (InterruptedException e) {

//customize the below in stop appium server-

//kill appium node after end of your execution
String[] command = { "/usr/bin/killall", "-9", "node" };
try {
System.out.println("Appium server stopped.");
} catch (IOException e) {
//Kill webkit proxy for iOS
String[] commandProxy = { "/usr/bin/killall", "-9", "ios_webkit_debug_proxy" };
try {
System.out.println("iOS Webkit proxy stopped");
} catch (IOException e) {

For anybody reading this who happens to be using npm (node/js/typescript), I've created a module called appium-controller that starts and stops appium in the background programmatically (mac or windows). It has an option to pass in a specific port either through a node call to the method or through cli.

  • Install latest Android studio
  • Install Java SDK from :
  • Install Homebrew using
  • Install ruby: /usr/bin/ruby -e "$(curl -fsSL"
  • download installer: run
  • in terminal:
    • brew update
    • brew install node (if permission denied in post install then run "sudo chown -R $(whoami):admin /usr/local/lib/node_modules/“)
    • npm install -g npm
  • Update system preference:
open bash_profile in terminal:
  • nano ~/.bash_profile

    • paste following:
  • export ANDROID_HOME=/Users/jenkinss/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export JAVA_HOME=$(/usr/libexec/java_home)

    • save and exit
  • install Appium UI tool form here:
  • in Terminal install Appium command line:
  • npm install -g appium@1.7.1
npm install wd

  • now fix Appium beta with:
  • cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
  • brew install carthage

  • npm i -g webpack

  • ./Scripts/ -d

  • npm install appium-doctor -g
  • run 'appium-doctor —android’ and fix the JAVA_PATH and ANDROID_PATH issues
  • run 'appium-doctor —ios’
  • install xcode command line tools if not installed : xcode-select —install
  • brew install libimobiledevice —HEAD
  • npm install -g ios-deploy
  • install appium-xcuitest driver : npm i appium-xcuitest-driver
  • Open WebDriverAgent.xcodeproj from /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent and sign the Lib and runner files
  • brew install ios-webkit-debug-proxy
  • got to : /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-xcode/
  • git clone
  • cd WebDriverAgent/
  • ./Scripts/
  • open WebDriverAgent.xcodeproj and sign lib and runner
  • git clone
  • cd ios-webkit-debug-proxy
  • ./
  • make
  • sudo make install (installed in /usr/local/bin/ios_webkit_debug_proxy)

Need Your Help

Reactjs convert to html

javascript jquery ajax reactjs react-jsx

I'm having trouble dealing with facebook's ReactJS. Whenever I do ajax and want to display an html data, ReactJS displays it as text. (See figure below)

Yii CGridView hide filter input only


When using CGridView, the filter input fields are automatically generated by the component.