Skip to content

Commit

Permalink
Merge pull request #25 from getkirby/bastianallgeier-patch-1
Browse files Browse the repository at this point in the history
Improve docs
  • Loading branch information
bastianallgeier authored Nov 28, 2022
2 parents 692edc0 + e3fd6ff commit 91138fa
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

The Kirby command line interface helps simplifying common tasks with your Kirby installations.

![kirby-cli](https://user-images.githubusercontent.com/24532/193451850-73b1404d-82e2-42d4-b62b-3122fdc3f005.png)


## Installation

### Via Composer
Expand Down Expand Up @@ -57,10 +54,13 @@ This should print the Kirby CLI version and a list of available commands
- kirby make:plugin
- kirby make:snippet
- kirby make:template
- kirby register
- kirby remove:command
- kirby roots
- kirby unzip
- kirby uuid:generate
- kirby uuid:populate
- kirby uuid:remove
- kirby version
```

Expand Down Expand Up @@ -100,6 +100,24 @@ kirby make:command hello --global

The command file will then be place in `~/.kirby/commands/hello.php` and is automatically available everywhere.

## Command plugins

Your Kirby plugins can define their own set of commands: https://getkirby.com/docs/reference/plugins/extensions/commands

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

## Check for installed commands

You can always check back if your commands have been created properly by running `kirby` again
Expand Down Expand Up @@ -246,19 +264,6 @@ return [
];
```

### Where to place local commands

The config can also set where local commands are stored. By default, they are stored in `/site/commands`

```json
{
"roots": {
"commands.local": "./commands",
"commands.global": "/var/kirby/commands",
}
}
```

## What's Kirby?

- **[getkirby.com](https://getkirby.com)** – Get to know the CMS.
Expand Down

0 comments on commit 91138fa

Please sign in to comment.