From 455edd5b9c80414bf3758e8cc15dc92a68195285 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 5 Jun 2026 12:30:36 +0200 Subject: [PATCH 1/2] feat(console): ask to install completions during setup --- packages/console/src/Installers/ConsoleInstaller.php | 10 +++++++++- .../Framework/Installers/FrameworkInstaller.php | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/console/src/Installers/ConsoleInstaller.php b/packages/console/src/Installers/ConsoleInstaller.php index fd1f73d2a..f6c4996bb 100644 --- a/packages/console/src/Installers/ConsoleInstaller.php +++ b/packages/console/src/Installers/ConsoleInstaller.php @@ -18,7 +18,7 @@ public function install(): void { $this->installMainNamespace(); - $this->publish( + $tempest = $this->publish( source: __DIR__ . '/tempest', destination: root_path('tempest'), callback: function (string $_, string $destination): void { @@ -30,5 +30,13 @@ public function install(): void ); $this->updateComposer(); + + if (! $tempest) { + return; + } + + if ($this->console->confirm('Do you want to install completions?', default: false)) { + $this->console->call('completion:install'); + } } } diff --git a/src/Tempest/Framework/Installers/FrameworkInstaller.php b/src/Tempest/Framework/Installers/FrameworkInstaller.php index 639866859..48edc7328 100644 --- a/src/Tempest/Framework/Installers/FrameworkInstaller.php +++ b/src/Tempest/Framework/Installers/FrameworkInstaller.php @@ -33,7 +33,7 @@ public function install(): void destination: root_path('public/index.php'), ); - $this->publish( + $tempest = $this->publish( source: __DIR__ . '/tempest', destination: root_path('tempest'), callback: function (string $_, string $destination): void { @@ -49,5 +49,13 @@ public function install(): void $this->console->call('discovery:generate'); $this->console->call('key:generate'); + + if (! $tempest) { + return; + } + + if ($this->console->confirm('Do you want to install completions?', default: false)) { + $this->console->call('completion:install'); + } } } From 2a45381d5cca7734ec5aebc9f8269ea2d50d45b7 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 5 Jun 2026 12:30:48 +0200 Subject: [PATCH 2/2] docs: update completion install docs --- docs/1-essentials/04-console-commands.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/1-essentials/04-console-commands.md b/docs/1-essentials/04-console-commands.md index 90deefec3..0007223e0 100644 --- a/docs/1-essentials/04-console-commands.md +++ b/docs/1-essentials/04-console-commands.md @@ -246,7 +246,13 @@ Completion relies on two things: a **completion script** sourced by your shell, ### Installing completions -Run the install command and follow the prompts: +The framework and console installers will ask whether you want to install completions: + +```console +./tempest install +``` + +You may also run the completion command directly: ```console ./tempest completion:install