-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.yml
49 lines (49 loc) · 2.03 KB
/
commands.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Namespace, used as a prefix before command when running.
example:
# Command to run in CLI.
- command: oopsiee
# Procedure to execute on the server.
procedure: example.oopsiee
# Is command synchronous or asynchronous by default (default = false)?
async: false
# Optional alias.
alias: ops
# Description to show when running help.
description: oOPSiee CLI example.
# Optional ordered list of arguments.
arguments:
# Name to show when running help.
- name: argument
# Description to show when running help.
description: Argument description
# Optional key to use for this value when sending data to server (default = name).
as: someArgument
# Is the argument required (default = false)?
required: false
# Default value for optional arguments (default = undefined).
default: 1
# Is the argument variadic; only last argument can be variadic (default = false)?
variadic: false
# Optional type(s) used for validation and parsing (default = string).
type: int
# Optional unordered list of options.
options:
# Short version of the flag, at least one of short or long are required.
- short: o
# Long version of the flag.
long: option
# Description to show when running help.
description: Option description
# Optional key to use for this value when sending data to server (default = long || short).
as: someOption
# Is the option required (default = false)?
required: true
# Is it a boolean option or a value option (default = false)?
hasValue: true
# Is the value for the option required? If it is not required, option
# serves as a boolean option when used without value (default = false).
valueRequired: true
# Default value for optional option (default = undefined).
default: 2
# Optional type(s) used for validation and parsing of option value (default = string).
type: int