forked from cxbig/my-dash-cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathn98-magerun.rb
703 lines (560 loc) · 13.9 KB
/
n98-magerun.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
cheatsheet do
title 'n98-magerun.phar'
docset_file_name 'n98-magerun'
keyword 'n98'
introduction <<-'NOTE'
**n98-magerun.phar** is a powerful Magento CLI tool
Github: [netz98/n98-magerun](https://github.com/netz98/n98-magerun)
version: `1.91.0`
NOTE
category do
id 'Usage'
entry do
name 'Usage'
notes <<-'NOTE'
```
/path/to/n98-magerun.phar [options] command [argument]
```
NOTE
end
end
category do
id 'Common options'
entry do
command '--help'
command '-h'
name 'Display this help message.'
end
entry do
command '--quiet'
command '-q'
name 'Do not output any message.'
end
entry do
command '--verbose'
command '--v|vv|vvv'
name 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.'
end
entry do
command '--version'
command '-V'
name 'Display this application version.'
end
entry do
command '--ansi'
name 'Force ANSI output.'
end
entry do
command '--no-ansi'
name 'Disable ANSI output.'
end
entry do
command '--no-interaction'
command '-n'
name 'Do not ask any interactive question.'
end
entry do
command '--root-dir'
name 'Force magento root dir. No auto detection.'
end
entry do
command '--skip-config'
name 'Do not load any custom config.'
end
end
category do
id 'Available commands'
entry do
command 'help'
name 'Displays help for a command'
end
entry do
command 'install'
name 'Install magento'
end
entry do
command 'list'
name 'Lists commands'
end
entry do
command 'mysql-client'
name 'Opens mysql client by database config from `local.xml`'
end
entry do
command 'open-browser'
name 'Open current project in browser _(experimental)_'
end
entry do
command 'script'
name 'Runs multiple n98-magerun command'
end
entry do
command 'self-update'
command 'selfupdate'
name 'Updates `n98-magerun.phar` to the latest version.'
end
entry do
command 'shell'
name 'Runs n98-magerun as shell'
end
entry do
command 'uninstall'
name 'Uninstall magento (drops database and empties current folder or folder set via installationFolder)'
end
end
category do
id 'Admin'
entry do
command 'admin:notifications'
name 'Toggles admin notifications'
end
entry do
command 'admin:user:change-password'
name 'Changes the password of a adminhtml user.'
end
entry do
command 'admin:user:create'
name 'Create admin user.'
end
entry do
command 'admin:user:delete'
name 'Delete the account of a adminhtml user.'
end
entry do
command 'admin:user:list'
name 'List admin users.'
end
end
category do
id 'Cache'
entry do
command 'cache:clean'
name 'Clean magento cache'
end
entry do
command 'cache:disable'
name 'Disables magento caches'
end
entry do
command 'cache:enable'
name 'Enables magento caches'
end
entry do
command 'cache:flush'
name 'Flush magento cache storage'
end
entry do
command 'cache:list'
name 'Lists all magento caches'
end
entry do
command 'cache:report'
name 'View inside the cache'
end
entry do
command 'cache:view'
name 'Prints a cache entry'
end
end
category do
id 'Composer'
entry do
command 'composer:diagnose'
name 'Diagnoses the system to identify common errors.'
end
entry do
command 'composer:init'
name 'Creates a basic `composer.json` file in current directory.'
end
entry do
command 'composer:install'
name 'Installs the project dependencies from the `composer.lock` file if present, or falls back on the `composer.json`.'
end
entry do
command 'composer:require'
name 'Adds required packages to your `composer.json` and installs them.'
end
entry do
command 'composer:search'
name 'Search for packages.'
end
entry do
command 'composer:update'
name 'Updates your dependencies to the latest version according to `composer.json`, and updates the `composer.lock` file.'
end
entry do
command 'composer:validate'
name 'Validates a `composer.json`'
end
end
category do
id 'Config'
entry do
command 'config:delete'
name 'Deletes a store config item'
end
entry do
command 'config:dump'
name 'Dump merged xml config'
end
entry do
command 'config:get'
name 'Get a core config item'
end
entry do
command 'config:search'
name 'Search system configuration descriptions.'
end
entry do
command 'config:set'
name 'Set a core config item'
end
end
category do
id 'Customer'
entry do
command 'customer:change-password'
name 'Changes the password of a customer.'
end
entry do
command 'customer:create'
name 'Creates a new customer/user for shop frontend.'
end
entry do
command 'customer:create:dummy'
name 'Generate dummy customers. You can specify a count and a locale.'
end
entry do
command 'customer:delete'
name 'Delete Customer/s'
end
entry do
command 'customer:info'
name 'Loads basic customer info by email address.'
end
entry do
command 'customer:list'
name 'Lists customers'
end
end
category do
id 'DB'
entry do
command 'db:console'
name 'Opens mysql client by database config from `local.xml`'
end
entry do
command 'db:create'
name 'Create currently configured database'
end
entry do
command 'db:drop'
name 'Drop current database'
end
entry do
command 'db:dump'
name 'Dumps database with mysqldump cli client according to informations from `local.xml`'
end
entry do
command 'db:info'
name 'Dumps database informations'
end
entry do
command 'db:import'
name 'Imports database with mysql cli client according to database defined in `local.xml`'
end
entry do
command 'db:maintain:check-tables'
name 'Check database tables'
end
entry do
command 'db:query'
name 'Executes an SQL query on the database defined in `local.xml`'
end
end
category do
id 'Design'
entry do
command 'design:demo-notice'
name 'Toggles demo store notice for a store view'
end
end
category do
id 'Dev'
entry do
command 'dev:class:lookup'
name 'Resolves a grouped class name'
end
entry do
command 'dev:code:model:method'
name 'Code annotations: Reads the columns from a table and writes the getter and setter methods into the class file for `@methods`.'
end
entry do
command 'dev:console'
name 'Opens PHP interactive shell with initialized `Mage::app()` _(Experimental)_'
end
entry do
command 'dev:ide:phpstorm:meta'
name 'Generates meta data file for `PhpStorm` auto completion'
end
entry do
command 'dev:log'
name 'Toggle development log (`system.log`, `exception.log`)'
end
entry do
command 'dev:log:db'
name 'Turn on/off database query logging'
end
entry do
command 'dev:log:size'
name 'Get size of log file'
end
entry do
command 'dev:module:create'
name 'Create and register a new magento module.'
notes <<-'NOTE'
#### Usage:
```
dev:module:create [options] vendorNamespace moduleName [codePool]
```
#### Arguments:
```
vendorNamespace Namespace (your company prefix)
moduleName Name of your module.
codePool Codepool (local,community) (default: "local")
```
#### Options:
```
--add-blocks Adds blocks
--add-helpers Adds helpers
--add-models Adds models
--add-setup Adds SQL setup
--add-all Adds blocks, helpers and models
--modman Create all files in folder with a modman file.
--add-readme Adds a readme.md file to generated module
--add-composer Adds a composer.json file to generated module
--author-name Author for readme.md or composer.json
--author-email Author for readme.md or composer.json
--description Description for readme.md or composer.json
```
NOTE
end
entry do
command 'dev:module:dependencies:from'
name 'Show list of modules which depend on %s module'
end
entry do
command 'dev:module:dependencies:on'
name 'Show list of modules which given module depends on'
end
entry do
command 'dev:module:list'
name 'List all installed modules'
end
entry do
command 'dev:module:observer:list'
name 'Lists all registered observers'
end
entry do
command 'dev:module:rewrite:conflicts'
name 'Lists all magento rewrite conflicts'
end
entry do
command 'dev:module:rewrite:list'
name 'Lists all magento rewrites'
end
entry do
command 'dev:profiler'
name 'Toggles profiler for debugging'
end
entry do
command 'dev:report:count'
name 'Get count of report files'
end
entry do
command 'dev:setup:script:attribute'
name 'Creates attribute script for a given attribute code'
end
entry do
command 'dev:symlinks'
name 'Toggle allow symlinks setting'
end
entry do
command 'dev:template-hints'
name 'Toggles template hints'
end
entry do
command 'dev:template-hints-blocks'
name 'Toggles template hints block names'
end
entry do
command 'dev:theme:duplicates'
name 'Find duplicate files (templates, layout, locale, etc.) between two themes.'
end
entry do
command 'dev:theme:list'
name 'Lists all available themes'
end
entry do
command 'dev:translate:admin'
name 'Toggle inline translation tool for admin'
end
entry do
command 'dev:translate:export'
name 'Export inline translations'
end
entry do
command 'dev:translate:set'
name 'Adds a translation to core_translate table. _Globally for locale_'
end
entry do
command 'dev:translate:shop'
name 'Toggle inline translation tool for shop'
end
end
category do
id 'EAV'
entry do
command 'eav:attribute:list'
name 'Lists all EAV attributes'
end
entry do
command 'eav:attribute:remove'
name 'Removes attribute for a given attribute code'
end
entry do
command 'eav:attribute:view'
name 'View informations about an EAV attribute'
end
end
category do
id 'Extension'
entry do
command 'extension:download'
name 'Download magento-connect package'
end
entry do
command 'extension:install'
name 'Install magento-connect package'
end
entry do
command 'extension:list'
name 'List magento connection extensions'
end
entry do
command 'extension:search'
name 'Search magento connection extensions'
end
entry do
command 'extension:upgrade'
name 'Upgrade magento-connect package'
end
entry do
command 'extension:validate'
name 'Reads Magento Connect Config, and checks that installed package files are really there'
end
end
category do
id 'Index'
entry do
command 'index:list'
name 'Lists all magento indexes'
end
entry do
command 'index:reindex'
name 'Reindex a magento index by code'
end
entry do
command 'index:reindex:all'
name 'Reindex all magento indexes'
end
end
category do
id 'Local-config'
entry do
command 'local-config:generate'
name 'Generates `local.xml` config'
end
end
category do
id 'Media'
entry do
command 'media:dump'
name 'Creates an archive with content of media folder.'
end
end
category do
id 'Script'
entry do
command 'script:repo:list'
name 'Lists all scripts in repository'
end
entry do
command 'script:repo:run'
name 'Run script from repository'
end
end
category do
id 'System'
entry do
command 'sys:check'
name 'Checks Magento System'
end
entry do
command 'sys:cron:history'
name 'Last executed cronjobs with status.'
end
entry do
command 'sys:cron:list'
name 'Lists all cronjobs'
end
entry do
command 'sys:cron:run'
name 'Runs a cronjob by job code'
end
entry do
command 'sys:info'
name 'Prints infos about the current magento system.'
end
entry do
command 'sys:maintenance'
name 'Toggles maintenance mode.'
end
entry do
command 'sys:modules:list'
name 'List all installed modules'
end
entry do
command 'sys:setup:change-version'
name 'Change module setup resource version'
end
entry do
command 'sys:setup:compare-versions'
name 'Compare module version with `core_resource` table.'
end
entry do
command 'sys:setup:incremental'
name 'List new setup scripts to run, then runs one script'
end
entry do
command 'sys:setup:run'
name 'Runs all new setup scripts.'
end
entry do
command 'sys:store:config:base-url:list'
name 'Lists all base urls'
end
entry do
command 'sys:store:list'
name 'Lists all installed store-views'
end
entry do
command 'sys:url:list'
name 'Get all urls.'
end
entry do
command 'sys:website:list'
name 'Lists all websites'
end
end
end