installl:

1,cd /usr/local/bin && curl -O https://files.magerun.net/n98-magerun2.phar

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

(Notice: Need install Zsh Package.)

3.--

Usage / Commands

  • 
    

    n98 list

  • n98 open-browser

help:

Usage:
command [options] [arguments]

Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--root-dir[=ROOT-DIR] Force magento root dir. No auto detection
--skip-config Do not load any custom config.
--skip-root-check Do not check if n98-magerun runs as root
--skip-core-commands[=SKIP-CORE-COMMANDS] Do not include Magento 2 core commands
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
help Displays help for a command
install Install magento
list Lists commands
mysql-client Opens mysql client by database config from env.php
open-browser Open current project in browser (experimental)
script Runs multiple n98-magerun commands
self-update Updates n98-magerun2.phar to the latest version.
selfupdate Updates n98-magerun2.phar to the latest version.
shell Runs n98-magerun as shell
admin
admin:notifications Toggles admin notifications
admin:user:change-password Changes the password of a adminhtml user.
admin:user:delete Delete the account of a adminhtml user.
admin:user:list List admin users.
cache
cache:clean Clean magento cache
cache:disable Disables Magento caches
cache:enable Enables Magento caches
cache:flush Flush magento cache storage
cache:list Lists all magento caches
cache:report View inside the cache
cache:view Prints a cache entry
config
config:data:acl Prints acl.xml data as table
config:data:di Dump dependency injection config
config:store:delete Deletes a store config item
config:store:get Get a store config item
config:store:set Set a store config item
customer
customer:change-password Changes the password of a customer.
customer:create Creates a new customer/user for shop frontend.
customer:info Loads basic customer info by email address.
customer:list Lists all magento customers
db
db:console Opens mysql client by database config from env.php
db:create Create currently configured database
db:drop Drop current database
db:dump Dumps database with mysqldump cli client
db:import Imports database with mysql cli client according to database defined in env.php
db:info Dumps database informations
db:maintain:check-tables Check database tables
db:query Executes an SQL query on the database defined in env.php
db:status Shows important server status information or custom selected status values
db:variables Shows important variables or custom selected
design
design:demo-notice Toggles demo store notice for a store view
dev
dev:asset:clear Clear static assets
dev:console Opens PHP interactive shell with initialized Mage::app() (Experimental)
dev:module:create Create and register a new magento module.
dev:module:list List all installed modules
dev:module:observer:list Lists all registered observers
dev:report:count Get count of report files
dev:symlinks Toggle allow symlinks setting
dev:template-hints Toggles template hints
dev:template-hints-blocks Toggles template hints block names
dev:theme:list Lists all available themes
eav
eav:attribute:list List EAV attributes
eav:attribute:remove Remove attribute for a given attribute code
eav:attribute:view View information about an EAV attribute
generation
generation:flush Flushs generated code like factories and proxies
index
index:list Lists all magento indexes
index:trigger:recreate ReCreate all triggers
media
media:dump Creates an archive with content of media folder.
script
script:repo:list Lists all scripts in repository
script:repo:run Run script from repository
search
search:engine:list Lists all registered search engines
sys
sys:check Checks Magento System
sys:cron:history Last executed cronjobs with status.
sys:cron:list Lists all cronjobs
sys:cron:run Runs a cronjob by job code
sys:cron:schedule Schedule a cronjob for execution right now, by job code
sys:info Prints infos about the current magento system.
sys:maintenance Toggles maintenance mode if --on or --off preferences are not set
sys:setup:change-version Change module resource version
sys:setup:compare-versions Compare module version with setup_module table.
sys:setup:downgrade-versions Automatically downgrade schema and module versions
sys:store:config:base-url:list Lists all base urls
sys:store:list Lists all installed store-views
sys:url:list Get all urls.
sys:website:list Lists all websites

n98-magerun2.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. 使用Python下载工具you-get下载媒体文件

    You-Get是一个基于 Python 3 的下载工具.使用 You-Get 可以很轻松的下载到网络上的视频.图片及音乐. 使用you-get下载媒体文件 1.安装Python(步骤详情见另一篇文章) ...

  2. Android学习笔记之SoftReference软引用,弱引用WeakReference

    SoftReference可以用于bitmap缓存 WeakReference 可以用于handler 非静态内部类和匿名内部类容易造成内存泄漏 private Handler mRemoteHand ...

  3. 红米Note 5A完美卡刷开发版获得ROOT超级权限的方法

    小米的手机不同手机型号一般情况官方论坛都提供两个不同的系统,大概可分为稳定版和开发版,稳定版没有提供root权限管理,开发版中就支持了root权限,在很多工作的时候我们需要使用的一些功能强大的APP, ...

  4. Vue之虚拟DOM

    一.真实DOM和其解析流程? 浏览器渲染引擎工作流程都差不多,大致分为5步,创建DOM树——创建StyleRules——创建Render树——布局Layout——绘制Painting 第一步,用HTM ...

  5. 为Arch Linux安装搜狗输入法

    我们在使用电脑的时候很多时候需要输入中文,这个时候如果没有一个中文输入法那么就是一件非常尴尬的事情了.我门现在开始在我们的archlinux来安装sougou输入法 1.我们需要配置我们的源 arch ...

  6. 用Angular部署Cesium

    用到的集成开发环境是WebStrom,Cesium版本是1.50.0,Angular版本是6.2.4  1.首先我们安装cesium,在webstorm中的Termianl中输入 npm instal ...

  7. Eclipse链接数据库

    在eclipse中找到数据库 选择数据库 然后点击next 填写数据库信息 选择需要执行的SQL语句 ALT+X 或者 右键点击execute selected text: 执行结果: 有问题请在评论 ...

  8. ORACLESQL语句的优化

    ORACLESQL语句的优化: 选择最有效率的表名顺序:应该选择记录条数最少的表作为基表! 因为Oracle解析器的处理顺序是从右至左的.当ORACLE处理多个表时, 会运用排序及合并的方式连接它们. ...

  9. js前端导出Excel表格后数字自动变成科学计数法问题

    一般的文件导出都是后端进行导出,最近一个项目遇到导出接口挂掉了,前端实现导出的情况. 背景是vue框架,iView组件.可以直接使用exportCsv方法进行导出. 导出时进行一下行和列的切割就可以了 ...

  10. day6-基础函数的学习(一)

    今日份目录 1.函数的定义 2.函数的返回值 3.函数的参数 4.函数的局部变量与全局变量 5.名称空间与作用域 6.global与nonlocal 7.高阶函数 继续今日份总结!这个总结也晚了,哎, ...