Skip to content

Commit e5b1ef3

Browse files
committed
Completely reorganize chapter order for better flow and understanding
1 parent 36983cb commit e5b1ef3

107 files changed

Lines changed: 1500 additions & 174 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: Basic CLI Usage
3+
description: Essential Bakery commands to get started with UserFrosting development.
4+
---
5+
6+
Now that you have UserFrosting installed, it's important to understand how to use **Bakery**, the command-line interface (CLI) tool. You'll rely on Bakery throughout your development workflow—from starting the development server to managing your database and clearing caches. This page covers the essential commands you'll use most frequently. For a complete reference of all available commands and how to create your own, see the [Bakery CLI](/cli/) chapter.
7+
8+
> [!NOTE]
9+
> All Bakery commands are executed in your **terminal** or **command prompt**—the same one you used during installation. Make sure you're in your project's root directory before running any commands.
10+
11+
## Running Commands
12+
13+
All Bakery commands are run from your project's root directory using:
14+
15+
```bash
16+
php bakery <command>
17+
```
18+
19+
You can see a list of all available commands by running:
20+
21+
```bash
22+
php bakery list
23+
```
24+
25+
For help with a specific command:
26+
27+
```bash
28+
php bakery help <command>
29+
```
30+
31+
## Essential Commands
32+
33+
### Starting the Development Server
34+
35+
The `serve` command starts UserFrosting's built-in development server:
36+
37+
```bash
38+
php bakery serve
39+
```
40+
41+
By default, this starts the server at `http://localhost:8080`. You can specify a different host and port:
42+
43+
```bash
44+
php bakery serve --host=0.0.0.0 --port=8000
45+
```
46+
47+
> [!WARNING]
48+
> The built-in server is for **development only**. Never use it in production. See the [Going Live](/going-live/) chapter for production deployment options.
49+
50+
### Initial Setup
51+
52+
When setting up a new project or after pulling updates, run the `bake` command to execute all setup tasks:
53+
54+
```bash
55+
php bakery bake
56+
```
57+
58+
This single command runs multiple setup operations:
59+
- Clears the cache
60+
- Runs database migrations
61+
- Compiles frontend assets
62+
- Sets up configuration files (on first run)
63+
64+
For a fresh installation, you can also use the interactive setup wizard:
65+
66+
```bash
67+
php bakery setup
68+
```
69+
70+
This guides you through:
71+
1. Environment configuration (.env file)
72+
2. Database connection
73+
3. SMTP configuration (optional)
74+
4. Running migrations
75+
5. Creating the root user account
76+
77+
### Database Migrations
78+
79+
Run pending database migrations without the full bake process:
80+
81+
```bash
82+
php bakery migrate
83+
```
84+
85+
To see which migrations have been run or are pending:
86+
87+
```bash
88+
php bakery migrate:status
89+
```
90+
91+
### Clearing the Cache
92+
93+
When you make configuration changes or template updates, clear the cache:
94+
95+
```bash
96+
php bakery clear-cache
97+
```
98+
99+
### Debugging Information
100+
101+
Get helpful debugging information about your UserFrosting installation:
102+
103+
```bash
104+
php bakery debug
105+
```
106+
107+
This shows:
108+
- UserFrosting version
109+
- PHP version and configuration
110+
- Database connection status
111+
- Loaded sprinkles
112+
- Environment settings
113+
114+
## What's Next?
115+
116+
These commands will get you through most day-to-day development work. As you build your application, you'll discover many more commands for:
117+
118+
- Creating and managing users
119+
- Running database seeders
120+
- Testing email configuration
121+
- Building and watching assets
122+
- Creating custom commands for your own tasks
123+
124+
For a complete reference and advanced features, see the [Bakery CLI](/cli/) chapter.
File renamed without changes.

app/pages/6.0/06.sprinkles/02.content/docs.md renamed to app/pages/6.0/05.sprinkles/02.content/docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The `locale` directory contains [translation files](/i18n) for your sprinkle. Li
8383

8484
Just as with configuration files, UserFrosting will recursively merge translation files for the currently selected language(s) from each loaded sprinkle. This means that each subsequently loaded sprinkle can override translations from previous sprinkles, or define new ones entirely.
8585

86-
See [Chapter 17](/i18n) for more information on UserFrosting's internationalization and localization system.
86+
See [Chapter 18](/i18n) for more information on UserFrosting's internationalization and localization system.
8787

8888
### /app/logs
8989

