hcore/cli

HCore Command Line Tools

v0.3.18 2021-11-12 12:53 UTC

README

hcore/cli Build Status

HCore Command Line Tools

Total Downloads Latest Stable Version

hcore/cli utilizes Composer to manage its dependencies. So, before using HCore/CLI, make sure you have Composer installed on your machine.

First, download the HCore/CLI using Composer:

composer global require hcore/cli

to update HCore/CLI to latest version

composer global update hcore/cli

Make sure to place Composer's system-wide vendor bin directory in your $PATH so the hcore executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:

  • macOS and GNU / Linux Distributions: $HOME/.composer/vendor/bin
  • Windows: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin

on some windows computers the global composer folder may be different. You can query Composer to find where it has set the user $COMPOSER_HOME directory by running this command:

composer global config home 
UNIX / Linux: Set your PATH Variable Using export Command
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc
source ~/.bashrc

Documentation

Introduction

hcore/cli the command-line interface included with HCore. It provides a number of helpful commands for your use while developing your application.

Usage

Listing All Available Commands

To view a list of all available hcore/cli commands, you may use the "-h, --help" option:

hcore -h

Viewing The Help Screen For A Command

Every command also includes a "help" screen which displays and describes the command's available arguments and options. To view a help screen, simply precede the name of the command with help:

hcore create help

Displaying Your Current hcore/cli Version

You may also view the current version of your hcore/cli installation using the "-V, --version" option:

hcore -V

Create your Application

to create your own project go to the project folder and launch this command:

hcore create <your-project-name>

the command will ask you if you want to download additional modules (by default it will download them).

alt text

follow the instructions to create your consumer key on the settings of your BitBucket account and enter the required key and secret.

At the end of the execution the project structure will be created.

Note: sometimes the BitBucket OAuth may not work. In that case launch first the command:

composer clearcache
custom branch

You can choose the branch from which will be cloned the dependencies (default is ^0.4). To specify your custom branch add the "-b, --branch" option

Example:

hcore create <your-project-name> --branch dev-release/0.3.x

Note: the custom branch will be not propagated to the modules.

require-dev

The command after creating the composer.json launches the "composer install" without the require-devs. To include these add the "-d, --dev" option

generate only composer.json without install

if you want the command to generate only the composer.json file add the "-j, --json" option.

Modules

you can add or remove a module after installation.

  • To remove an existing module launch the command:

      hcore module:remove <module_name>
    
      // Example:
    
      hcore module:remove dmr
      hcore module:remove uploader
    
    
  • To add a new hcore module launch the command:

      hcore module:add <module_name>
    
      // Example:
        
      hcore module:add auth 
      hcore module:add uploader
    

Widget Override

to override a widget use the command:

hcore widget:create <module/widget>

where "module/widget" is the widget path. For Example if you want to override the login widget launch:

hcore widget:create auth/login

if only the module is specified all the module widgets will be overwritten

hcore widget:create auth