luminarix/tempest-bolt
Composer 安装命令:
composer require luminarix/tempest-bolt
包简介
An interactive PsySH shell and web panel for Tempest applications.
README 文档
README
Bolt
Bolt is a PsySH-powered interactive shell and a React web panel for Tempest applications.
Installation
composer require luminarix/tempest-bolt
Console shell
./tempest bolt
Bolt starts PsySH with these variables in scope:
$appand$container: the Tempest container$kernel: the current Tempest kernel$rootPath: the project root$internalStorage: Tempest's internal storage path$tempestVersion: the Tempest version
Web panel
Visit /bolt in your application. The panel is a self-contained React + CodeMirror REPL — it
ships its own pre-compiled assets, so no build step is required in the consuming app. Write PHP and
press ⌘/Ctrl + Enter (or click Run) to evaluate it in the application
context.
Application classes can be referenced by their short name — $container->get(HomeController::class)
resolves to \App\HomeController. Both the web panel and the console shell alias the classes in your
application's namespaces on demand.
Security
The web panel evaluates arbitrary PHP, so it is disabled outside local development by default:
it is only reachable in the local environment and returns 404 everywhere else.
Publish a configuration file to change this:
./tempest install bolt
This writes bolt.config.php into your application:
use Tempest\Bolt\BoltConfig; use Tempest\Core\Environment; return new BoltConfig( enabled: true, environments: [Environment::LOCAL], // Optional gate, evaluated on every request. Return false to deny (403). authorize: fn (\Tempest\Http\Request $request): bool => $request->getSessionValue('user') !== null, persistScope: false, );
enabled— master switch.environments— environments in which the panel is reachable. Anything else returns404.authorize— an optional callback to gate access (e.g. to expose it to authenticated admins on staging). Returnfalseto deny with403.persistScope— whether variables defined in the panel persist across executions within a session.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-28
