ceus-media / hymn
Hymn - 安装 Hydrogen 应用程序的控制台工具。
1.0.0
2024-05-14 01:00 UTC
Requires (Dev)
- php-parallel-lint/php-parallel-lint: ^1.3 | dev-master
- phpstan/phpstan: ^1
- phpstan/phpstan-strict-rules: ^1
- phpunit/phpunit: ^9.5 | ^10.2
- rector/rector: *
- dev-master
- 1.1.x-dev
- 1.0.x-dev
- 1.0.0
- 0.9.x-dev
- 0.9.11
- 0.9.10
- 0.9.9.5
- 0.9.9.4
- 0.9.9.3
- 0.9.9.2
- 0.9.9.1
- 0.9.9.0
- 0.9.8.9
- 0.9.8.8
- 0.9.8.7
- 0.9.8.6
- 0.9.8.5
- 0.9.8.4
- 0.9.8.3
- 0.9.8.1
- 0.9.8
- 0.9.7.9
- 0.9.7.8
- 0.9.7.7
- 0.9.7.6
- 0.9.7.5
- 0.9.7.4
- 0.9.7.3
- 0.9.7.1
- 0.9.7
- 0.9.6.1
- 0.9.6
- 0.9.5
- 0.9.4.9
- 0.9.4.8
- 0.9.4.7
- 0.9.4.6
- 0.9.4.5
- 0.9.4.4
- 0.9.4.3
- 0.9.4.2
- 0.9.4.1
- 0.9.4
- 0.9.3.5
- 0.9.3.4
- 0.9.3.3
- 0.9.3.1
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9
- 0.8.9
- 0.8.8
- 0.8.7
- 0.8.6
- 0.8.5
- dev-1.0.x-php8.3
- dev-1.0.x-module-config
This package is auto-updated.
Last update: 2024-09-11 22:02:00 UTC
README
_
| |_ _ _ _____ ___
| | | | | |
|_|_|_ |_|_|_|_|_|
|___|
hymn - Hydrogen 管理
Hymn
Hymn - 安装 Hydrogen 应用程序的控制台工具。
安装
PHAR 下载
sudo curl -LsS https://github.com/CeusMedia/Hymn/raw/master/hymn.phar -o /usr/local/bin/hymn
sudo chmod a+x /usr/local/bin/hymn
检出
git checkout https://github.com/CeusMedia/Hymn.git
sudo mv Hymn/hymn.phar /usr/local/bin/hymn
rm -Rf Hymn
之后,hymn
命令将在系统范围内可用。您可以通过显示您喜欢的任何文件夹中的当前版本来检查安装。
> hymn version
0.9.9.0 (en)
升级
运行 hymn self-update
以安装最新版本。您可以通过提供所需的版本来安装任何标记版本,例如 hymn self-update 0.9.9.0
。
用法
关键词
- Project = Blueprint for an App installation configured by Hymn file
- App = Set if installed modules, built or installed by project configuration
- Source = Shelf within the library of available modules
命令
A. 配置管理
要创建和扩展项目 Hymn 配置文件,您执行以下命令
1. 项目创建和源管理
- init Create initial Hymn file for this project
- source-list List library sources registered in Hymn file
- source-add Add module source of modules to Hymn file
- source-remove KEY Remove module source from Hymn file
- source-enable [-dfqv] SOURCE Enable source in Hymn file
- source-disable [-dfqv] SOURCE Disable source in Hymn file
2. 项目设置和信息
- config-get KEY Get setting from Hymn file
- config-set KEY [VALUE] Enter and save setting in Hymn file
- database-config Enter and save database connection details
- database-test Test database connection
3. 项目模块管理
- config-module-add Add a module to Hymn file
- config-module-remove Remove a module from Hymn file
- config-module-get MODULE.KEY Get module setting from Hymn file
- config-module-set MODULE.KEY [VALUE] Enter and save module setting in Hymn file
4. 项目模块信息
- module-info [-v] MODULE [SOURCE] Show information about module (in library source)
- modules-available [SOURCE] List modules available (in library source)
- modules-installed [SOURCE] List modules installed within application (from library source)
- modules-required List modules required for application
- modules-search NAME [SOURCE] List modules found by name part (within library source)
- modules-updatable List modules with available updates
- modules-unneeded List modules not needed by other modules
B. 应用程序管理
拥有有效的 Hymn 配置文件后,您执行以下命令
1. 应用程序基本配置管理
- app-base-config-disable [-dqv] KEY Disable an enabled setting in config.ini
- app-base-config-enable [-dqv] KEY Enable a disabled setting in config.ini
- app-base-config-get KEY Read setting from config.ini
- app-base-config-set [-dqv] KEY VALUE Save setting in config.ini
2. 应用实例和模块管理
- app-info [-v] Show app setup
- app-status [-v] Show status of app and its modules
- app-graph Render module relations graph (see config/modules.graph.png)
- app-sources List installed library sources
- app-move DESTINATION [URL] Move app to another folder (and adjust app base URL)
3. 应用模块管理
- app-install [-dqv] [MODULE+] Install specific available module(s) (or all)
- app-uninstall [-dfqv] [MODULE+] Uninstall specific installed module(s) (or all)
- app-update [-dqv] [MODULE+] Updated specific installed modules(s) (or all)
- app-module-config-get MODULE.KEY Get config value of installed module by config key
- app-module-config-set MODULE.KEY VALUE Set config value of installed module by config key
- app-module-config-dump [--file=.hymn] Export current module settings into Hymn file
- app-module-reconfigure [-dqv] MODULE Configure installed module
4. 应用数据库管理
- database-clear [-dfqv] Drop database tables
- database-dump [PATH] Export database to SQL file
- database-load [PATH|FILE] Import (specific or latest) SQL file
- database-keep [KEEP_RULES] Remove database dumps not meeting the keep rules
Keep Rules:
--daily=[DAYS] Number of daily dumps to keep
--monthly=[MONTHS] Number of monthly dumps to keep
--yearly=[YEARS] Number of yearly dumps to keep
5. 应用标记管理
- app-stamp-dump [SOURCE] Export current module settings into a stamp file
- app-stamp-diff [PATH|FILE] [TYPE] [SOURCE] [MODULE] Show changes between installed modules and stamp
- app-stamp-load [PATH|FILE] [TYPE] [SOURCE] [MODULE] Restore module settings of stamp (not implemented yet)
- app-stamp-prospect TYPE [SOURCE] Show changes when updating outdated modules
- app-stamp-info [PATH|FILE] [TYPE*] [SOURCE] [MODULE] Display details of stamp
C. 其他功能
1. 自管理
- help Show this help screen
- version Show current hymn version
- self-update [-dv] [VERSION] Replace hymn binary by master or given version
- test-syntax [-rqv] [PATH] Test syntax of Hymn PHP classes
2. 标记管理
- stamp-diff [PATH|FILE] [TYPE] [SOURCE] [MODULE] Show changes between available modules and stamp
选项
-d | --dry Actions are simulated only
-f | --force Continue actions on error or warnings
-q | --quiet Avoid any output
-v | --verbose Be verbose about taken steps
-r | --recursive Perform file actions recursively (used by test-syntax only)
--file=[.hymn] Alternative path of Hymn file
--prefix=[<%prefix%>] Set database table prefix in dump
--db=[yes,no,only] Switch to enable changes in database (default: yes)
make
的命令
create [MODE=(prod|dev)] Create Phar file `hymn.phar` in PROD or DEV mode (default: PROD)
create-phar Create Phar file `hymn.phar` in PROD mode (default)
create-phar-dev Create Phar file `hymn.phar` in DEV mode
install Alias for install-link
install-copy Install hymn.phar as copy in /usr/local/bin/hymn
install-link Install hymn.phar as symlink in /usr/local/bin/hymn
test-syntax Test syntax of local PHP class files (using hymn test-syntax)
test-units Run PhpUnit (if installed) to test source files
uninstall Remove global file or symlink /usr/local/bin/hymn
update Apply remote updates to local installation
create / create-phar
在默认 LIVE 模式下创建 Phar 文件 hymn.phar
。
生成的文件
- 包含精简的 PHP 文件(例如,删除了注释)
- 已压缩
- 将在内部异常上显示虚假信息(使用 DEV 模式进行调试)
create-phar-dev
在 DEV 模式下创建 Phar 文件 hymn.phar
。
生成的文件
- 包含原始 PHP 文件
- 未压缩
- 可用于调试内部错误
install
将使用 install-link
将 hymn.phar 链接到全局作用域。
install-copy
通过在 /usr/local/bin/hymn
中创建副本来将 hymn.phar
安装到全局作用域。
将会
- 删除
/usr/local/bin/hymn
- 将本地
hymn.phar
复制到/usr/local/bin/hymn
install-link
通过在 /usr/local/bin/hymn
中创建符号链接来将 hymn.phar
安装到全局作用域。
将会
- 删除
/usr/local/bin/hymn
- 将本地
hymn.phar
链接到/usr/local/bin/hymn
test-syntax
将使用 hymn test-syntax
测试本地 PHP 类文件的语法。
test-units
如果已安装,将运行 PhpUnit 以测试源文件。
uninstall
将删除全局文件或符号链接 /usr/local/bin/hymn
。
update
将应用远程更新到本地安装。
将会
- 打印当前版本
- 将本地更改还原到
hymn.phar
- 存储本地更改
- 抓取更新
- 使用
rebase
合并更新和本地提交 - 应用存储的本地更改
- make create-phar
附录
免责声明
使用 patorjk.com 渲染的标志