app/pages/6.0/06.sprinkles/03.recipe/docs.md renamed to app/pages/6.0/05.sprinkles/03.recipe/docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ The available sub-recipes includes:
198198
| [SeedRecipe](#seedrecipe) | Registering [Seeds](/database/seeding) |
199199
| [MiddlewareRecipe](#middlewarerecipe) | Registering [Middlewares](/advanced/middlewares) |
200200
| [EventListenerRecipe](#eventlistenerrecipe) | Registering [Event Listeners](/advanced/events) |
201-
| [TwigExtensionRecipe](#twigextensionrecipe) | Registering [Twig Extension](/templating-with-twig/filters-and-functions#extending-twig-extensions) |
201+
| [TwigExtensionRecipe](#twigextensionrecipe) | Registering [Twig Extension](/pages-and-layout/filters-and-functions#extending-twig-extensions) |
202202

203203
Your recipe simply needs to implement the corresponding interface. Classes may implement more than one interface if desired by separating each interface with a comma. For example :
204204

@@ -316,7 +316,7 @@ Methods to implement :
316316
Interface : `UserFrosting\Sprinkle\Core\Sprinkle\Recipe\TwigExtensionRecipe`
317317

318318
Methods to implement :
319-
- `getTwigExtensions` : Return a list of [Twig Extension](/templating-with-twig/filters-and-functions#extending-twig-extensions) classes
319+
- `getTwigExtensions` : Return a list of [Twig Extension](/pages-and-layout/filters-and-functions#extending-twig-extensions) classes
320320

321321
**Example:**
322322
```php
File renamed without changes.

app/pages/6.0/06.sprinkles/05.community/docs.md renamed to app/pages/6.0/05.sprinkles/05.community/docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If the sprinkle includes frontend assets like JavaScript, TypeScript, or Vue com
4848
},
4949
```
5050

51-
You may also need to configure Vite to properly handle the sprinkle's assets. See [Chapter 13](/asset-management) for more information about managing assets with Vite.
51+
You may also need to configure Vite to properly handle the sprinkle's assets. See [Chapter 14](/assets-vite) for more information about managing assets with Vite.
5252

5353
> [!TIP]
5454
> In the `package.json` example above, we're loading the Userfrosting core sprinkles from npm, and the Owlery sprinkle from Github. Each community sprinkle decides where it is published, and should include this in their README.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Sprinkles
33
description: Sprinkles are modular units of code and content that implement some feature or override some default behavior of UserFrosting.
44
---
55

6-
#### Chapter 6
6+
#### Chapter 5
77

88
# Sprinkles
99

app/pages/6.0/07.dependency-injection/01.concept/docs.md renamed to app/pages/6.0/06.dependency-injection/01.concept/docs.md

File renamed without changes.

app/pages/6.0/07.dependency-injection/02.the-di-container/docs.md renamed to app/pages/6.0/06.dependency-injection/02.the-di-container/docs.md

File renamed without changes.

app/pages/6.0/07.dependency-injection/03.default-services/docs.md renamed to app/pages/6.0/06.dependency-injection/03.default-services/docs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Third party services are also used directly throughout the code. They can be inj
1515

1616
### `UserFrosting\Alert\AlertStream`
1717

18-
This service handles the [alert message stream](/advanced/alert-stream), sometimes known as "flash messages". (See Chapter 18 for more information.)
18+
This service handles the [alert message stream](/advanced/alert-stream), sometimes known as "flash messages". (See Chapter 19 for more information.)
1919

2020
### `Illuminate\Cache\Repository as Cache`
2121

22-
Creates an instance of a Laravel [Cache](https://laravel.com/docs/8.x/cache). See [Chapter 17](/advanced/caching) for more information.
22+
Creates an instance of a Laravel [Cache](https://laravel.com/docs/8.x/cache). See [Chapter 19](/advanced/caching) for more information.
2323

2424
### `UserFrosting\Config\Config`
2525

@@ -61,7 +61,7 @@ Monolog `Logger` object for logging successfully completed database queries to `
6161

6262
### `UserFrosting\Sprinkle\Core\Mail\Mailer`
6363

64-
Creates an instance of `Mailer`, which serves as a UF-compatible wrapper for a [PHPMailer](https://github.com/PHPMailer/PHPMailer) object. See [Chapter 14](/mail) for more information.
64+
Creates an instance of `Mailer`, which serves as a UF-compatible wrapper for a [PHPMailer](https://github.com/PHPMailer/PHPMailer) object. See [Chapter 17](/mail) for more information.
6565

6666
### `League\CommonMark\ConverterInterface`
6767

@@ -98,7 +98,7 @@ See [Templating with Twig](/templating-with-twig) for more information about Twi
9898

9999
### `UserFrosting\ViteTwig\ViteManifestInterface`
100100

101-
Provides integration with Vite for frontend asset management. This service reads the Vite manifest file and provides methods to generate asset URLs with proper cache busting. See [Chapter 13](/asset-management) for more information.
101+
Provides integration with Vite for frontend asset management. This service reads the Vite manifest file and provides methods to generate asset URLs with proper cache busting. See [Chapter 14](/assets-vite) for more information.
102102

103103
### `Symfony\WebpackEncoreBundle\Asset\EntrypointLookupInterface`
104104

0 commit comments

Comments
 (0)