Skip to content

Commit 1927c73

Browse files
Copilotsamdark
andauthored
Fix #406: Clarify console application setup — template vs. component (#407)
Co-authored-by: samdark <47294+samdark@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent ed8e15f commit 1927c73

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/guide/tutorial/console-applications.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@
22

33
Console applications are mainly used to create utility, background processing and maintenance tasks.
44

5-
To get support for console application in your project, get `yiisoft/yii-console` via composer:
5+
## Getting started
66

7+
If you're using [yiisoft/app](https://github.com/yiisoft/app) or
8+
[yiisoft/app-api](https://github.com/yiisoft/app-api), console support is already included.
9+
You can access the entry point as:
710

811
```
9-
composer require yiisoft/yii-console
12+
./yii
1013
```
1114

12-
After it's installed, you can access the entry point as
15+
If you want a standalone console-only application, use the
16+
[yiisoft/app-console](https://github.com/yiisoft/app-console) project template:
1317

18+
```sh
19+
composer create-project yiisoft/app-console your-project
1420
```
15-
./yii
16-
```
21+
22+
To add console support to an existing project from scratch, refer to the
23+
[yiisoft/yii-console package documentation](https://github.com/yiisoft/yii-console).
1724

1825
Out of the box only `serve` command is available. It's starting PHP built-in web server to serve the application locally.
1926

0 commit comments

Comments
 (0)