nstalll:

1,cd /usr/local/bin && curl -LO http://pestle.pulsestorm.net/pestle.phar

2,chmod +x ./pestle.phar && ./pestle.phar --version && alias pestle='php /usr/local/bin/pestle.phar' && pestle --version ;

3,-

(Notice: Need install Zsh Package.)

命令帮助:

  • php /usr/local/bin/pestle.phar list-commands 查看命令列表
  • pestle 快速使用参考命令:
    • 生成模块 :   php /usr/local/bin/pestle.phar generate_module Mc (verdor) Gtest (module) 0.0.1
    • 生成ACL规则:   php /usr/local/bin/pestle.phar generate_acl
    • 生成菜单 :   php /usr/local/bin/pestle.phar generate_menu
    • 生成CURD :    php /usr/local/bin/pestle.phar generate_crud_model Mc_Gtest (verdor_module) Gtest (Table)
    • 生成路由 :    php /usr/local/bin/pestle.phar generate_route Mc_Gtest frontend mc_gtest
    • 生成前端 :    php /usr/local/bin/pestle.phar generate_view Mc_Gtest frontend mc_gtest_index_index Main content.phtml
    • 生成ui - grid:    php /usr/local/bin/pestle.phar magento2:generate:ui:grid
      -$ php /usr/local/bin/pestle.phar magento2:generate:ui:grid
      Which Module? (Pulsestorm_Gridexample)] Mc_Gtest #包_模块
      Create a unique ID for your Listing/Grid! (pulsestorm_gridexample_log)] mc_gtest_gtest_listing #包_模块_表名_log
      What Resource Collection Model should your listing use? (Magento\Cms\Model\ResourceModel\Page\Collection)] Mc\Gtest\Model\ResourceModel\Gtest\Collection #集合资源模型的类
      What's the ID field for you model? (pulsestorm_gridexample_log_id)] gtest_id #表主键
      #以下为生成文件结果
      Creating New /Users/jerryxu/wwwroot/just4/app/code/Mc/Gtest/view/adminhtml/ui_component/mc_gtest_gtest_listing.xml
      Creating: Mc\Gtest\Ui\Component\Listing\DataProviders\Mc\Gtest\Gtest\Listing
      Creating: Mc\Gtest\Ui\Component\Listing\Column\Mcgtestgtestlisting\PageActions
      Don't forget to add this to your layout XML with <uiComponent name="mc_gtest_gtest_listing"/>

        ----

    • -

=============================

Help:

Usage:
pestle command_name [options] [arguments]

Available commands:

Alanstormdotcom
alanstormdotcom:rsync One Line Description

Codecept
codecept:convert-selenium-id-for-codecept Converts a selenium IDE html test for conception

Faker
faker:names Creates some Fake Name

Magento1 Convert
magento1:convert:generate-maps ALPHA: Wrapper for Magento's code-migration tools
magento1:convert:magentoinc ALPHA: Wrapper for Magento Inc.'s code-migration tool
magento1:convert:unirgy ALPHA: Wrapper for Unirgy Magento Module Conversion

Magento2
magento2:base-dir Output the base magento2 directory
magento2:check-templates Checks for incorrectly named template folder
magento2:class-from-path Turns a Magento file path into a PHP class
magento2:class-list Get a list of all of magento2's extensible classes
magento2:convert-class ALPHA: Partially converts Magento 1 class to Magento 2
magento2:convert-observers-xml ALPHA: Partially converts Magento 1 config.xml to Magento 2
magento2:convert-system-xml ALPHA: Partially Converts Magento 1 system.xml into Magento 2 system.xml
magento2:extract-mage2-system-xml-paths Generates Mage2 config.xml
magento2:fix-direct-om ALPHA: Fixes direct use of PHP Object Manager
magento2:fix-permissions-modphp ALPHA: "Fixes" permissions for development boxes
magento2:path-from-class Turns a PHP class into a Magento 2 path
magento2:read-rest-schema BETA: Magento command, reads the rest schema on a Magento system

Magento2 Code-migration
magento2:code-migration:rename ALPHA: Rename .converted files

