承接 pstaender/kirby-console 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pstaender/kirby-console

最新稳定版本:0.0.9

Composer 安装命令:

composer require pstaender/kirby-console

包简介

kirby REPL

README 文档

README

Your REPL for Kirby CMS projects

Ever wanted to experiment with your Kirby project on the fly, right from the command line? With Kirby Console, you can inspect and alter your project data instantly, no need to query the website!

Installation

The easiest way to get started is by installing Kirby Console globally with composer:

$ composer global require pstaender/kirby-console

Usage

Jump into your Kirby project folder and run:

$ kconsole

You’ll be greeted with something like:

Psy Shell v0.12.4 (PHP 8.2.22 — cli) by Justin Hileman
Kirby v4.1.0
>>>

Work with kirby(), page() and site() as you used to know:

>>> kirby()->version()
=> "4.1.0"

Impersonate

Need to work as a specific user? Pass the user’s email as the first argument (handy for permission-restricted tasks like editing):

$ kconsole kirby
Psy Shell v0.12.4 (PHP 8.2.22 — cli) by Justin Hileman
Kirby v4.1.0 – kirby@getkirby.com
>>> kirby()->user()->email()
=> "kirby@getkirby.com"

Kirby REPL Commands

r

Restart or Reload: The handy r-alias will use restart if available, a reload othewise:

>>> r
Exit:  Restarting...

restart

Restart your Kirby instance after code or content changes with:

>>> restart
Exit:  Restarting...
Psy Shell v0.12.4 (PHP 8.2.22 — cli) by Justin Hileman
>>>

reload

Refresh your Kirby instance after content changes with:

>>> reload

help

There are even more psysh build-in command, check out with:

>>> help

Troubleshooting

Can't get kconsole to start (can happen und not-bash-supporting-systems like windows etc)? Try kirbyconsole instead.

kconsole is a bash script wrapper to allow to restart the whole REPL. (You can read here why I had to build that workaround).

License

MIT

统计信息

  • 总下载量: 884
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-16