Skip to content

Commit 0954355

Browse files
authored
Merge pull request #594 from ExpressionEngine/feature/7.x/cli-addon-install
New CLI commands
2 parents 14fa42c + 79a8fa1 commit 0954355

File tree

5 files changed

+190
-12
lines changed

5 files changed

+190
-12
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Add-on Management
2+
3+
Set of CLI commands that allows listing, installing, updating and uninstalling add-ons.
4+
5+
[TOC]
6+
7+
## `addons:list`
8+
9+
Lists all add-ons available in the system.
10+
11+
php eecli.php addons:list
12+
13+
List add-ons that are currently installed:
14+
15+
php eecli.php addons:list i
16+
17+
or
18+
19+
php eecli.php addons:list installed
20+
21+
List add-ons that have an update available:
22+
23+
php eecli.php addons:list a
24+
25+
or
26+
27+
php eecli.php addons:list update-available
28+
29+
List add-ons that are currently uninstalled:
30+
31+
php eecli.php addons:list u
32+
or
33+
34+
php eecli.php addons:list uninstalled
35+
36+
## `addons:install`
37+
38+
Installs an add-on. Add-on name can be selected (typed) in dialog or provided with `--addon` or `-a` option.
39+
40+
php eecli.php addons:install
41+
42+
or
43+
44+
php eecli.php addons:install --addon block_and_allow
45+
46+
## `addons:update`
47+
48+
Updates an add-on. Add-on name can be selected (typed) in dialog or provided with `--addon` or `-a` option.
49+
You can also set `--all` flag to run all add-on updates that are available.
50+
51+
php eecli.php addons:update
52+
53+
or
54+
55+
php eecli.php addons:update --addon block_and_allow
56+
57+
or
58+
59+
php eecli.php addons:update --all
60+
61+
## `addons:uninstall`
62+
63+
Uninstalls an add-on. Add-on name can be selected (typed) in dialog or provided with `--addon` or `-a` option.
64+
65+
php eecli.php addons:uninstall
66+
or
67+
68+
php eecli.php addons:uninstall --addon block_and_allow
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# backup:database
2+
3+
Database backups
4+
5+
## Options list:
6+
7+
--relative_path=<value>
8+
-p <value>
9+
Path to database backup, relative to the cache folder
10+
11+
--absolute_path=<value>
12+
-a <value>
13+
Absolute path to the directory the database backup will be stored
14+
15+
--file_name=<value>
16+
-f <value>
17+
Name of sql file to be saved
18+
19+
--speed=<value>
20+
-s <value>
21+
Speed of database backup (between 1-10). Setting a lower speed allows for more time between database commands. Default speed is 5.
22+
23+
24+
## Examples:
25+
26+
### Backup the database to the default path, at the default speed
27+
28+
php eecli.php backup:database
29+
30+
# Example backup path and filename:
31+
system/user/cache/eedatabase_2023-05-30_18h05m39sUTC.sql
32+
33+
### Backup the database to the to an absolute path, with a custom filename
34+
35+
php eecli.php backup:database --file_name=deploy_backup.sql --absolute_path='/home/forge/backups'
36+
37+
### Backup the database at a slow speed, to help with the potential to lock up the database.
38+
39+
php eecli.php backup:database --speed=1
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Config Management
2+
3+
Set of CLI commands that updates the config file values, as well as ENV values. These are commonly use to provision a site or as part of a deploy script.
4+
5+
[TOC]
6+
7+
## `config:config`
8+
9+
Updates values in the config.php file.
10+
11+
### Options list
12+
--config-variable=<value>
13+
-c <value>
14+
The config item to modify
15+
16+
--value=<value>
17+
-v <value>
18+
The value to set the config item to
19+
20+
### Examples
21+
22+
Set system to offline:
23+
24+
php eecli.php config:config -c is_system_on -v n
25+
26+
Set system to online:
27+
28+
php eecli.php config:config -c is_system_on -v y
29+
30+
31+
Set debug to 1:
32+
33+
php eecli.php config:config -c debug -v 1
34+
35+
36+
## `config:env`
37+
38+
Updates values in the .env.php file.
39+
40+
### Options list
41+
--env-variable=<value>
42+
-e <value>
43+
The env item to set/modify
44+
45+
--value=<value>
46+
-v <value>
47+
The value to set the env item to
48+
49+
### Examples
50+
51+
Set system to offline:
52+
53+
php eecli.php config:env -e IS_SYSTEM_ON -v n
54+
55+
Set system to online:
56+
57+
php eecli.php config:env -e IS_SYSTEM_ON -v y
58+
59+
Set EE_INSTALL_MODE to false
60+
61+
php eecli.php config:env -e EE_INSTALL_MODE -v FALSE
62+
63+

