Skip to content

Kirby 4.2.0


This feature of the Kirby CLI is currently in development. You need the latest develop branch version of getkirby/cli.

You can register new commands for the Kirby CLI in your plugins with the commands extension.

Kirby::plugin('your/plugin', [
  'commands' => [
    'your-plugin:test' => [
      'description' => 'Nice command',
      'args' => [],
      'command' => function ($cli) {
        $cli->success('My first plugin command');

Once your plugin is installed, the command can be executed with …

kirby your-plugin:test


We recommend to use such a namespace as in the example above.


Otherwise you might run into collisions with other commands from plugins. Core, local and global commands in the CLI always get registered first. If there's a command with the same name, your plugin command will be ignored.

CLI Documentation

Please check out the CLI docs to find out how to create your commands, work with arguments and more.