Magento2 Generate
magento2:generate:acl Generates a Magento 2 acl.xml file.
magento2:generate:acl:change-title Changes the title of a specific ACL rule in a Magento 2 acl.xml file
magento2:generate:class-child Generates a child class, pulling in __constructor for easier di
magento2:generate:command Generates bin/magento command files
magento2:generate:config-helper Generates a help class for reading Magento's configuration
magento2:generate:controller-edit-acl Edits the const ADMIN_RESOURCE value of an admin controller
magento2:generate:crud-model Generates a Magento 2 CRUD/AbstractModel class and support files
magento2:generate:di Injects a dependency into a class constructor
magento2:generate:full-module Creates shell script with all pestle commands needed for full module output
magento2:generate:install BETA: Generates commands to install Magento via composer
magento2:generate:menu Generates configuration for Magento Adminhtml menu.xml files
magento2:generate:module Generates new module XML, adds to file system
magento2:generate:observer Generates Magento 2 Observer
magento2:generate:plugin-xml Generates plugin XML
magento2:generate:preference Generates a Magento 2.1 ui grid listing and support classes.
magento2:generate:psr-log-level For conversion of Zend Log Level into PSR Log Level
magento2:generate:registration Generates registration.php
magento2:generate:remove-named-node Removes a named node from a generic XML configuration file
magento2:generate:route Creates a Route XML
magento2:generate:schema-upgrade BETA: Generates a migration-based UpgradeSchema and UpgradeData classes
magento2:generate:service-contract ALPHA: Service Contract Generator
magento2:generate:theme Generates Theme Configuration
magento2:generate:ui:add-column-text Adds a simple text column to a UI Component Grid
magento2:generate:ui:add-form-field Adds a Form Field
magento2:generate:ui:add-form-fieldset Add a Fieldset to a Form
magento2:generate:ui:add-schema-column Genreated a Magento 2 addColumn DDL definition and inserts into file
magento2:generate:ui:add-to-layout Adds a <uiComponent/> node to a named node in a layout update XML file
magento2:generate:ui:form Generates a Magento 2 UI Component form configuration and PHP boilerplate
magento2:generate:ui:grid Generates a Magento 2.1 ui grid listing and support classes.
magento2:generate:view Generates view files (layout handle, phtml, Block, etc.)

Magento2 Scan
magento2:scan:acl-used Scans modules for ACL rule ids, makes sure they're all used/defined
magento2:scan:class-and-namespace BETA: Scans a Magento 2 module for misnamed PHP classes
magento2:scan:htaccess ALPHA: Checks for missing Magento 2 HTACCESS files from a hard coded list
magento2:scan:registration Scans Magento 2 directories for missing registration.php files

Magento2 Search
magento2:search:search-controllers Searches controllers

Mysql
mysql:key-check Looks for Invalid Keys in a MySQL Database

Nexmo
nexmo:send-text Sends a text message
nexmo:store-credentials Stores Nexmo API in temp file
nexmo:verify-request Sends initial request to verify user's phone number
nexmo:verify-sendcode Nexmo Verify API: Second Step

Parsing
parsing:citicard BETA: Parses Citicard's CSV files into yaml
parsing:csv-to-iif BETA: Converts a CSV file to .iif

Pestle
pestle:baz-bar Another Hello World we can probably discard
pestle:build-command-list Builds the command list
pestle:clear-cache BETA: Clears the pestle cache
pestle:dev-import Another Hello World we can probably discard
pestle:dev-namespace BETA: Used to move old pestle files to module.php -- still needed?
pestle:export-as-symfony Exports a Pestle Module as a Symfony Console Command
pestle:export-module ALPHA: Seems to be a start at exporting a pestle module as functions.
pestle:foo-bar ALPHA: Another Hello World we can probably discard
pestle:generate-command Generates pestle command boiler plate
pestle:hello-argument A demo of pestle argument and option configuration/parsing
pestle:pestle-run-file ALPHA: Stub for running a single PHP file in a pestle context

Php
php:extract-session ALPHA: Extracts data from a saved PHP session file
php:format-php ALPHA: Experiments with a PHP formatter.
php:test-namespace-integrity ALPHA: Tests the "namespace integrity? Not sure what this is anymore.

Postscript
postscript:check Outputs the PostScript code needed to print a check

Pulsestorm
pulsestorm:build-book BETA: Command for building No Frills Magento 2 Layout
pulsestorm:md-to-say Converts a markdown files to an aiff
pulsestorm:monty-hall-problem Runs Simulation of "Monty Hall Problem"
pulsestorm:orphan-content BETA: Used to scan my old pre-Wordpress archives for missing pages.
pulsestorm:pandoc-md BETA: Uses pandoc to converts a markdown file to pdf, epub, epub3, html, txt
pulsestorm:solo-noble One Line Description

Uncategorized
hello-world A Hello World command. Hello World!
help Alias for list
list-commands Lists help
selfupdate Updates the pestle.phar file to the latest version
test-output A test command for the output function that should probably be pruned
testbed Test Command
version Displays Pestle Version

