Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update master #24

Merged
merged 46 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
972c352
add cli methods for publish
BrkYld Apr 6, 2024
60b9ac0
fix conflict
BrkYld Apr 6, 2024
d6d9fe2
Merge branch 'develop' into feat/BE-3059
Alnyli07 Apr 7, 2024
df64376
fix(commands): publish commands
Alnyli07 Apr 7, 2024
87af9e3
fix/review fix
BrkYld Apr 7, 2024
8d472f7
1.3.0-beta.1
BrkYld Apr 7, 2024
438a9e3
add platform control for cli runner
BrkYld Apr 7, 2024
63c779a
Merge pull request #19 from appcircleio/feat/BE-3059
Alnyli07 Apr 7, 2024
131bca8
1.3.0
Alnyli07 Apr 7, 2024
e6001ec
fix(organization): undefined roles filtering
Alnyli07 Apr 16, 2024
6c149c3
1.3.1-beta.1
Alnyli07 Apr 16, 2024
f181b8a
fix(organizaiton): invalid role handling
Alnyli07 Apr 16, 2024
6ea3b42
1.3.1-beta.2
Alnyli07 Apr 16, 2024
aaad724
Merge pull request #20 from appcircleio/bugfix/BE-3099
Alnyli07 Apr 17, 2024
952df98
1.3.1
Alnyli07 Apr 17, 2024
8db1bca
update cli commands
BrkYld Apr 18, 2024
6278dc6
fix/workflow service response parsing error
BrkYld Apr 18, 2024
7548f7a
init docs
BrkYld Apr 18, 2024
e758acc
fix/BE-3143
BrkYld Apr 18, 2024
e7e23e9
Merge pull request #21 from appcircleio/fix/BE-3143
Alnyli07 Apr 18, 2024
fc9bcce
1.3.2
Alnyli07 Apr 18, 2024
4349671
add specific comment docs
BrkYld Apr 18, 2024
3e53df8
fix/BE-3149
BrkYld Apr 18, 2024
41afc47
Merge pull request #22 from appcircleio/fix/BE-3149
Alnyli07 Apr 18, 2024
2278d92
1.3.3
Alnyli07 Apr 18, 2024
7df12f7
add docs for cli comments1
BrkYld Apr 21, 2024
5c8627e
Merge branch 'develop' into feat/appcircle-cli-doc
BrkYld Apr 21, 2024
6f95c24
fix/workflow bugs
BrkYld Apr 21, 2024
5c603cb
fix terminology of some cli commands1
BrkYld Apr 21, 2024
6f3cbfa
fix/sort commands by appcircle ui
BrkYld Apr 22, 2024
3e89022
feat/BE-3155
BrkYld Apr 22, 2024
e4f6627
fix/build error
BrkYld Apr 22, 2024
e97530b
fix/doc review notes
BrkYld Apr 22, 2024
c0090d7
fix/readme.md
BrkYld Apr 22, 2024
9a85adc
2.0.0-beta.1
BrkYld Apr 22, 2024
9aef249
fix/readme.md
BrkYld Apr 22, 2024
142025b
add migration guide doc
BrkYld Apr 22, 2024
bbd1aad
fix/remove not user-friendly error message
BrkYld Apr 22, 2024
baded73
add new parameter type to commands
BrkYld Apr 22, 2024
c0c172f
fix/readme.md
BrkYld Apr 24, 2024
c982502
fix/readme.md
BrkYld Apr 24, 2024
93d4dc8
fix/migration document title
BrkYld Apr 24, 2024
cd30694
fix/migration document title
BrkYld Apr 24, 2024
0203d80
Merge pull request #23 from appcircleio/feat/appcircle-cli-doc
Alnyli07 Apr 24, 2024
2b9dac4
2.0.0
Alnyli07 Apr 24, 2024
dd87cac
fix links in Readme.md
BrkYld Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 98 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@

Appcircle CLI is a unified tool for accessing the Appcircle platform features from the command line.

# Installation
## Table of Contents

