UNPKG

11.2 kBMarkdownView Raw
1rtolms-cli
2==========
3
4CLI development tool for the Roundtable Learning Management System
5
6[![oclif](https://badgen.net/badge/cli/oclif/green)](https://oclif.io)
7[![Version](https://badgen.net/npm/v/rtolms-cli)](https://npmjs.org/package/rtolms-cli)
8[![Build status](https://ci.appveyor.com/api/projects/status/952jp37iswj1xqok/branch/master?svg=true)](https://ci.appveyor.com/project/RT-BuildBot/rtolms-cli/branch/master)
9[![semantic-release](https://badgen.net/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80/semantic--release/orange?emoji=1)](https://github.com/semantic-release/semantic-release)
10
11
12---
13
14<!-- toc -->
15* [Requirements](#requirements)
16* [Usage](#usage)
17* [Commands](#commands)
18<!-- tocstop -->
19# Requirements
20
21- `git` available in your path
22- A [personal access token](https://github.com/settings/tokens) for authenticating to the GitHub API
23- private key authentication configured for `git+ssh://` protocol access to GitHub
24 - Use `ssh-keygen` to create a key pair
25 - [Add your public key to your GitHub account](https://github.com/settings/keys)
26
27# Usage
28<!-- usage -->
29```sh-session
30$ npm install -g rtolms-cli
31$ rtolms COMMAND
32running command...
33$ rtolms (-v|--version|version)
34rtolms-cli/2.17.1 linux-x64 node-v8.12.0
35$ rtolms --help [COMMAND]
36USAGE
37 $ rtolms COMMAND
38...
39```
40<!-- usagestop -->
41# Commands
42<!-- commands -->
43* [`rtolms autocomplete [SHELL]`](#rtolms-autocomplete-shell)
44* [`rtolms clone`](#rtolms-clone)
45* [`rtolms config`](#rtolms-config)
46* [`rtolms config:init`](#rtolms-configinit)
47* [`rtolms config:set KEY VALUE`](#rtolms-configset-key-value)
48* [`rtolms get-path [CUSTOMERNAME]`](#rtolms-get-path-customername)
49* [`rtolms git`](#rtolms-git)
50* [`rtolms help [COMMAND]`](#rtolms-help-command)
51* [`rtolms link [CUSTOMERNAME]`](#rtolms-link-customername)
52* [`rtolms reconfigure`](#rtolms-reconfigure)
53* [`rtolms sql:incrementals [CUSTOMERNAME]`](#rtolms-sqlincrementals-customername)
54* [`rtolms status`](#rtolms-status)
55* [`rtolms unlink`](#rtolms-unlink)
56* [`rtolms which`](#rtolms-which)
57
58## `rtolms autocomplete [SHELL]`
59
60display autocomplete installation instructions
61
62```
63USAGE
64 $ rtolms autocomplete [SHELL]
65
66ARGUMENTS
67 SHELL shell type
68
69OPTIONS
70 -r, --refresh-cache Refresh cache (ignores displaying instructions)
71
72EXAMPLES
73 $ rtolms autocomplete
74 $ rtolms autocomplete bash
75 $ rtolms autocomplete zsh
76 $ rtolms autocomplete --refresh-cache
77```
78
79_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v0.1.0/src/commands/autocomplete/index.ts)_
80
81## `rtolms clone`
82
83Updates local working copies
84
85```
86USAGE
87 $ rtolms clone
88
89OPTIONS
90 -a, --auth-type=private-key|token [default: token] Which authentication type to use
91 -c, --concurrency=concurrency (required) [default: 4] Number of operations to run at once
92 -d, --dry-run Don't actually perform clone
93 -h, --help show CLI help
94 -v, --verbose Verbose
95 --force Do not stop on errors
96
97EXAMPLE
98 $ rtolms clone
99```
100
101_See code: [src/commands/clone.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/clone.ts)_
102
103## `rtolms config`
104
105Create or modify configuration files
106
107```
108USAGE
109 $ rtolms config
110
111OPTIONS
112 -h, --help show CLI help
113 -v, --verbose Verbose
114
115ALIASES
116 $ rtolms config:list
117 $ rtolms config:index
118```
119
120_See code: [src/commands/config/index.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/config/index.ts)_
121
122## `rtolms config:init`
123
124Prompt for data to create the required configuration file
125
126```
127USAGE
128 $ rtolms config:init
129
130OPTIONS
131 -h, --help show CLI help
132 -v, --verbose Verbose
133
134ALIASES
135 $ rtolms init
136```
137
138_See code: [src/commands/config/init.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/config/init.ts)_
139
140## `rtolms config:set KEY VALUE`
141
142Set a configuration key's value
143
144```
145USAGE
146 $ rtolms config:set KEY VALUE
147
148ARGUMENTS
149 KEY Config key to set
150 VALUE The value to set
151
152OPTIONS
153 -h, --help show CLI help
154 -v, --verbose Verbose
155
156ALIASES
157 $ rtolms set
158 $ rtolms config:set
159```
160
161_See code: [src/commands/config/set.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/config/set.ts)_
162
163## `rtolms get-path [CUSTOMERNAME]`
164
165Prints repo directory path for a given customer
166
167```
168USAGE
169 $ rtolms get-path [CUSTOMERNAME]
170
171ARGUMENTS
172 CUSTOMERNAME Partial customer name (fuzzy matched to custom repo names)
173
174OPTIONS
175 -h, --help show CLI help
176 -v, --verbose Verbose
177
178ALIASES
179 $ rtolms path
180
181EXAMPLES
182 $ rtolms get-path
183 $ rtolms get-path fed
184```
185
186_See code: [src/commands/get-path.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/get-path.ts)_
187
188## `rtolms git`
189
190Run any git operation on all customer repos
191
192```
193USAGE
194 $ rtolms git
195
196OPTIONS
197 -c, --concurrency=concurrency (required) [default: 1] Number of operations to run at once
198 -h, --help show CLI help
199 -v, --verbose Verbose
200 --force Do not stop on errors
201
202EXAMPLE
203 $ rtolms git fetch
204```
205
206_See code: [src/commands/git.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/git.ts)_
207
208## `rtolms help [COMMAND]`
209
210display help for rtolms
211
212```
213USAGE
214 $ rtolms help [COMMAND]
215
216ARGUMENTS
217 COMMAND command to show help for
218
219OPTIONS
220 --all see all commands in CLI
221```
222
223_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.3/src/commands/help.ts)_
224
225## `rtolms link [CUSTOMERNAME]`
226
227Link a custom dir to lms-core
228
229```
230USAGE
231 $ rtolms link [CUSTOMERNAME]
232
233ARGUMENTS
234 CUSTOMERNAME Partial customer name (fuzzy matched to custom repo names)
235
236OPTIONS
237 -h, --help show CLI help
238 -j, --use-junction Use a junction symlink type on windows (defaults to "dir" type)
239 -t, --target=target Target path to link to
240 -v, --verbose Verbose
241
242EXAMPLES
243 $ rtolms link
244 # prompts for user input to select a customer
245 $ rtolms link ama
246 # fuzzy matches customer
247 $ rtolms link --target=~/Projects/some/dir
248 # Overrides link target manually
249```
250
251_See code: [src/commands/link.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/link.ts)_
252
253## `rtolms reconfigure`
254
255Changes database connection strings
256
257```
258USAGE
259 $ rtolms reconfigure
260
261OPTIONS
262 -R, --replace=replace Replace entire connection string with this value instead of the current value.
263 -d, --database=database The name of the database to change to. Defaults to `config.database`.
264 -h, --help show CLI help
265 -s, --server=server The database server name to change to. Defaults to `config.server`.
266 -v, --verbose Verbose
267 --no-strip-bom Do not remove the byte order mark from processed files
268
269ALIASES
270 $ rtolms reconf
271 $ rtolms reconfig
272 $ rtolms setdb
273 $ rtolms set-db
274 $ rtolms changedb
275
276EXAMPLES
277 $ rtolms reconfig
278 # Replaces *server* and *database* values in connection strings with those from your current configuration
279
280 This is useful for new databases with no auth info
281
282 $ rtolms reconfig -R "Server=willbereplaced;DataBase=willbereplaced;UID=dev;PWD=elopment;"
283 # Replaces entire connection string with this val (with *server* and *database* values replaced)
284```
285
286_See code: [src/commands/reconfigure.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/reconfigure.ts)_
287
288## `rtolms sql:incrementals [CUSTOMERNAME]`
289
290Run SQL incremental scripts
291
292```
293USAGE
294 $ rtolms sql:incrementals [CUSTOMERNAME]
295
296ARGUMENTS
297 CUSTOMERNAME Partial customer name (fuzzy matched to custom repo names)
298
299OPTIONS
300 -L, --no-use-linked
301 Ignore currently linked custom dir
302
303 -a, --archived
304 Show archived incrementals also
305
306 -c, --core
307 Run core incrementals instead of custom
308
309 -d, --database=database
310 The name of the database to change to. Defaults to `config.database`.
311
312 -h, --help
313 show CLI help
314
315 -p, --password=password
316 (required) [default: elopment] The password to connect to the db with.
317
318 -s, --server=server
319 The database server name to change to. Defaults to `config.server`.
320
321 -u, --username=username
322 [default: dev] The username to connect to the db with.
323
324 -v, --verbose
325 Verbose
326
327 --from=from
328 (required) [default: last 6 months] Preselect scripts dated after FROM. See
329 [parser](https://github.com/wanasit/chrono) for more info on matching.
330
331 --from="last 6 months"
332 --from="2 months ago"
333 --from="June"
334 --from="2018-03-01"
335 --from="last month"
336 --from="jan 1"
337
338 --instance=instance
339 The sql server instance on the server (Must have port 1434 open). Defaults to server.split(\)[1]
340
341DESCRIPTION
342 This command will look for .sql scripts in subdirectories of the selected repo
343 named "Sql". If any are found, it will prompt you to select which scripts to
344 run before executing them.
345
346 The --from flag can be used to preselect scripts which are dated after
347 the given time. See examples for more.
348
349ALIASES
350 $ rtolms sql
351 $ rtolms sql:index
352
353EXAMPLES
354 $ rtolms sql:incrementals
355 # finds scripts in your currently linked custom dir
356 $ rtolms sql:incrementals -L
357 # prompts for a custom repo to look for scripts in
358 $ rtolms sql:incrementals --core --from="jul 4"
359 # finds scripts in your lms-core dir and preselects all dated after July 4 of this year
360 $ rtolms sql:incrementals ama
361 # finds scripts in fuzzy matched lms-custom-aama dir
362 $ rtolms sql:incrementals -s="my-vm.local"
363 # connects to server on "my-vm.local" (port 1433)
364 $ rtolms sql:incrementals -s="my-vm.local\\SQLEXPRESS"
365 # connects to server instance "SQLEXPRESS" on "my-vm.local"
366 $ rtolms sql:incrementals -ca
367 # runs archived incrementals from core
368```
369
370_See code: [src/commands/sql/incrementals.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/sql/incrementals.ts)_
371
372## `rtolms status`
373
374Shows status of all repos
375
376```
377USAGE
378 $ rtolms status
379
380OPTIONS
381 -c, --concurrency=concurrency (required) [default: 4] Number of operations to run at once
382 -f, --fetch Fetch from remote before checking status
383 -h, --help show CLI help
384 -v, --verbose Verbose
385 --force Do not stop on errors
386
387ALIASES
388 $ rtolms st
389 $ rtolms stat
390```
391
392_See code: [src/commands/status.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/status.ts)_
393
394## `rtolms unlink`
395
396Unlink a custom dir to lms-core
397
398```
399USAGE
400 $ rtolms unlink
401
402OPTIONS
403 -h, --help show CLI help
404 -v, --verbose Verbose
405```
406
407_See code: [src/commands/unlink.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/unlink.ts)_
408
409## `rtolms which`
410
411Prints which customer is currently linked
412
413```
414USAGE
415 $ rtolms which
416
417OPTIONS
418 -h, --help show CLI help
419 -v, --verbose Verbose
420```
421
422_See code: [src/commands/which.ts](https://github.com/roundtablelearning/rtolms-cli/blob/v2.17.1/src/commands/which.ts)_
423<!-- commandsstop -->