@@ -14,7 +14,8 @@ This example was generated with:
1414``` bash
1515$ bashly init
1616$ bashly add settings
17- # ... now edit src/settings.yml to match the example ...
17+ # ... now edit settings.yml to match the example ...
18+ # ... now edit src/bashly.yml to match the example ...
1819$ bashly generate
1920```
2021
@@ -25,57 +26,51 @@ $ bashly generate
2526## ` bashly.yml `
2627
2728``` yaml
28- name : cli
29- help : Sample application
29+ name : docker
30+ help : Docker example with nested command filenames
3031version : 0.1.0
3132
32- environment_variables :
33- - name : api_key
34- help : Set your API key
33+ flags :
34+ - long : --debug
35+ short : -d
36+ help : Enable debug mode
3537
3638commands :
37- - name : download
38- alias : d
39- help : Download a file
40-
41- args :
42- - name : source
43- required : true
44- help : URL to download from
45- - name : target
46- help : " Target filename (default: same as source)"
47-
48- flags :
49- - long : --force
50- short : -f
51- help : Overwrite existing files
52-
53- examples :
54- - cli download example.com
55- - cli download example.com ./output -f
56-
57- environment_variables :
58- - name : default_target_location
59- help : Set the default location to download to
60-
61- - name : upload
62- alias : u
63- help : Upload a file
64- args :
65- - name : source
66- required : true
67- help : File to upload
39+ - name : container
40+ alias : c*
41+ help : Container commands
42+
43+ commands :
44+ - name : run
45+ help : Run a container
46+ args :
47+ - name : image
48+ help : Image name
49+ required : true
50+
51+ - name : stop
52+ help : Stop a container
53+ args :
54+ - name : container
55+ help : Container name
56+ required : true
57+
58+ - name : image
59+ alias : i*
60+ help : Image commands
61+
62+ commands :
63+ - name : ls
64+ alias : l
65+ help : Show all images
66+
67+ - name : ps
68+ help : List containers
6869
6970 flags :
70- - long : --user
71- short : -u
72- arg : user
73- help : Username to use for logging in
74- required : true
75- - long : --password
76- short : -p
77- arg : password
78- help : Password to use for logging in
71+ - long : --all
72+ short : -a
73+ help : Show all containers
7974` ` `
8075
8176## ` settings.yml`
@@ -94,61 +89,58 @@ commands_dir: commands
9489
9590# # Generated script output
9691
97- # ## `$ ./cli `
92+ # ## `$ ./docker `
9893
9994` ` ` shell
100- cli - Sample application
95+ docker - Docker example with nested command filenames
10196
10297Usage:
103- cli COMMAND
104- cli [COMMAND] --help | -h
105- cli --version | -v
98+ docker [OPTIONS] COMMAND
99+ docker [COMMAND] --help | -h
100+ docker --version | -v
106101
107102Commands:
108- download Download a file
109- upload Upload a file
103+ container Container commands
104+ image Image commands
105+ ps List containers
110106
111107
112108
113109` ` `
114110
115- # ## `$ ./cli -h`
111+ # ## `$ ./docker -h`
116112
117113` ` ` shell
118- cli - Sample application
114+ docker - Docker example with nested command filenames
119115
120116Usage:
121- cli COMMAND
122- cli [COMMAND] --help | -h
123- cli --version | -v
117+ docker [OPTIONS] COMMAND
118+ docker [COMMAND] --help | -h
119+ docker --version | -v
124120
125121Commands:
126- download Download a file
127- upload Upload a file
122+ container Container commands
123+ image Image commands
124+ ps List containers
128125
129126Options:
127+ --debug, -d
128+ Enable debug mode
129+
130130 --help, -h
131131 Show this help
132132
133133 --version, -v
134134 Show version number
135135
136- Environment Variables:
137- API_KEY
138- Set your API key
139-
140136
141137
142138` ` `
143139
144- # ## `$ ./cli download something`
140+ # ## `$ ./docker download something`
145141
146142` ` ` shell
147- # this file is located in 'src/commands/download.sh'
148- # code for 'cli download' goes here
149- # you can edit it freely and regenerate (it will not be overwritten)
150- args:
151- - ${args[source]} = something
143+ invalid command: download
152144
153145
154146` ` `
@@ -159,8 +151,9 @@ args:
159151src/bashly.yml
160152
161153src/commands:
162- download.sh
163- upload.sh
154+ container
155+ image
156+ ps.sh
164157
165158
166159` ` `
0 commit comments