- [Table of Contents](#table-of-contents)
- [Installation Instructions](#installation-instructions)
- [Usage Guidelines](#usage-guidelines)
- [Command List](#core-commands)
- [Environment Variables](#environment-variables)
- [Interactive Mode](#interactive-mode)
- [Logging Requests](#logging-requests)
- [Guides and Tutorials](#guides-and-tutorials)
- [Configuring Your Appcircle CLI Environment](#configuring-your-appcircle-cli-environment)
- [Trusting Your Self-Hosted Appcircle Certificate](#trusting-your-self-hosted-appcircle-certificate)
- [Connecting Your Appcircle Account via CLI](#connecting-your-appcircle-account-via-cli)
- [Starting a New Build via the Appcircle CLI](#starting-a-new-build-via-the-appcircle-cli)
- [Distributing an App via the Appcircle CLI](#distributing-an-app-via-the-appcircle-cli)
- [How to Contribute](#how-to-contribute)
- [Publishing Guidelines](#publishing-guidelines)
- [Jenkins Pipeline](#jenkins-pipeline)
- [Docker Image](#docker-image)
- [Migration Guides](#migration-guides)

## Installation Instructions

To install Appcircle CLI globally, simply launch:

Expand All @@ -18,50 +39,72 @@ alternatively, you can install Appcircle CLI locally:
npm install @appcircle/cli
```

# Usage & Commands
## Usage Guidelines

Simply launch the command on your Terminal/Command Line
To get started :

1. Follow the [installation instructions](#installation-instructions)

2. Simply launch the command on your Terminal/Command Line

```
appcircle
```

> If you have installed it locally, you should run `npx appcircle`

3. Set any needed [environment variables](#how-to-configure-your-appcircle-cli-environment).

4. If you are using a self-signed SSL certificate on a self-hosted Appcircle server, [trust the SSL certificate](#trusting-your-self-hosted-appcircle-certificate) of the server to ensure secure communication between the CLI and the server.

5. [Authenticate](https://docs.appcircle.io/appcircle-api/api-authentication) into your Appcircle account.



Below is the list of commands currently supported by Appcircle CLI:

| Command | Description |
| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| `appcircle (-i, --interactive)` | AppCircle GUI |
| `appcircle help [commandName]` | Display help for command |
| `appcircle config <subcommand> [argument] [options]` | View and edit Appcircle CLI properties |
| `appcircle login [--pat]` | Get an access token for the session |
| `appcircle organization <subcommand> [action] [options]` | Manage organization users, roles, and details |
| `appcircle listBuildProfiles` | Get the list of build profiles |
| `appcircle listDistributionProfiles` | Get the list of distribution profiles |
| `appcircle listBuildProfileWorkflows [--profileId]` | Get the list of workflows for the profile |
| `appcircle listBuildProfileConfigurations [--profileId]` | Get the list of configurations for the profile |
| `appcircle listBuildProfileBuildsOfCommit [--profileId]` | Get the list of commits of branch |
| `appcircle listBuildProfileBuildsOfCommit [--profileId]` | Get the list of builds of a commit |
| `appcircle build [--profileId] [--branch] [--workflow]` | Start a new build |
| `appcircle download [--path] [--commitId] [--buildId]` | Download the artifact under the selected path |
| `appcircle upload [--app] [--message] [--profileId]` | Upload your app binary to selected distribution profile |
| `appcircle createDistributionProfile [--name]` | Create a distribution profile |
| `appcircle listEnvironmentVariableGroups` | Get list of environment variable groups |
| `appcircle createEnvironmentVariableGroup [--name]` | Create an environment variable group |
| `appcircle listEnvironmentVariables [--variableGroupId]` | Get list of environment variables |
| `appcircle createEnvironmentVariable [--type] [-isSecret, --isSecret] [--variableGroupId] [--key] [--value] [--filePath]` | Create a file or text environment variable |
| `appcircle listEnterpriseProfiles` | List Enterprise profiles |
| `appcircle listEnterpriseAppVersions [--entProfileId] [--publishType]` | List Enterprise app versions |
| `appcircle publishEnterpriseAppVersion [--entProfileId] [--entVersionId] [--entVersionId] [--summary] [--releaseNotes] [--publishType]` | Publish Enterprise app version |
| `appcircle publishEnterpriseAppVersion [--entProfileId] [--entVersionId]` | Unpublish Enterprise app version |
| `appcircle removeEnterpriseAppVersion [--entProfileId] [--entVersionId]` | Remove Enterprise app version |
| `appcircle notifyEnterpriseAppVersion [--entProfileId] [--entVersionId] [--subject] [--message]` | Notify Enterprise app version |
| `appcircle uploadEnterpriseApp [--app] ` | Upload Enterprise app version without a profile |
| `appcircle uploadEnterpriseAppVersion [--entProfileId] [--app] ` | Upload enterprise app version for a profile |
| `appcircle getEnterpriseDownloadLink [--entProfileId] [--entVersionId]` | Get enterprise app download link |

## Logging requests
### Core Commands

Run `appcircle [commandName] --help` to view a list of commands/subcommands in your terminal.

- [appcircle config](/docs/config/index.md)
- [appcircle login](/docs/login/index.md)
- [appcircle build](/docs/build/index.md)
- [appcircle distribution](/docs/distribution/index.md)
- [appcircle publish](/docs/publish/index.md)
- [appcircle enterprise-app-store](/docs/enterprise-app-store/index.md)
- [appcircle organization](/docs/organization/index.md)

The commands follow this pattern:

```shell
appcircle <command> <subcommand> ... <subcommand> [options]
```

- Run `appcircle (-i, --interactive)` to proceed with the Appcircle GUI


## 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 with `appcircle config set AUTH_HOSTNAME xxxxxx`

- `API_HOSTNAME`: Specifies the host where the API endpoint is located. [See also](#how-to-configure-your-appcircle-cli-environment) for more details.

- `AUTH_HOSTNAME`: Specifies the host where your IAM (identity access management) server endpoint is located. [See also](#how-to-configure-your-appcircle-cli-environment) 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
![Demo](https://cdn.appcircle.io/docs/assets/appcircle_gui_demo.gif)

## Logging Requests

If you want to log the requests as `curl` commands you can start appcircle CLI by setting the `CURL_LOGGING` environment variable.

Expand All @@ -71,19 +114,21 @@ Example:
CURL_LOGGING= appcircle
```

## How to Configure your Appcircle CLI environment?
## 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 default`
- 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`

## How to Trust your Self-Hosted Appcircle Certificate?
### Trusting Your Self-Hosted Appcircle Certificate

- After you configure the Appcircle CLI, you can run the the command below to trust SSL certificate.

Expand All @@ -93,37 +138,37 @@ CURL_LOGGING= appcircle

- For detailed usage, please refer to the [Trusting SSL Certificate](https://docs.appcircle.io/self-hosted-appcircle/configure-server/appcircle-cli#trusting-the-ssl-certificate-recommended) documentation.

## How to Connect your Appcircle Account within CLI?
### Connecting Your Appcircle Account via CLI

- [Generate a personal access token from the Appcircle dashboard](/appcircle-api/api-authentication)
- [Generate a personal access token from the Appcircle dashboard](https://docs.appcircle.io/appcircle-api/api-authentication#generatingmanaging-the-personal-api-tokens)
- 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.

## How to start a new build via the Appcircle CLI?
### Starting a New Build via the Appcircle CLI

- Add a build profile and [connect a repository](https://docs.appcircle.io/build/adding-a-build-profile#connect-your-repository)

- Get the build profile ID using `appcircle listBuildProfiles`
- Get the workflows of that build profile `appcircle listBuildProfileWorkflows --profileId="YOUR PROFILE ID"`
- Start a new build using `appcircle build --profileId="YOUR PROFILE ID" --branch="YOUR BRANCH" --workflow="YOUR WORKFLOW ID"`
- 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"`

## How to distribute an app via the Appcircle CLI?
### Distributing an App via the Appcircle CLI

- Create a distribution profile and [share with the testers](https://docs.appcircle.io/distribute/create-or-select-a-distribution-profile)
- Enable [auto sending](https://docs.appcircle.io/distribute/create-or-select-a-distribution-profile#auto-send-your-build-to-the-testers) of the build to the testers
- Get the distribution profile ID using `appcircle listDistributionProfiles`
- Get the distribution profile ID using `appcircle distribution profile list`
- Upload your app binary to the selected distribution profile using `appcircle upload --app="YOUR APP PATH" --profileId="YOUR PROFILE ID" --message="YOUR RELEASE NOTES"`

# Contribution
## How to Contribute

- Clone this repository
- Install dependencies by using `yarn` command
- Launch `yarn run watch` to compile & open the project on watch mode
- Make your changes
- Submit a PR

# Publishing
## Publishing Guidelines

- After changes, run the command `yarn run postversion`. It will push a new tag to the repository.
- Jenkins will take care of the rest.
Expand All @@ -140,7 +185,7 @@ CURL_LOGGING= appcircle

- If the tag is `v*-alpha*`, the app will be published to the alpha channel.

# Docker Image
## Docker Image

- Docker image is for building and publishing the application anywhere.

Expand All @@ -157,3 +202,7 @@ docker run --rm --env NPM_AUTH_TOKEN=abcd ac-cli npm publish --tag beta
docker image build -t ac-cli --build-arg NPM_AUTH_TOKEN=abcd .
docker run --rm --env NPM_AUTH_TOKEN=abcd ac-cli npm publish
```

## Migration Guides

- [1.x to 2.x](docs/migration-guides/1.x-to-2.x.md)
13 changes: 13 additions & 0 deletions docs/build/active-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `appcircle build active-list`

Get a list of active builds in the queue.

```plaintext
appcircle build active-list [options]
```

## Options inherited from parent commands

```plaintext
--help Show help for command
```
22 changes: 22 additions & 0 deletions docs/build/download.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# `appcircle build download`

Download your artifact to the given directory on your machine.

```plaintext
appcircle build download [options]
```

## Options

```plaintext
--path <string> [OPTIONAL] The path for artifacts to be downloaded. Defaults to the current directory

--commitId <uuid> Commit ID of your build

--buildId <uuid> Build ID
```
## Options inherited from parent commands

```plaintext
--help Show help for command
```
24 changes: 24 additions & 0 deletions docs/build/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# `appcircle build`

Manage build actions.

```plaintext
appcircle build [command] [options]
```

## Options inherited from parent commands

```plaintext
--help Show help for command
```

## Subcommands

- [`start`](start.md)
- [`active-list`](active-list.md)
- [`list`](list.md)
- [`view`](view.md)
- [`download`](download.md)
- [`profile`](profile/index.md)
- [`variable`](variable/index.md)

18 changes: 18 additions & 0 deletions docs/build/list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# `appcircle build list`

Get list of builds of a commit.

```plaintext
appcircle build list [options]
```

## Options

```plaintext
--commitId <uuid> Commit ID
```
## Options inherited from parent commands

```plaintext
--help Show help for command
```
19 changes: 19 additions & 0 deletions docs/build/profile/branch/commits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# `appcircle build profile branch commits`

Get list of commits of a branch

```plaintext
appcircle build profile branch commits [options]
```

## Options

```plaintext
--branchId <uuid> Branch ID
```

## Options inherited from parent commands

```plaintext
--help Show help for command
```
19 changes: 19 additions & 0 deletions docs/build/profile/branch/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# `appcircle build profile branch`

Manage branches of a build profile.

```plaintext
appcircle build profile branch [command] [options]
```

## Options inherited from parent commands

```plaintext
--help Show help for command
```

## Subcommands

- [`list`](list.md)
- [`commits`](commits.md)

19 changes: 19 additions & 0 deletions docs/build/profile/branch/list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# `appcircle build profile branch list`

Get list of branches of a build profile

```plaintext
appcircle build profile branch list [options]
```

## Options

```plaintext
--profileId <uuid> Build profile ID
```

## Options inherited from parent commands

```plaintext
--help Show help for command
```
19 changes: 19 additions & 0 deletions docs/build/profile/configurations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# `appcircle build profile configurations`

Get list of configurations of a build profile

```plaintext
appcircle build profile configurations [options]
```

## Options

```plaintext
--profileId <uuid> Build profile ID
```

## Options inherited from parent commands

```plaintext
--help Show help for command
```
Loading