evophp
v1.3.2
Published
Command-line installer for the Evolution PHP framework
Maintainers
Readme
EvoPHP CLI - Comprehensive Guide
Overview
EvoPHP CLI is a command-line interface designed to simplify the development and management of projects, plugins, and themes within the EvoPHP ecosystem. With intuitive commands and shorthands, developers can quickly set up projects, manage dependencies, and handle plugin/theme creation and installation with ease.
Table of Contents
- Installation
- All Commands
- Plugin & Theme Dependencies
- Authentication & PAT Storage
- Further Documentation
Installation
Prerequisites
Ensure the following are installed on your system:
- Node.js: Verify with
node -vandnpm -v - Composer: Required for PHP dependencies
Install EvoPHP
npm install -g evophpThis makes the evophp CLI available globally.
All Commands
Initialization
evophp init [project-name]Initializes a new EvoPHP project.
Examples:
evophp init evophp init my-project
Plugin/Theme Creation
evophp new plugin <name>
evophp new theme <name>
evophp n plugin <name>
evophp n theme <name>Creates a new plugin or theme from a template in your own GitHub account.
Supports:
- Just
<name>→ Uses your GitHub account (token required) - ⚠️ You can only create repositories under your GitHub account.
- Just
Examples:
evophp new plugin MyPlugin # Creates in your GitHub evophp n theme MyTheme # Creates in your GitHub
Plugin/Theme Installation
evophp install plugin <name>
evophp install theme <name>
evophp i plugin <name>
evophp i theme <name>Installs a plugin or theme from GitHub into your project.
Supports:
- Just
<name>→ Clones from your GitHub account (token required) <author>/<name>→ Clones from public GitHub repo (no token required)
- Just
Examples:
evophp install plugin MyPlugin evophp i theme johndoe/EvoThemeAutomatic dependency installation: If the plugin or theme includes a
dependencies.jsonfile, EvoPHP will automatically install all listed JS/PHP packages and any dependent EvoPHP plugins or themes. See Plugin & Theme Dependencies.
Plugin/Theme Uninstallation
evophp uninstall plugin <name>
evophp uninstall theme <name>
evophp u plugin <name>
evophp u theme <name>Removes the installed plugin or theme from the project.
Also removes any EvoPHP plugin/theme dependencies that were installed alongside it — unless they are still required by another installed plugin or theme, in which case they are retained.
Examples:
evophp uninstall plugin MyPlugin evophp u theme EvoTheme
Dependency Management
evophp install-dependencies <plugin-name>
evophp d <plugin-name>- Adds or installs plugin dependencies — npm packages, Composer packages, or other EvoPHP plugins/themes.
Production (npm):
evophp d MyPluginDevelopment (npm):
evophp d MyPlugin --devPHP (Composer):
evophp d MyPlugin --composerEvoPHP Plugin dependency:
evophp d MyPlugin --evoplugin- Prompts for one or more
author/name(or plainname) EvoPHP plugins to add as dependencies. - Clones and installs each listed plugin into the project.
- Records them under the
"plugin"key inMyPlugin'sdependencies.json. - A GitHub token is only required when a dependency is provided without an
author/prefix.
EvoPHP Theme dependency:
evophp d MyPlugin --evotheme- Same as
--evopluginbut for themes — clones, installs, and records under the"theme"key independencies.json.
Entry Management
evophp entry <plugin> <entry>
evophp e <plugin> <entry>Adds a new entry point to a plugin.
Prompts for:
- Landing page name (default:
index) - Route path
- Role access permissions (IDs from config.json)
- Page title
- Landing page name (default:
Creates:
- Blade view file
- JavaScript entry and router files
- Route entry in
Routes.php
Example:
evophp entry MyPlugin DashboardPatch PHP & JS Dependencies
evophp patch --upgrade
evophp pThis is used to update core libraries of EvoPhp.
Plugin & Theme Dependencies
EvoPHP supports a dependencies.json file at the root of any plugin or theme. This file declares all dependencies that should be automatically resolved during installation.
Structure
{
"prod": "qrcode.vue vue3-qrcode-reader jspdf @fullcalendar/core @fullcalendar/vue3",
"dev": "",
"plugin": "kinsokafor/Invoice kinsokafor/GooglePack",
"theme": "kinsokafor/BSTTheme"
}| Key | Type | Description |
|---|---|---|
| prod | string | Space-separated npm packages to install as production dependencies |
| dev | string | Space-separated npm packages to install as dev dependencies |
| plugin | string | Space-separated author/name EvoPHP plugins this plugin/theme depends on |
| theme | string | Space-separated author/name EvoPHP themes this plugin/theme depends on |
Automatic Installation
When you run evophp install, EvoPHP will:
- Clone the plugin or theme from GitHub.
- Read its
dependencies.json(if present). - Install all listed npm (
prod/dev) and Composer (prod) packages. - Recursively install any EvoPHP plugins or themes listed under
"plugin"and"theme"— each of which may declare their owndependencies.json, resolved the same way.
Automatic Uninstallation
When you run evophp uninstall, EvoPHP will:
- Remove the target plugin or theme.
- Check each of its EvoPHP plugin/theme dependencies.
- Remove a dependency only if no other installed plugin or theme still requires it. If another plugin depends on it, it is retained and a notice is shown.
Example:
PluginA depends on → Invoice, GooglePack
PluginB depends on → Invoice
evophp uninstall plugin PluginA
✔ PluginA removed
⚠ Invoice retained (still required by PluginB)
✔ GooglePack removedAuthentication & PAT Storage
When using a command with just <name> (e.g. evophp new plugin MyPlugin), EvoPHP CLI will:
- Prompt you for a GitHub Personal Access Token (PAT) the first time
- Automatically store it in
.env.developmentfor future use - Use that token to fetch your GitHub username and manage private/public repos
⚠️ You can only create repositories in your own GitHub account.
To change your token later, simply edit or delete
.env.development.
Further Documentation
More advanced use cases, templates, and configuration details coming soon at:
📘 Official EvoPHP Documentation