docs/cli/built-in-commands/make-action.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# make:action
22

3-
Action Generator -- Creates a new action for an add-on
3+
Action Generator -- Creates a new action for an add-on
44

55
## Options list:
66

docs/toc_sections/_advanced_usage_toc.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
- name: Find and Replace
7171
href: add-ons/pro-search/find-and-replace.md
7272
- name: Upgrade from Low Search
73-
href: add-ons/pro-search/upgrade-from-low-search.md
73+
href: add-ons/pro-search/upgrade-from-low-search.md
7474
- name: Development
7575
items:
7676
- name: Creating your own Filter
@@ -98,7 +98,7 @@
9898
- name: Fieldtype
9999
href: add-ons/pro-variables/fieldtype.md
100100
- name: Upgrade from Low Variables
101-
href: add-ons/pro-variables/upgrade-from-low-variables.md
101+
href: add-ons/pro-variables/upgrade-from-low-variables.md
102102
- name: Development
103103
items:
104104
- name: Fieldtype Bridge
@@ -315,7 +315,7 @@
315315
href: development/architecture.md
316316
- name: Services
317317
items:
318-
- name: Addon Service
318+
- name: Add-on Service
319319
href: development/services/addon.md
320320
- name: CP/Alert Service
321321
href: development/services/alert.md
@@ -399,15 +399,15 @@
399399
items:
400400
- name: Working with Models
401401
href: development/models/working-with-models.md
402-
- name: Addon Action Model
402+
- name: Add-on Action Model
403403
href: development/models/addon-action.md
404-
- name: Addon Module Model
404+
- name: Add-on Module Model
405405
href: development/models/addon-module.md
406-
- name: Addon Extension Model
406+
- name: Add-on Extension Model
407407
href: development/models/addon-extension.md
408-
- name: Addon Fieldtype Model
408+
- name: Add-on Fieldtype Model
409409
href: development/models/addon-fieldtype.md
410-
- name: Addon Plugin Model
410+
- name: Add-on Plugin Model
411411
href: development/models/addon-plugin.md
412412
- name: Category Model
413413
href: development/models/category.md
@@ -630,7 +630,7 @@
630630
href: development/v6-add-on-migration.md
631631
- name: Automated Upgrading
632632
href: development/automated-upgrading.md
633-
633+
634634
- name: Command Line Interface (CLI)
635635
items:
636636
- name: Introduction
@@ -639,10 +639,18 @@
639639
href: cli/usage.md
640640
- name: Built In Commands
641641
items:
642+
- name: Add-on Management
643+
href: cli/built-in-commands/addons.md
644+
- name: Add-on Generator
645+
href: cli/built-in-commands/make-addon.md
646+
- name: Backup Database
647+
href: cli/built-in-commands/backup-database.md
642648
- name: Clear Cache
643649
href: cli/built-in-commands/cache-clear.md
644650
- name: Command Generator
645651
href: cli/built-in-commands/make-command.md
652+
- name: Config Management
653+
href: cli/built-in-commands/config-management.md
646654
- name: Migrations
647655
href: cli/built-in-commands/migrate.md
648656
- name: List
@@ -661,7 +669,7 @@
661669

662670
- name: Entry Cloning
663671
href: channels/entry_cloning.md
664-
672+
665673
- name: Front-end Content Management
666674
items:
667675
- name: Overview
@@ -676,4 +684,4 @@
676684
- name: Overview
677685
href: msm/overview.md
678686
- name: Variables and Parameter
679-
href: msm/code.md
687+
href: msm/code.md

0 commit comments

Comments
 (0)