Download the PHP package arvodia/arvodia-cli without Composer
On this page you can find all versions of the php package arvodia/arvodia-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download arvodia/arvodia-cli
More information about arvodia/arvodia-cli
Files in arvodia/arvodia-cli
Package arvodia-cli
Short Description ARVODIA CLI Tools
License GPL-3.0-only
Homepage https://github.com/arvodia/arvodia-cli
Informations about the package arvodia-cli
ARVODIA CLI Tools
The Arvodia CLI Tools makes it easy to create command line interfaces.
Contents
- Feature
- Screenshot
- Installation
- Commands
- Example
- Annotations
- Syntax
- Input Arguments
- Configuration
- Git clone
- Contact
- License
Feature
- a single executable file, or with load class
- a method for a command.
- the input options are injected into the parameters of the function
- support variable annotation for description and shorcut
- the longname input are the same as the name of the function parameters
- validation of the required value
- also other verification such as the command name which does not exist
- compare the type of option input with the variables of the function parameters
- the possibility of optional chaining, example: -abc
- decoration the text output color, block and list
- list command lists all commands:
- help option display help for the given command.
- verbose level option, example : -v -vv -vvv
- command description, usage and help
- confirm and choice input
- generate command
Screenshot
Installation
You can download only the bin file and work with it, or integrate arvodia-cli into your project with composer.
to execute
Commands
Class Commands can be integrated directly in the bin/terminal
file, if you want to use a single file for your executable.
You can also create PHP files in the src/Arvodia/Command
folder, the files must be suffixed with Command, for example NameCommand.php
, with a class of the same name as the file,
the commands is automatically detected by arvodia-cli.
The class must also contain an execute()
method, the options passed in the command line will be injected into the parameters of the execute()
function.
in the functions you must always start with the require parameter then optional.
Example
`
Annotations
Annotations are optional, it serves to add a shortcut for your option and a description.
Syntax
It must be placed in @option()
, and it is necessary to declare the param
that contains the name of the variable in the parameters of your execute
method
Input Arguments
The name of the first argument to find is the name of the command to execute Note: it can be placed at the beginning or in the middle or at the end.
- A parameter without a default value (the parameter requires a value) // required value
- Note: If a value is required, it doesn't matter which string it next assigns to it.
- A parameter with default value (the parameter value is optional)
- Note: Optional values do not accept space as a separator.
- A parameter with type bool, boolean:
- These options do not accept any value if there is a default value, it will just revert to true if it is found.
- With required value, These options accept the values "1", "true", "on", "yes", "0", "false", "off" and "no"
- Possible multiple short name with a default value, example -abc
Note: The script will stop when the first bad option is found.
Configuration
To customize the title of the console introduction, modify the arvodia_cli_title
key in the Command/config.json
file
Booter
in Command/config.json
Git clone
Contact
[email protected] - EURL ARVODIA
License
GNU General Public License v3.0