CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 02:31:35 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"0e8b06e1f71bb290bf775468206288f0"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=ADqlqaDkQ3fOptfGeTi3L3WntzOzrwATvRNEl6%2FPG4w%2BrF%2Fl69u%2F7hc4xG18o6akDQcOlYVdRazDmj7IylIAnmEpYI%2FQGgh3GDGjlOI1z7kk8YsA32wnBX8p5FX7%2BH1QdXGdIyWp8eR1spYnpPTWZMhhuSNyK%2Fd%2FDL0lt52iz26gpO1D%2BZL%2F9upadfMuykm9YPpN7yJFLULtjSr%2FSpwLuYMkext11JWtZ9aMjBuuqVnS4UUSrBkgU%2FNaTk0YhODT5VMS958OTaKQ0Hmhk8XA4g%3D%3D--%2B9utx%2BLnrREK4Ymd--irj%2FX7t%2Fm9e23m%2BD7AqMKQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1626607939.1753497095; Path=/; Domain=github.com; Expires=Sun, 26 Jul 2026 02:31:35 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 26 Jul 2026 02:31:35 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: E264:1FA760:CDE52:14134A:68843E07
overview · inhere/php-console Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 48
overview
Inhere edited this page Jan 10, 2019
·
1 revision
简洁、功能全面的php命令行应用库。提供控制台参数解析, 命令运行,颜色风格输出, 用户信息交互, 特殊格式信息显示。
- 命令行应用, 命令行的
controller
,command
解析运行 - 支持给命令设置别名,一个命令可以有多个别名。支持命令的显示/隐藏,启用/禁用
- 功能全面的命令行的选项参数解析(命名参数,短选项,长选项 ...)
- 命令行的
input
,output
信息管理、使用 - 命令方法注释自动解析为帮助信息(默认提取
@usage
@arguments
@options
@example
等信息) - 支持输出多种颜色风格的消息文本(
info
,comment
,success
,warning
,danger
,error
... ) - 常用的特殊格式信息显示(
section
,panel
,padding
,helpPanel
,table
,tree
,title
,list
,multiList
) - 丰富的动态信息显示(
pending/loading
,pointing
,spinner
,counterTxt
,dynamicText
,progressTxt
,progressBar
) - 常用的用户信息交互支持(
select
,multiSelect
,confirm
,ask/question
,askPassword/askHiddenInput
) - 支持类似
symfony/console
的预定义参数定义(按位置赋予参数值, 需要严格限制参数选项时推荐使用) - 颜色输出是
windows
,linux
,mac
兼容的,不支持颜色的环境会自动去除相关CODE - 使用方便简单。可以方便的整合到任何已有项目中。
- 内置Phar工具类,可以方便的将应用打包成
phar
文件,方便作为工具分发和使用- 运行示例中的命令
php examples/app phar:pack
,会将此console库打包成一个app.phar
- 运行示例中的命令
- 内置的简单的命令行文件下载工具类,支持进度条显示
- 命令行的php代码高亮支持(来自于
jakub-onderka/php-console-highlighter
并做了一些优化调整) -
Terminal::class
简单的Terminal屏幕、光标控制操作类 -
ProcessUtil::class
简单的进程操作使用类(fork,run,stop,wait ... 等) - 支持快速的为当前应用生成
bash/zsh
环境下的自动补全脚本
文档里显示的所有的特性,效果都是运行
examples/
中的示例代码php examples/app
展示出来的。基本上涵盖了所有功能,可以直接测试运行
我的其他PHP项目
- inhere/kite 方便本地开发和使用的个人CLI工具应用
- php-toolkit/pflag PHP编写的,通用的命令行标志(选项和参数)解析库
- phppkg/easytpl 使用简单且快速的 PHP 模板引擎
- inhere/php-validate 一个简洁小巧且功能完善的php验证库
- inhere/sroute 轻量且快速的HTTP请求路由库
You can’t perform that action at this time.