Skip to content

Console commands ​

The FusionStack service provider registers the same api: commands as the PHP package. Run them through the Laravel CLI, such as laravel api:version:list, or with your built binary. Options and output match the Artisan commands page, except where noted.

api:install, api:version:make and api:version:release edit PHP files, so they have no Rust version: declare versions and changes in code.

api:key:create ​

shell
laravel api:key:create "Billing service" --scope orders:write --scope 'customers:*' [--pin 2026-06-01] [--expires-in 90] [--test]

Creates a key, pinned to the latest version unless --pin names one, and prints it once. --expires-in takes the days until the key stops working; without it, the key never expires. --test creates an fs_test_ key, which production turns away unless Config::test_keys_in_production is on. Needs the database feature.

api:key:pin ​

shell
laravel api:key:pin 5 2026-11-30

Moves a key to another released, unretired version, the latest when none is given. Needs the database feature.

api:webhook:create ​

shell
laravel api:webhook:create https://example.org/hook --event 'order.*' [--pin 2026-06-01] [--description "..."]

Registers an endpoint, every event when no --event is given, and prints its signing secret. Needs the database feature.

api:version:list ​

Each version, its status and the changes it introduced.

api:version:usage ​

shell
laravel api:version:usage [2026-06-01] [--days 30]

Which clients used which versions recently, with API key names. Needs the database feature.

api:changelog ​

shell
laravel api:changelog [--output CHANGELOG.md] [--unreleased]

The Markdown changelog, the same as PHP's for the same versions. fusion_stack::docs::markdown(unreleased) returns it in code.

api:openapi ​

shell
laravel api:openapi [--api-version 2026-06-01] [--output openapi.json]

The OpenAPI 3.1 document for a version, the latest by default.

api:docs:lint ​

shell
laravel api:docs:lint [--fail]

Lists the endpoints, fields, filters, scopes and error codes without a description, and where to add one. It warns, or with --fail or Docs::lint_fails(true) exits with status 1, for CI. openapi::undocumented() returns the same list.

Released under the MIT License.