App Maker CLI
App Maker CLI speeds up the process of setting up applications in a local development environment and allows for easy deployment of post-development modifications on the platform. In just a few simple steps, users can quickly configure new projects or existing ones.
Installation
$ curl -s https://abp.akinon.net/api/public/cli.sh | bash
Command List
Below are the primary commands of the tool which will work as a wizard during development processes:
Command | Action |
---|---|
login | Login for App Maker platform. |
logout | Logout from App Maker platform. |
clear-cache | Clears the cache memory of the dependency management. |
project --help | Project specific commands. |
project create | Creates new project with default template. |
project install | Makes native installation for existence project. |
project publish | Publish the project package to App Maker. |
project upgrade | Enables upgrading the project's current environment version to a new one. |
project info | Displays the meta information of the project. |
project run <platform> | Runs the application on a desired platform. |
project diff <platform> | Enables you to see the changes in the native environment |
project reset <platform> | Enables you to undo the changes made in the native environment of the project |
plugin --help | Plugin specific commands. |
plugin add <name> | Adds a plugin to the project. You have to run project install command after added. |
plugin create | Create boilerplate to develop a plugin. |
plugin pack | Packs plugin to publish to App Maker. |
plugin publish | Publishes a plugin to App Maker. |
plugin preview | Enables you to preview the possible effects of native configurations. |
plugin run | Permanently applies the changes. |
login
Login for App Maker platform.
Example
$ app-maker login
logout
This command enables user to safely log out of the CLI.
Example
$ app-maker login
clear-cache
Clears the cache memory of the dependency management.
Example:
$ app-maker clear-cache
project create
This command sets up a new project within the current directory on the default App Maker template.
Example:
$ app-maker project create
Note: In order for this new application to be deployed, it needs to be published on the platform.
project install
This command does a native setup on the application's project package and enables the application to run.
Example
$ cd example-project-package
$ app-maker install
Options
Name | Type | Description |
---|---|---|
--exclude-plugins | boolean | This enables the exclusion of previously added plugins to be used within the project. |
Example
$ app-maker install --exclude-plugins
project publish
This command creates a new project package for the application and sends it to App Maker. Once this command completes successfully, you can proceed to publish the updated version of your application through the platform using either the code-push or native-build methods.
Example:
$ cd example-app
$ app-maker project publish
project run <platform>
This command runs the application on a desired platform.
Example:
$ cd example-app
$ app-maker project run android
Platforms
Name | Description |
---|---|
ios | Run the project on iOS |
android | Runs the project on Android |
start | Runs the development server |
project upgrade
This command enables upgrading the project's current environment version to a new one.
Example:
$ cd example-app
$ app-maker project upgrade
When the command is run, it does a new version check with reference to the value in the "envVersion" field within the akinon.json file. Whether published or not, the command completes the process by considering the rules specified below.
- If there is no new version, the command completes the process with 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 way.
- If the published version is on the level of minor
project info
This command displays the meta information of the project.
Example
$ cd example-app
$ app-maker project info
project diff <platform>
This command enables user to see the changes in the native environment of the project in a before/after display.
Note: You can undo the changes with the "project reset" command.
Example
$ cd example-app
$ app-maker project diff ios
Sample Output
--- a/Info.plist
+++ b/Info.plist
@@ -60,6 +60,6 @@
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIUserInterfaceStyle</key>
- <string>Light</string>
+ <string>Dark</string>
</dict>
</plist>
Note: For the time being, this feature can only be used on the iOS platform.
project reset <platform>
This command enables user to undo the changes made in the native environment of the project.
$ cd example-app
$ app-maker project reset ios
Note: For the time being, this feature can only be used on the iOS platform.
plugin add <name>
Adds a ready-to-use plugin to the project (akinon.json). Following this process, run the command app-maker project install
to install the javascript and native dependencies of this plugin. (The command project install
must be triggered manually.)
Example
$ cd example-app
$ app-maker plugin add example-plugin
akinon.json:
{
...
"plugins": {
"example-plugin": {
"version": "0.0.1", --> sample version
"name": "example-plugin",
"moduleName": "ExamplePlugin",
"config": {}
}
}
...
}
Note: Unless a specific version is mentioned in the command, the plugin's latest version number will be added.
Then, run the command below.
$ app-maker project install
Install Plugins with Specific Version
If the user wants to install a plugin specific version in their project, this method can be followed:
$ app-maker plugin add example-plugin@1.2.3
akinon.json
{
...
"plugins": {
"example-plugin": {
"version": "1.2.3",
...
}
}
...
}
Or the user can specify one part of the version (1.2
) and install the latest version in other parts.
Example:
Let's assume these are the versions of the plugin the user wants to install:
2.0.5
1.3.4
1.3.5
1.4.0
0.2.3
If the user wishes to install the latest (1.3.5
) of the versions that start with 1.3.*
:
$ app-maker plugin add example-plugin@1.3
akinon.json
{
...
"plugins": {
"example-plugin": {
"version": "1.3.5",
...
}
}
...
}
Or to install the latest version that starts with 1.*.*
:
$ app-maker plugin add example-plugin@1
akinon.json
{
...
"plugins": {
"example-plugin": {
"version": "1.4.0",
...
}
}
...
}
Afterward, the command below needs to be run.
$ app-maker project install
plugin create
This command sets up plugin-boilerplate under the .plugins/
directory in order to develop a plugin from the beginning.
Example
$ cd example-app
$ app-maker plugin create
$ ? Enter plugin name: my-first-plugin
Note: The "plugin create" command works differently from the "project add" command. In order to use a previously created plugin within a project, you need to add that plugin separately with the "project add" command.
plugin pack
This command packs the plugin in a way that is ready to be published and includes it in the root directory of the related plugin.
Example
$ cd example-app/.plugins/my-first-plugin
$ app-maker plugin pack
In order to specify a new version before packaging, user can use the options that corresponds to practices of semantic version.
SemVer Options
Name | Description |
---|---|
--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
Considering "0.0.1" as the current version, when you run the command below,
$ app-maker plugin pack --patch
An output as shown below will be provided for the "example-app/.plugins/my-first-plugin/"directory.
- my-first-plugin-0.0.2.tgz (npm)
- my-first-plugin-v0.0.2.tgz (yarn)
Note: Each sent option will be applied in the "version" field of the package.json file.
plugin publish
This commands uploads a packaged plugin to App Maker. Before a plugin is published, it needs to be packed with the "app-maker plugin pack" command.
Note: The packaged plugin is deleted after being published.
Example
$ cd example-app/.plugins/my-first-plugin
$ app-maker plugin publish
Note: If there is a README.md file in the plugin root directory, the file content will be automatically submitted to the platform.
Plugin Publication Location
Published plugins are saved to the account of the organization to which you are linked on App Maker. Users can visit App Maker and click the Organization > Dependency Management link to access all published plugins.
Plugin Access Permissions
All plugins are inaccessible for other organizations except for the one with which they are linked.
plugin preview <platform>
This command enables you to preview the possible effects of native configurations ("ios", "android") made for a plugin in development, without affecting the default version.
Example
$ cd example-app
$ app-maker plugin preview ios
$ app-maker plugin preview android
plugin run <platform>
This command permanently applies the changes in the output of the preview command to the project. This sets up the plugin within the project, and the project is ready for build.
Example
$ cd example-app
$ app-maker plugin run ios
$ app-maker plugin run android
config show
This command displays the global config information.
Example:
$ app-maker config show
plugin publish
This command uploads a packaged plugin to App Maker. Before publishing a plugin to App Maker, it is necessary to pack it using the "app-maker plugin pack" command.
Note: The packaged plugin is deleted after being published.
In addition to its own files, a readme file will also be automatically added to the plugin.