App Maker CLI
CLI streamlines the process of setting up applications in a local development environment and facilitates the seamless deployment of post-development modifications on the platform. With just a few straightforward steps, users can easily configure new projects or work on existing ones.
Installation
Below is the command to install the CLI:
Publishing Project
All processes, except for the Env. version, remain the same. Instead of specifying the Env. version, you will now need to input tags into the form for the Akinon repository.
To ensure accurate deployment, it's crucial to tag both the environment version and the project package thoroughly. For example, consider this format: v2.3.2
represents the environment version, while -build.1
signifies the steadily build number for the project package. This approach aligns well with semantic versioning principles.
The tagging process is carried out as follows:
Desired changes that need to be sent are added to the git stage either individually or in bulk. Below, an explanation of the bulk submission method is provided.
A tag is assigned for deployment:
There is no predefined structure for the tag format. You have the flexibility to define it according to your own development practices.
Finally, the tagged changes are pushed to the repository:
Command List
The following are the primary commands of the tool that act as a wizard during development processes:
login
Log in to the App Maker platform.
logout
Log out from the App Maker platform.
project --help
Access project-specific commands.
project create
Create a new project using the default template.
project install
Perform a native installation for an existing project.
project upgrade
Upgrade the current environment version of the project to a new one.
project info
Display the meta information of the project.
project run <platform>
Run the application on a specific platform.
project diff <platform>
View changes in the native environment.
project reset <platform>
Undo changes made in the native environment of the project.
plugin --help
Access plugin-specific commands.
plugin add <name>
Add a plugin to the project. Remember to run project install
afterward.
plugin create
Create boilerplate code to develop a plugin.
plugin pack
Package a plugin for publishing on App Maker.
plugin publish
Publishes a plugin on App Maker.
plugin preview
Preview the potential effects of native configurations.
plugin run
Apply changes permanently.
config pm
Change the package manager (yarn, npm).
config show
Display config details for App Maker.
git connect
Connect to your git repository.
git disconnect
Disconnect from your git repository.
git check
Check your git configs.
publickey add
Add a public key to access the repositories.
publickey list
Display a list of your public keys.
publickey remove
Remove one of your public keys.
login
login
Log in to the App Maker platform.
Example
logout
logout
Safely log out of the CLI.
Example
project create
project create
Creates a new project within the current directory, using the default App Maker template.
Example:
To deploy this new application, it needs to be published on the platform.
Options
--platform
array
This specifies the target platform(s) to be built. (ios
, android
, huawei
)
If no platform is specified, the default platform will be set to ios
and android
.
Example:
OR
project install
project install
Performs a native setup on the application's project package, allowing the application to run.
Example
Options
--exclude-plugins
boolean
Excludes previously added plugins from being used within the project.
--platform
array
This specifies the target platform(s) to be built. (ios
, android
, huawei
)
If no platform is specified, the default platform will be set to ios
and android
.
Example
project run <platform>
project run <platform>
Runs the application on a desired platform.
Example:
Platforms
ios
Run the project on iOS.
android
Runs the project on Android.
start
Runs the development server.
project upgrade
project upgrade
Upgrades the project's current environment version to a newer one.
Example:
Options
--platform
array
This specifies the target platform(s) to be built. (ios
, android
, huawei
)
If no platform is specified, the default platform will be set to ios
and android
.
Upgrading Project
When the command is run, it performs a version check by referencing the value in the "envVersion" field within the akinon.json file. Regardless of whether the application has been published or not, the command proceeds to complete the process based on the following rules:
If there is no new version available, the command concludes by displaying a message indicating that the application is up-to-date.
If a new version is available;
If the published version is on the level of minor
(v0.*.0)
or minor(v0.0.*)
, the project automatically initiates the upgrading process.If the published version is on the level of major
(v*.0.0)
, the process continues in an interactive manner.
project info
project info
Displays the meta information of the project.
Example
project diff <platform>
project diff <platform>
Displays the differences in the project's native environment, presented in a before/after format.
Users have the option to undo these changes using the project reset
command.
Example
Sample Output
This feature can only be used on the iOS platform.
project reset <platform>
project reset <platform>
Reverts the changes made in the native environment of the project.
This feature can only be used on the iOS platform.
plugin add <name>
plugin add <name>
Adds a ready-to-use plugin to the project (akinon.json). Once the plugin information is added, execute the command appmaker project install
to automatically install the required JavaScript and native dependencies for the plugin. (It's important to note that the project install
command needs to be manually triggered to complete the installation process.)
Example
akinon.json:
If no specific version is mentioned in the command, the latest version number of the plugin will be added.
After that, run the command below:
Installing Plugins with a Specific Version
If a user wants to install a specific version of a plugin in their project, they need to follow this method:
akinon.json
The user can specify one part of the version (e.g., 1.2
) during installation, and the installation process will automatically fetch and install the latest version for the remaining parts.
Example:
Let's assume the user wants to install the following versions of the plugin:
If the user wants to install the latest version (1.3.5
) from those starting with 1.3.*
:
akinon.json
Or, to install the latest version that starts with 1.*.*
:
akinon.json
Afterward, the following command needs to be run.
plugin create
plugin create
Sets up plugin-boilerplate under the .plugins/
directory in order to develop a plugin from scratch.
Example
The plugin create
command works differently from the project add
command. To use a previously created plugin within a project, it needs to be added separately using the project add
command.
plugin pack
plugin pack
Packs the plugin in a ready-to-publish manner and includes it in the root directory of the related plugin.
Example
SemVer Options
--major
Major (1.3.4 -> 2.0.0)
--minor
Minor (0.1.1 -> 0.2.0)
--patch
Patch (0.0.1 -> 0.0.2)
Example
Assuming the current version is "0.0.1," when you run the following command:
The output for the "example-app/.plugins/my-first-plugin/" directory will be as follows:
Each specified option will be applied to the "version" field of the package.json file.
plugin publish
plugin publish
Uploads a packaged plugin to App Maker. Before publishing, the plugin needs to be packed using the "appmaker plugin pack" command.
Once a plugin is successfully published, the packaged version is deleted from the system.
Example
If a README.md
file exists in the plugin's root directory, its contents will be automatically submitted to the platform along with the plugin during the publishing process.
Plugin Publication Location
Published plugins are stored in the account of the organization to which you are connected on App Maker. To access all published plugins, users can visit App Maker and click on Organization > Dependency Management.
Plugin Access Permissions
All plugins are only accessible to the organization they are linked with. Other organizations cannot access or use these published plugins.
plugin preview <platform>
plugin preview <platform>
Allows to preview the potential impacts of native configurations ("ios", "android" and "huawei") made during the development of a plugin without affecting the default version.
Example
plugin run <platform>
plugin run <platform>
Permanently applies the changes from the output of the preview command to the project. It effectively sets up the plugin within the project, making it ready for the build process.
Example
config show
config show
Displays the global config information.
Example:
config pm
config pm
Changes your package manager. It shows list of package managers (yarn, npm)
Example:
plugin publish
plugin publish
Enables users to upload a packaged plugin to App Maker. Prior to publishing a plugin, it must be packed using the "appmaker plugin pack" command.
Once successfully published, the packaged version of the plugin is automatically deleted from the system. A readme file will be automatically included and packaged along with the plugin's own files.
publickey add
publickey add
This command initiates a prompt requesting the user to select an SSH public key that generated before in the ~/.ssh/
directory. It expects a valid SSH Public Key to be provided, and an error will occur if one is not entered.
Users can only add up to 5 SSH Public Keys.
Example:
publickey list
publickey list
Displays a table listing the SSH Public Keys.
Example:
publickey remove
publickey remove
Displays a list of the user's SSH keys, and the user can select and delete a key of their choice.
If the user does not have any SSH public keys, the program will display an error message.
Example:
git connect
git connect
This command facilitates the interactive connection of a project to a managed git repository hosted on amazon-codecommit
. It assists in configuring necessary settings, including SSH keys, repository details, and more.
Example:
You can also connect multiple public keys to a single project in your local environment.
git check
git check
Performs the following checks:
Is CodeCommit's host information added to the SSH Config file?
Is CodeCommit host information added to the SSH known_hosts file?
If run from within the project, it also verifies the following:
Has git init been used for the project?
Have Akinon remote URLs been added?
If everything is in order, it will display:
If not, it will display:
Example:
git disconnect
git disconnect
This command facilitates the interactive disconnection of a project from a managed git repository. It performs the following actions:
Deletes specific GIT configurations.
If executed from within the project, it also:
Deletes the Akinon repository's remote URL.
As a result, the following message will be displayed:
Example:
Last updated
Was this helpful?