@appcircle/cli
v2.3.1
Published
CLI tool for running Appcircle services from the command line
Downloads
134
Readme
Appcircle Command Line Interface
Appcircle CLI is a unified tool for accessing the Appcircle platform features from the command line.
Table of Contents
- Table of Contents
- Installation Instructions
- Usage Guidelines
- Environment Variables
- Interactive Mode
- Logging Requests
- Guides and Tutorials
- Migration Guides
Installation Instructions
To install Appcircle CLI globally, simply launch:
npm install -g @appcircle/cli
alternatively, you can install Appcircle CLI locally:
npm install @appcircle/cli
Usage Guidelines
To get started :
Follow the installation instructions
Simply launch the command on your Terminal/Command Line
appcircle
If you have installed it locally, you should run
npx appcircle
Set any needed environment variables.
If you are using a self-signed SSL certificate on a self-hosted Appcircle server, trust the SSL certificate of the server to ensure secure communication between the CLI and the server.
Authenticate into your Appcircle account.
Below is the list of commands currently supported by Appcircle CLI:
Core Commands
Run appcircle [commandName] --help
to view a list of commands/subcommands in your terminal.
- appcircle config
- appcircle login
- appcircle build
- appcircle signing-identity
- appcircle testing-distribution
- appcircle publish
- appcircle enterprise-app-store
- appcircle organization
The commands follow this pattern:
appcircle <command> <subcommand> ... <subcommand> [options]
- Run
appcircle (-i, --interactive)
to proceed with the Appcircle GUI
JSON Output
To receive the command outputs in JSON format, append the following to the end of the command:
appcircle <command> <subcommand> ... <subcommand> [options] -o json
Environment Variables
AC_ACCESS_TOKEN
: An authentication token for API requests. Setting this avoids being prompted to authenticate and overrides any previously stored credentials. Can be set in the config withappcircle config set AUTH_HOSTNAME xxxxxx
API_HOSTNAME
: Specifies the host where the API endpoint is located. See also for more details.AUTH_HOSTNAME
: Specifies the host where your IAM (identity access management) server endpoint is located. See also for more details.
Interactive Mode
Appcircle CLI incorporates a GUI that allows users to interactively access its features. To view all features in interactive mode, execute the following command:
appcircle -i
Demo
Logging Requests
If you want to log the requests as curl
commands you can start appcircle CLI by setting the CURL_LOGGING
environment variable.
Example:
CURL_LOGGING= appcircle
Guides and Tutorials
Configuring Your Appcircle CLI Environment
Using the Appcircle CLI, add your custom configuration for self-hosted Appcircle
appcircle config add self_env appcircle config set API_HOSTNAME https://api.your.appcircle.io appcircle config set AUTH_HOSTNAME https://auth.your.appcircle.io
Change current configuration enviroment using
appcircle config current self_env
Set all these settings via interactive mode
appcircle -i
Print help of config command
appcircle config -h
Trusting Your Self-Hosted Appcircle Certificate
After you configure the Appcircle CLI, you can run the the command below to trust SSL certificate.
appcircle config trust
This command will try to extract the SSL certificate from the API_HOSTNAME host and make it trusted on your computer.
For detailed usage, please refer to the Trusting SSL Certificate documentation.
Connecting Your Appcircle Account via CLI
- Generate a personal access token from the Appcircle dashboard
- Using the Appcircle CLI, create a full access API token using the following command with the personal access token specified as "pat":
appcircle login --pat="YOUR PERSONAL ACCESS TOKEN"
.
Your token will be stored internally. You should always revoke your access token if you do not plan to use it in the future.
Starting a New Build via the Appcircle CLI
Add a build profile and connect a repository
Get the build profile ID using
appcircle build profile list
Get the workflows of that build profile
appcircle build profile workflows --profileId="YOUR PROFILE ID"
Start a new build using
appcircle build start --profileId="YOUR PROFILE ID" --branch="YOUR BRANCH" --workflow="YOUR WORKFLOW ID"
Distributing an App via the Appcircle CLI
- Create a distribution profile and share with the testers
- Enable auto sending of the build to the testers
- Get the distribution profile ID using
appcircle testing-distribution profile list
- Upload your app binary to the selected distribution profile using
appcircle testing-distribution upload --app="YOUR APP PATH" --profileId="YOUR PROFILE ID" --message="YOUR RELEASE NOTES"