pestle.phar的更多相关文章

  1. PHP的学习--使用phar打包

    前段时间写了几个PHP的脚本,但是因为脚本的项目是基于composer安装的,给别人使用的时候不太方便,就希望能够打包成一个能直接使用的文件. 搜索了一下,发现可以使用phar打包. 假设我们有如下一 ...

  2. phar文件的使用

    1.用php命令行 php phar文件 2.生成bat文件,在命令行下使用,以composer.phar为例 ( 1)在php.exe所在目录新建composer.bat文件 (2)把compose ...

  3. 使用phar上线你的代码包

    在我前一阵子写的一篇文章<新版 SegmentFault 重构之系统架构>中,很多人对其中提到的利用phar上线代码比较感兴趣,我就在这边跟大家分享下我目前的做法. 哪些项目适合phar打 ...

  4. PHP中phar包的使用

    PHP5.3之后支持了类似Java的jar包,名为phar.用来将多个PHP文件打包为一个文件. 首先需要修改php.ini配置将phar的readonly关闭,默认是不能写phar包的,includ ...

  5. Yii2框架打包成Phar包报错的经历

    以yii2为例 打包文件过程比较简单,但打包好以后简单测试yii命令,一直报错: PHP Fatal error: Uncaught yii\base\InvalidParamException: T ...

  6. Phar与Composer

    如果你想把PHP玩出像Java那样的花来,那Phar.Composer甚至Phing应该都是必须要玩一遍的. Phar - Php Archive.包管理器,有些类似Java中的jar包,但有所不同. ...

  7. Phar文件

    phar 扩展名文件提供了一种将整个PHP应用程序打包放入一个被称之为phar(PHP archive)的文件从而更加容易便利地发布和安装的方法.就像是java的jar文件有点类似.除了这个功能外,P ...

  8. 简单使用 PHP Phar 打包php代码 笔记

    Phar简介:Phar 归档的概念来自 Java™ 技术的 JAR 归档,它允许使用单个文件打包应用程序,这个文件中包含运行应用程序所需的所有东西.该文件不同于单个可执行文件,后者通常由编程语言生成, ...

  9. Could not open input file: composer.phar

    Yii 2官网推荐用Composer安装框架,但是在本地出错:Could not open input file: composer.phar.后来修改了命令行就ok了,难道是我装的Composer跟 ...

随机推荐

  1. SQL Server Mirror 断开后,删除副本上镜像数据库

    一般而言,SQL Server 在数据库级别进行数据同步的方式主要有三种 1.日志传送:2.Mirror(镜像):3. AlwaysOn.复制订阅技术理解为表级别的同步,不归结为数据库级别的同步. 在 ...

  2. Python第二天 变量 运算符与表达式 input()与raw_input()区别 字符编码 python转义符 字符串格式化 format函数字符串格式化 帮助

    Python第二天  变量  运算符与表达式  input()与raw_input()区别  字符编码  python转义符  字符串格式化  format函数字符串格式化  帮助 目录 Pychar ...

  3. Spring MVC 表单校验 (七)

    完整的项目案例: springmvc.zip 目录 实例 除了依赖spring-webmvc还需要依赖jackson-databind(用于转换json数据格式)和hibernate-validato ...

  4. .net向文件写入字符串流内存溢出的问题

    字符串过大导致抛出异常: exceptopm of type 'system.outOfmemoryexception' was thrown 解决方法:逐块写入可以避免这个问题

  5. Apollo的Oracle适配改动

    这几天工作需要使用Apollo配置中心.Apollo唯一的依赖是MySQL数据库,然而公司只有Oracle数据库资源.这里有一个Oracle适配改动的分支,但是它是基于0.8.0版本的Apollo.看 ...

  6. Linux 匿名页的反向映射

    我们知道LINUX的内存管理系统中有"反向映射"这一说,目的是为了快速去查找出一个特定的物理页在哪些进程中被映射到了什么地址,这样如果我们想把这一页换出(SWAP),或是迁移(Mi ...

  7. 利用ZYNQ SOC快速打开算法验证通路(5)——system generator算法IP导入IP integrator

    一.前言 利用FPGA设计算法一直以来都是热点,同样也是难点.将复杂的数学公式 模型通过硬件系统来搭建,在低延时 高并行性等优势背后极大提高了设计难度和开发周期.Xilinx公司的sysGen(sys ...

  8. python文章装饰器理解12步

    1. 函数 在python中,函数通过def关键字.函数名和可选的参数列表定义.通过return关键字返回值.我们举例来说明如何定义和调用一个简单的函数: def foo(): return 1 fo ...

  9. 【English】20190315

    accelerate 加速 [ækˈsɛləˌret]  Our goal is to help you be more successful in your role and work togeth ...

  10. RabbitMQ安装后无法访问https://localhost:15672/ 控制台问题解决

    1.安装完后 我们进入到我们安装到 sbin目录C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.2\sbin执行:rabbitmq-plugi ...