Skip to content
43 changes: 43 additions & 0 deletions docs/cli/built-in-commands/generate-templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# `generate:templates`

Template Generator -- Creates templates based on the existing data structure.

Using pre-defined stubs provided by ExpressionEngine or add-ons, this command can generate templates, preview output, or return template metadata.

## Syntax

`php eecli.php generate:templates [generator] [--options] [--json] [--code]`

## Options list:

```
--list
-l
List available template generators

--show
-s
Show template content without writing files

--code
-c
Output only generated template code

--json
-j
Output JSON metadata for the selected generator
```

## Examples:

List available generators:

`php eecli.php generate:templates --list`

Preview templates without writing files:

`php eecli.php generate:templates <generator> --show`

Output generator metadata as JSON:

`php eecli.php generate:templates <generator> --json`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-cp-route.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:cp-route`

Control Panel Route Generator -- Creates a control panel route for an add-on.

## Syntax

`php eecli.php make:cp-route <RouteName> --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add MCP route to
```

## Examples:

Generate a new CP route in an existing add-on:

`php eecli.php make:cp-route Orders --addon=my_existing_addon`

Run interactively and pick the add-on when prompted:

`php eecli.php make:cp-route Orders`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-fieldtype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:fieldtype`

Fieldtype Generator -- Creates a new fieldtype for an add-on.

## Syntax

`php eecli.php make:fieldtype <FieldtypeName> --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add fieldtype to
```

## Examples:

Generate a fieldtype in an existing add-on:

`php eecli.php make:fieldtype StatusPicker --addon=my_existing_addon`

Run interactively and choose the add-on when prompted:

`php eecli.php make:fieldtype StatusPicker`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:jump`

Add Jumps File Generator -- Creates an add-on jump menu file.

## Syntax

`php eecli.php make:jump --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add Jump Menu file to
```

## Examples:

Generate jumps for an add-on:

`php eecli.php make:jump --addon=my_existing_addon`

Run interactively and choose the add-on when prompted:

`php eecli.php make:jump`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:sidebar`

Add-on Sidebar Generator -- Creates a control panel sidebar scaffold for an add-on.

## Syntax

`php eecli.php make:sidebar --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add sidebar to
```

## Examples:

Generate a sidebar scaffold:

`php eecli.php make:sidebar --addon=my_existing_addon`

Run interactively and select the add-on when prompted:

`php eecli.php make:sidebar`
18 changes: 5 additions & 13 deletions docs/cli/built-in-commands/make-tag.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# make:tag
# `make:tag` (legacy)

Tag Generator -- Creates a new tag for an add-on
The `make:tag` command has been renamed to `make:template-tag`.

## Options list:
Use:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add tag to
```
`php eecli.php make:template-tag MyNewTag --addon=my_existing_addon`

## Examples:

### Generating a new tag:

`php eecli.php make:tag MyNewTag --addon=my_existing_addon`
See [make:template-tag](cli/built-in-commands/make-template-tag.md) for the current command documentation.
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-template-tag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:template-tag`

Template Tag Generator -- Creates a new template tag for an add-on.

## Syntax

`php eecli.php make:template-tag <TagName> --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add tag to
```

## Examples:

Generate a template tag in an add-on:

`php eecli.php make:template-tag MyNewTag --addon=my_existing_addon`

Run interactively and pick the add-on when prompted:

`php eecli.php make:template-tag MyNewTag`
4 changes: 2 additions & 2 deletions docs/cli/built-in-commands/sync-file-usage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `sync:upload-directory`
# `sync:file-usage`

