hamro-cli
v0.0.7
Published
A CLI for generating and creating a new build of a we app and uploading it to app-version-service for Hamro Patro project
Downloads
80
Readme
hamro-cli
Overview
hamro-cli is a CLI tool for managing and deploying web applications with ease. It provides functionalities to configure the app, add and delete apps, bundle the app, and upload the bundle to the server.
Installation
To use hamro-cli, follow these steps:
- Install dependencies:
npm install hamro-cli -g
Usage
Once hamro-cli is installed, you can use the following commands:
Initialization
To configure the app with initial settings:
hpcli init
Required Fields for Initialization
When running hpcli init
, you will be prompted to enter the following fields:
- App ID: A unique name for your application (e.g.,
hamropay
). - Domain: The domain URL of your application.
- Version: The version of your application. Follow semantic versioning (e.g.,
1.0.1
). - API Key: Your secret key for accessing the API.
- Host URL: The backend URL for bundle upload (without trailing slash).
- HP App ID: The Hamro Patro App ID according to the environment (e.g.,
hamropatro-android
for development).
How to Access and Get Required Fields
- App ID: Choose a unique name for your application.
- Domain: The URL of your application's domain. Ensure it is accessible and correct.
- Version: Decide on the version of your application, starting with
1.0.0
and incrementing based on updates. - API Key: This key is provided by your API service provider. Check their documentation or dashboard.
- Host URL: The URL where the bundle will be uploaded. Ensure it does not have a trailing slash.
- HP App ID: This identifier is provided by Hamro Patro. Ensure it matches the environment you are working in.
To configure the app, run the following command and follow the prompts to enter the required fields:
hpcli init
Example Configuration File
After running the init
command, a configuration file (hamrocli-config.json
) will be created. This file contains essential information for managing and deploying your application.
{
"app_id": "your-app-id",
"domain": "your-app-domain",
"version": "1.0.1",
"api_key": "your-secret-key",
"host_url": "https://your-backend-url",
"hp_app_id": "your-hp-app-id"
}
Options
The options
command provides various options for managing the CLI tool. Currently, it offers the following options:
- List Commands: List all available commands with their descriptions.
hpcli options
For more information on each command, you can use the --help
flag:
hpcli --help
License
hamro-cli is licensed under the MIT License. npm set registry https://artifact.hamropatro.com/api/npm/https://www.npmjs.com/package/hamro-cli/