> For the complete documentation index, see [llms.txt](https://vladimirkostikov.gitbook.io/laraboom/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vladimirkostikov.gitbook.io/laraboom/quality/14-tooling.md).

# 14. Tooling and OpenAPI

LaraBoom gives you console lenses on the runtime. What was discovered, what the schema is, what the routes are, what the API contract looks like.

## doctor

```bash
php boom doctor
```

Checks the health of the host:

* the application key
* the database connection
* schema drift
* the queue
* the seeds

The first command when "nothing comes up after a pull".

## resources

```bash
php boom resources
```

A list of resources with the migrate / seed / routes flags. A quick overview of the host surface.

## explain

```bash
php boom explain demos
```

For a resource it prints:

* the fields
* Allow
* the filters
* the relations
* the custom routes

Use it as documentation straight from the code in a PR review.

## routes

```bash
php boom routes
php boom routes --json
```

All LaraBoom HTTP routes (Path plus `/api`). JSON is convenient for scripts and diffs in CI.

## schema and drift

See [chapter 6](/laraboom/data-model/06-schema.md). In short:

```bash
php boom schema
php boom schema demos
php boom schema --check --json
```

`--check` is the gate in CI.

## OpenAPI 3.0.3

```bash
php boom openapi
php boom openapi --json
php boom openapi --out=openapi.json
```

The exporter (`OpenApiExporter`) assembles the spec from:

* Resource CRUD
* custom Resource actions
* Paths (where applicable)
* the `#[Check]` rules and the fields

The file can be handed to Swagger UI, Stoplight, Redoc, a GitBook API block or client generators.

After changing fields, regenerate the artifact locally if you keep it in the repository. These days it is more often generated on the fly.

## shell

Exploring the data and DI:

```bash
php boom shell
```

Examples of what to try in the shell:

```php
app(\App\Resources\Demo::class)->query()->count();
app(\App\Resources\Demo::class)->present(
    app(\App\Resources\Demo::class)->query()->first()
);
```

## Logs and the boom channel

Configure `logging.channels.boom` in the host config (the package bootstrap) so that `note()` writes separately from the general stack. The request id will connect HTTP with the job logs that follow.

## Discovery

```bash
php boom discover
```

The Composer hook (`post-autoload-dump`) already calls package discover. Running it by hand is useful after oddities with providers.

## Recommended checks

1. `composer test` (package plus host)
2. `php boom schema --check`
3. `php boom openapi` (a smoke check. The command does not fail)
4. optionally a diff of `routes --json`

## The link with the site documentation

This GitBook doc describes how to write. OpenAPI describes what HTTP contract the host has right now. Do not duplicate every field by hand in Markdown. Refer to `explain` and the generated spec.

Next up is [Tests and demos](/laraboom/quality/15-testing-demos.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://vladimirkostikov.gitbook.io/laraboom/quality/14-tooling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
