UNPKG

8.83 kBMarkdownView Raw
1# Project Eta CLI
2
3The CLI for managing and developing with [Eta](https://github.com/crossroads-education/eta).
4All commands should be run from the root directory of an Eta instance.
5
6[![Version](https://img.shields.io/npm/v/@xroadsed/eta-cli.svg)](https://npmjs.org/package/@xroadsed/eta-cli)
7[![CircleCI](https://circleci.com/gh/crossroads-education/eta-cli/tree/master.svg?style=shield)](https://circleci.com/gh/crossroads-education/eta-cli/tree/master)
8
9<!-- toc -->
10* [Project Eta CLI](#project-eta-cli)
11<!-- tocstop -->
12<!-- usage -->
13```sh-session
14$ npm install -g @xroadsed/eta-cli
15$ eta COMMAND
16running command...
17$ eta (-v|--version|version)
18@xroadsed/eta-cli/1.3.4 win32-x64 node-v8.9.1
19$ eta --help [COMMAND]
20USAGE
21 $ eta COMMAND
22...
23```
24<!-- usagestop -->
25<!-- commands -->
26* [eta clean](#eta-clean)
27* [eta compile:client](#eta-compileclient)
28* [eta compile:server](#eta-compileserver)
29* [eta config:get [KEY]](#eta-configget-key)
30* [eta config:set [KEY] [VALUE]](#eta-configset-key-value)
31* [eta db:reset](#eta-dbreset)
32* [eta db:seed](#eta-dbseed)
33* [eta foreach [COMMAND]](#eta-foreach-command)
34* [eta generate:clientjs MODULE](#eta-generateclientjs-module)
35* [eta generate:controller MODULENAME ROUTE](#eta-generatecontroller-modulename-route)
36* [eta generate:indexes](#eta-generateindexes)
37* [eta generate:model MODULENAME MODELNAME](#eta-generatemodel-modulename-modelname)
38* [eta generate:module MODULE](#eta-generatemodule-module)
39* [eta help [COMMAND]](#eta-help-command)
40* [eta install URL](#eta-install-url)
41* [eta lint:client](#eta-lintclient)
42* [eta lint:server](#eta-lintserver)
43* [eta pull](#eta-pull)
44* [eta setup](#eta-setup)
45* [eta start](#eta-start)
46* [eta test:core](#eta-testcore)
47* [eta test:modules](#eta-testmodules)
48
49## eta clean
50
51clean all JS files without matching TS files
52
53```
54USAGE
55 $ eta clean
56```
57
58_See code: [lib/commands/clean.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/clean.js)_
59
60## eta compile:client
61
62compile client-side Typescript
63
64```
65USAGE
66 $ eta compile:client
67
68OPTIONS
69 -m, --modules=modules modules to compile client-side JS for (comma-separated)
70 --no-exit Don't exit with an error code if compilation fails
71```
72
73_See code: [lib/commands/compile/client.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/compile/client.js)_
74
75## eta compile:server
76
77compile server-side Typescript
78
79```
80USAGE
81 $ eta compile:server
82
83OPTIONS
84 --no-exit Don't exit with an error code if compilation fails
85
86ALIASES
87 $ eta compile
88```
89
90_See code: [lib/commands/compile/server.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/compile/server.js)_
91
92## eta config:get [KEY]
93
94log a config variable's value
95
96```
97USAGE
98 $ eta config:get [KEY]
99
100ARGUMENTS
101 KEY The key to get (including domain)
102```
103
104_See code: [lib/commands/config/get.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/config/get.js)_
105
106## eta config:set [KEY] [VALUE]
107
108set a config variable
109
110```
111USAGE
112 $ eta config:set [KEY] [VALUE]
113
114ARGUMENTS
115 KEY The key to set (including domain)
116 VALUE The value to set
117```
118
119_See code: [lib/commands/config/set.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/config/set.js)_
120
121## eta db:reset
122
123reset the database (using global connection info)
124
125```
126USAGE
127 $ eta db:reset
128
129OPTIONS
130 -n, --no-wait Don't wait 3 seconds before resetting
131```
132
133_See code: [lib/commands/db/reset.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/db/reset.js)_
134
135## eta db:seed
136
137seed the database (using global connection info)
138
139```
140USAGE
141 $ eta db:seed
142
143OPTIONS
144 -n, --no-log Don't log anything from the Eta instance
145```
146
147_See code: [lib/commands/db/seed.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/db/seed.js)_
148
149## eta foreach [COMMAND]
150
151run a command in each module directory
152
153```
154USAGE
155 $ eta foreach [COMMAND]
156
157ARGUMENTS
158 COMMAND The command to run in each directory
159
160OPTIONS
161 -c, --clientJS=clientJS run in client-side JS directories only
162```
163
164_See code: [lib/commands/foreach.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/foreach.js)_
165
166## eta generate:clientjs MODULE
167
168generate new client-side JS setup
169
170```
171USAGE
172 $ eta generate:clientjs MODULE
173
174ARGUMENTS
175 MODULE module name to generate client-side JS for
176```
177
178_See code: [lib/commands/generate/clientjs.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/generate/clientjs.js)_
179
180## eta generate:controller MODULENAME ROUTE
181
182generate new controller
183
184```
185USAGE
186 $ eta generate:controller MODULENAME ROUTE
187
188ARGUMENTS
189 MODULENAME module name to generate controller in
190 ROUTE route to generate controller for
191```
192
193_See code: [lib/commands/generate/controller.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/generate/controller.js)_
194
195## eta generate:indexes
196
197generate index files
198
199```
200USAGE
201 $ eta generate:indexes
202
203ALIASES
204 $ eta generate
205```
206
207_See code: [lib/commands/generate/indexes.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/generate/indexes.js)_
208
209## eta generate:model MODULENAME MODELNAME
210
211generate new TypeORM model
212
213```
214USAGE
215 $ eta generate:model MODULENAME MODELNAME
216
217ARGUMENTS
218 MODULENAME module name to generate controller in
219 MODELNAME name for new model
220```
221
222_See code: [lib/commands/generate/model.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/generate/model.js)_
223
224## eta generate:module MODULE
225
226generate new Eta module
227
228```
229USAGE
230 $ eta generate:module MODULE
231
232ARGUMENTS
233 MODULE module name to generate
234```
235
236_See code: [lib/commands/generate/module.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/generate/module.js)_
237
238## eta help [COMMAND]
239
240display help for eta
241
242```
243USAGE
244 $ eta help [COMMAND]
245
246ARGUMENTS
247 COMMAND command to show help for
248
249OPTIONS
250 --all see all commands in CLI
251```
252
253_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v1.2.1/src/commands/help.ts)_
254
255## eta install URL
256
257install an Eta module
258
259```
260USAGE
261 $ eta install URL
262
263ARGUMENTS
264 URL url to install module from
265```
266
267_See code: [lib/commands/install.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/install.js)_
268
269## eta lint:client
270
271lint client-side Typescript for style errors
272
273```
274USAGE
275 $ eta lint:client
276
277OPTIONS
278 -f, --fix Passes --fix to tslint (attempt to automatically fix problems)
279 -m, --modules=modules Only lint these modules (comma-separated)
280```
281
282_See code: [lib/commands/lint/client.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/lint/client.js)_
283
284## eta lint:server
285
286lint server-side Typescript for style errors
287
288```
289USAGE
290 $ eta lint:server
291
292OPTIONS
293 -f, --fix Pass --fix to tslint (attempt to automatically fix problems)
294
295ALIASES
296 $ eta lint
297```
298
299_See code: [lib/commands/lint/server.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/lint/server.js)_
300
301## eta pull
302
303pull all (or some) Eta modules from remote
304
305```
306USAGE
307 $ eta pull
308
309OPTIONS
310 -m, --modules=modules Module names to pull
311```
312
313_See code: [lib/commands/pull.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/pull.js)_
314
315## eta setup
316
317set up a fresh Eta instance
318
319```
320USAGE
321 $ eta setup
322```
323
324_See code: [lib/commands/setup.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/setup.js)_
325
326## eta start
327
328generate indexes, compile and start the server
329
330```
331USAGE
332 $ eta start
333
334OPTIONS
335 -f, --fast don't generate or compile, just start
336```
337
338_See code: [lib/commands/start.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/start.js)_
339
340## eta test:core
341
342run Eta's unit/integration tests
343
344```
345USAGE
346 $ eta test:core
347
348OPTIONS
349 -l, --log-standard-output Write normal Mocha output to console (instead of CLI output)
350
351ALIASES
352 $ eta test
353```
354
355_See code: [lib/commands/test/core.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/test/core.js)_
356
357## eta test:modules
358
359run all module unit/integration tests
360
361```
362USAGE
363 $ eta test:modules
364
365OPTIONS
366 -l, --log-all log everything from server
367 -m, --modules=modules only test these modules (comma-separated)
368 -r, --reset reset / seed the database before running tests
369 -s, --slow=slow [default: 1000] max time until Mocha flags a test as slow (ms)
370 -t, --timeout=timeout [default: 3000] max time until Mocha kills a test (ms)
371 --reporter=reporter reporter name for mocha to use
372```
373
374_See code: [lib/commands/test/modules.js](https://github.com/crossroads-education/eta-cli/blob/v1.3.4/lib/commands/test/modules.js)_
375<!-- commandsstop -->