Command Line Interface (CLI) Documentation
App Center command line interface is a unified tool for running App Center services from the command line. Our aim is to offer a concise and powerful tool for our developers to use App Center services and easily script a sequence of commands that they'd like to execute. You can currently login and view/configure all the apps that you have access to in App Center.
Although our current feature set is minimal, all the existing App Center services will be added going forward. Note that the App Center CLI is currently in public preview.
To get more information on CLI installation and currently supported commands, please refer to App Center CLI GitHub repo.
Getting Started
Pre-requisites
App Center CLI requires Node.js version 8 or better.
Installation
Open a terminal/command prompt, and run npm install -g appcenter-cli
.
Logging in
- Open a terminal/command window.
- Run
appcenter login
. This will open a browser and generate a newAPI token
. - Copy the
API token
from the browser, and paste this into the command window. - The command window will display
Logged in as {user-name}
. - Congratulations! You are successfully logged in and can run CLI commands.
There are two ways to use App Center CLI commands without running appcenter login
prior:
Using the --token
parameter:
- Create a
Full Access
API token (See steps 1-5). - Open a terminal/command window.
- Add the
--token
switch to the CLI command you are running. For example, runappcenter apps list --token {API-token}
to get a list of your configured applications.
Using the APPCENTER_ACCESS_TOKEN
environment variable:
You can set the APPCENTER_ACCESS_TOKEN
environment variable with your API token. This will work without having to append the --token
switch to each CLI command.
Running your first CLI command
- Open a terminal/command window.
- Run
appcenter
to see a list of CLI commands. - Run
appcenter profile list
to get the information about logged in user.
For more details on a list of CLI commands, please refer to App Center CLI GitHub repo.
A note about using the --app
parameter:
Due to restrictions in how app name parsing is done, application names must not begin with hyphens or other ambigious characters that may confuse GNU style parsers. You can read more about this in the associated CLI issue.
Atsiliepimai
Įkeliamas atsiliepimas...