This command updates old file format data to the modern format and synchronizes the file usage records in the database. File usage data for a given file in the file manager can be viewed in the [File Editor](control-panel/file-manager/file-edit.md). This functionality is also available through [Utilities - File Usage](control-panel/utilities/data-operations.md#update-file-usage-information).

## Example:

`php eecli.php sync:file-usage`
`php eecli.php sync:file-usage`
87 changes: 87 additions & 0 deletions docs/cli/built-in-commands/update-prepare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# `update:prepare`

Prepare Update -- Prepares a site for an ExpressionEngine upgrade by moving/copying files and optionally running the upgrade.

Use this for upgrade preparation workflows driven by `upgrade.config.php` and/or CLI flags.

## Syntax

`php eecli.php update:prepare`

## Options list:

```
--upgrade-ee
Start the upgrade after moving files

--force-add-on-upgrade
After upgrading EE, runs add-on upgrades

--old-base-path=<value>
Absolute path of old site

--new-base-path=<value>
Absolute path of new site

--old-public-path=<value>
Absolute path of old site public path

--new-public-path=<value>
Absolute path of new site public path

--no-config-file
Ignore upgrade.config.php and use interactive/CLI values

--ee-version
Current site version source flag used by the upgrade preparer

--should-move-system-path
Move old system folder to the new site

--old-system-path=<value>
Absolute path of old site system folder

--new-system-path=<value>
Absolute path of new site system folder

--should-move-template-path
Move old template folder to the new site

--old-template-path=<value>
Absolute path of old site template folder

--new-template-path=<value>
Absolute path of new site template folder

--should-move-theme-path
Move old theme folder to the new site

--old-theme-path=<value>
Absolute path of old site user theme folder

--new-theme-path=<value>
Absolute path of new site user theme folder

--run-preflight-hooks
Run preflight hooks defined in upgrade config

--run-postflight-hooks
Run postflight hooks defined in upgrade config

--temp-directory
Temporary working directory flag used by the upgrade preparer
```

## Examples:

Prepare upgrade interactively:

`php eecli.php update:prepare`

Prepare upgrade and run ExpressionEngine upgrade after file operations:

`php eecli.php update:prepare --upgrade-ee`

Prepare upgrade using explicit old/new base paths:

`php eecli.php update:prepare --old-base-path=/var/www/old-site --new-base-path=/var/www/new-site`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/update-run-hook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `update:run-hook`

Run Update Hook -- Runs one or more upgrade hooks defined in `upgrade.config.php`.

This command loads preflight/postflight hooks from your upgrade config and executes the hook names you pass as arguments.

## Syntax

`php eecli.php update:run-hook <hook_name> [additional_hook_names...]`

## Options list:

This command does not define command-specific options.

## Examples:

Run a single hook:

`php eecli.php update:run-hook preflightCacheClear`

Run multiple hooks in one invocation:

`php eecli.php update:run-hook preflightCacheClear postflightRebuildCaches`

When prompted, provide the path to your `upgrade.config.php` (or press Enter to use the default system path).
27 changes: 25 additions & 2 deletions docs/cli/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,36 @@ By default the CLI is located `system/ee/eecli.php` .

- [Basic Usage](cli/usage.md)
- Built In Commands
- Add-ons
- [addons:list - Lists all add-ons](cli/built-in-commands/addons.md)
- [addons:install - Installs an add-on](cli/built-in-commands/addons.md)
- [addons:update - Updates an add-on](cli/built-in-commands/addons.md)
- [addons:uninstall - Uninstalls an add-on](cli/built-in-commands/addons.md)
- [backup:database - Backup database](cli/built-in-commands/backup-database.md)
- [Clear Cache](cli/built-in-commands/cache-clear.md)
- [channels:list - List channels](cli/built-in-commands/channels-list.md)
- Config
- [config:config - Update config.php values](cli/built-in-commands/config-management.md)
- [config:env - Update .env.php values](cli/built-in-commands/config-management.md)
- [fields:list - List fields](cli/built-in-commands/fields-list.md)
- [fieldtypes:list - List fieldtypes](cli/built-in-commands/fieldtypes-list.md)
- Generate
- [generate:templates - Generate templates](cli/built-in-commands/generate-templates.md)
- [List](cli/built-in-commands/list.md)
- Make
- [make:action - Creates a new action for an add-on](cli/built-in-commands/make-action.md)
- [make:addon - Creates a new add-on](cli/built-in-commands/make-addon.md)
- [make:command - Creates a new CLI command for an add-on](cli/built-in-commands/make-command.md)
- [make:cp-route - Creates a control panel route for an add-on](cli/built-in-commands/make-cp-route.md)
- [make:extension-hook - Implements an EE extension hook in an add-on](cli/built-in-commands/make-extension-hook.md)
- [make:fieldtype - Creates a fieldtype for an add-on](cli/built-in-commands/make-fieldtype.md)
- [make:jump - Creates jump menu file for an add-on](cli/built-in-commands/make-jump.md)
- [make:migration - Creates a new migration](cli/built-in-commands/make-migration.md)
- [make:model - Creates a new model for an add-on](cli/built-in-commands/make-model.md)
- [make:prolet - Creates a new prolet for an add-on](cli/built-in-commands/make-prolet.md)
- [make:tag - Creates a new tag for an add-on](cli/built-in-commands/make-tag.md)
- [make:service - Creates a new service for an add-on](cli/built-in-commands/make-service.md)
- [make:sidebar - Creates a sidebar for an add-on](cli/built-in-commands/make-sidebar.md)
- [make:template-tag - Creates a new template tag for an add-on](cli/built-in-commands/make-template-tag.md)
- [make:widget - Generates widgets for existing add-ons](cli/built-in-commands/make-widget.md)
- Migrate
- [migrate - Runs specified migrations (all, core, or add-ons)](cli/built-in-commands/migrate.md)
Expand All @@ -32,7 +51,11 @@ By default the CLI is located `system/ee/eecli.php` .
- [sync:file-usage - Sync files usage](cli/built-in-commands/sync-file-usage.md)
- [sync:reindex - Sync content used in search indexes](cli/built-in-commands/sync-reindex.md)
- [sync:upload-directory - Sync files in an upload directory](cli/built-in-commands/sync-upload-directory.md)
- [Update ExpressionEngine](cli/built-in-commands/update.md)
- Update
- [update - Update ExpressionEngine](cli/built-in-commands/update.md)
- [update:prepare - Prepare site files for update](cli/built-in-commands/update-prepare.md)
- [update:run-hook - Run update hooks from upgrade config](cli/built-in-commands/update-run-hook.md)
- [version - Show version details](cli/built-in-commands/version.md)
- [Creating a Command](cli/creating-a-command.md)
- [Defining Input](cli/defining-input.md)
- [Displaying Output](cli/displaying-output.md)