@@ -14,7 +14,8 @@ This example was generated with:
14
14
``` bash
15
15
$ bashly init
16
16
$ 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 ...
18
19
$ bashly generate
19
20
```
20
21
@@ -25,57 +26,51 @@ $ bashly generate
25
26
## ` bashly.yml `
26
27
27
28
``` yaml
28
- name : cli
29
- help : Sample application
29
+ name : docker
30
+ help : Docker example with nested command filenames
30
31
version : 0.1.0
31
32
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
35
37
36
38
commands :
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
68
69
69
70
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
79
74
` ` `
80
75
81
76
## ` settings.yml`
@@ -94,61 +89,58 @@ commands_dir: commands
94
89
95
90
# # Generated script output
96
91
97
- # ## `$ ./cli `
92
+ # ## `$ ./docker `
98
93
99
94
` ` ` shell
100
- cli - Sample application
95
+ docker - Docker example with nested command filenames
101
96
102
97
Usage:
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
106
101
107
102
Commands:
108
- download Download a file
109
- upload Upload a file
103
+ container Container commands
104
+ image Image commands
105
+ ps List containers
110
106
111
107
112
108
113
109
` ` `
114
110
115
- # ## `$ ./cli -h`
111
+ # ## `$ ./docker -h`
116
112
117
113
` ` ` shell
118
- cli - Sample application
114
+ docker - Docker example with nested command filenames
119
115
120
116
Usage:
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
124
120
125
121
Commands:
126
- download Download a file
127
- upload Upload a file
122
+ container Container commands
123
+ image Image commands
124
+ ps List containers
128
125
129
126
Options:
127
+ --debug, -d
128
+ Enable debug mode
129
+
130
130
--help, -h
131
131
Show this help
132
132
133
133
--version, -v
134
134
Show version number
135
135
136
- Environment Variables:
137
- API_KEY
138
- Set your API key
139
-
140
136
141
137
142
138
` ` `
143
139
144
- # ## `$ ./cli download something`
140
+ # ## `$ ./docker download something`
145
141
146
142
` ` ` 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
152
144
153
145
154
146
` ` `
@@ -159,8 +151,9 @@ args:
159
151
src/bashly.yml
160
152
161
153
src/commands:
162
- download.sh
163
- upload.sh
154
+ container
155
+ image
156
+ ps.sh
164
157
165
158
166
159
` ` `
0 commit comments