Skip to content

Commit ae7f2c0

Browse files
authored
Docs to install a specific version of the CLI (#1386)
1 parent 600de36 commit ae7f2c0

File tree

3 files changed

+47
-18
lines changed

3 files changed

+47
-18
lines changed

dev/cli_md_template.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CLI commands
2+
3+
_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_
4+
5+
## Installing a specific version of the CLI
6+
7+
```bash
8+
# Replace `INSERT_CORTEX_VERSION` with the complete CLI version (e.g. 0.18.1):
9+
$ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/vINSERT_CORTEX_VERSION/get-cli.sh)"
10+
11+
# For example to download CLI version 0.18.1 (Note the 'v'):
12+
$ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/v0.18.1/get-cli.sh)"
13+
```

dev/generate_cli_md.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ set -e
1818

1919
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)"
2020

21-
echo "building cli..."
21+
cat $ROOT/dev/cli_md_template.md
22+
2223
make --no-print-directory -C $ROOT cli
2324
echo
2425

@@ -45,8 +46,11 @@ commands=(
4546
"completion"
4647
)
4748

49+
echo "## Command overview"
50+
echo
51+
4852
for cmd in "${commands[@]}"; do
49-
echo "## ${cmd}"
53+
echo "### ${cmd}"
5054
echo
5155
echo -n '```text'
5256
$ROOT/bin/cortex help ${cmd}

docs/miscellaneous/cli.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,19 @@
22

33
_WARNING: you are on the master branch, please refer to the docs on the branch that matches your `cortex version`_
44

5-
## deploy
5+
## Installing a specific version of the CLI
6+
7+
```bash
8+
# Replace `INSERT_CORTEX_VERSION` with the complete CLI version (e.g. 0.18.1):
9+
$ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/vINSERT_CORTEX_VERSION/get-cli.sh)"
10+
11+
# For example to download CLI version 0.18.1 (Note the 'v'):
12+
$ bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/v0.18.1/get-cli.sh)"
13+
```
14+
15+
## Command overview
16+
17+
### deploy
618

719
```text
820
create or update apis
@@ -18,7 +30,7 @@ Flags:
1830
-h, --help help for deploy
1931
```
2032

21-
## get
33+
### get
2234

2335
```text
2436
get information about apis or jobs
@@ -33,7 +45,7 @@ Flags:
3345
-h, --help help for get
3446
```
3547

36-
## logs
48+
### logs
3749

3850
```text
3951
stream logs from an api
@@ -46,7 +58,7 @@ Flags:
4658
-h, --help help for logs
4759
```
4860

49-
## refresh
61+
### refresh
5062

5163
```text
5264
restart all replicas for an api (without downtime)
@@ -61,7 +73,7 @@ Flags:
6173
-h, --help help for refresh
6274
```
6375

64-
## predict
76+
### predict
6577

6678
```text
6779
make a prediction request using a json file
@@ -74,7 +86,7 @@ Flags:
7486
-h, --help help for predict
7587
```
7688

77-
## delete
89+
### delete
7890

7991
```text
8092
delete any kind of api or stop a batch job
@@ -90,7 +102,7 @@ Flags:
90102
-h, --help help for delete
91103
```
92104

93-
## cluster up
105+
### cluster up
94106

95107
```text
96108
spin up a cluster
@@ -109,7 +121,7 @@ Flags:
109121
-h, --help help for up
110122
```
111123

112-
## cluster info
124+
### cluster info
113125

114126
```text
115127
get information about a cluster
@@ -127,7 +139,7 @@ Flags:
127139
-h, --help help for info
128140
```
129141

130-
## cluster configure
142+
### cluster configure
131143

132144
```text
133145
update a cluster's configuration
@@ -144,7 +156,7 @@ Flags:
144156
-h, --help help for configure
145157
```
146158

147-
## cluster down
159+
### cluster down
148160

149161
```text
150162
spin down a cluster
@@ -160,7 +172,7 @@ Flags:
160172
-h, --help help for down
161173
```
162174

163-
## env configure
175+
### env configure
164176

165177
```text
166178
configure an environment
@@ -177,7 +189,7 @@ Flags:
177189
-h, --help help for configure
178190
```
179191

180-
## env list
192+
### env list
181193

182194
```text
183195
list all configured environments
@@ -189,7 +201,7 @@ Flags:
189201
-h, --help help for list
190202
```
191203

192-
## env default
204+
### env default
193205

194206
```text
195207
set the default environment
@@ -201,7 +213,7 @@ Flags:
201213
-h, --help help for default
202214
```
203215

204-
## env delete
216+
### env delete
205217

206218
```text
207219
delete an environment configuration
@@ -213,7 +225,7 @@ Flags:
213225
-h, --help help for delete
214226
```
215227

216-
## version
228+
### version
217229

218230
```text
219231
print the cli and cluster versions
@@ -226,7 +238,7 @@ Flags:
226238
-h, --help help for version
227239
```
228240

229-
## completion
241+
### completion
230242

231243
```text
232244
generate shell completion scripts

0 commit comments

Comments
 (0)