Skip to content

Commit c79381e

Browse files
markshustclaude
andcommitted
docs(dev-server): add dev:open command to package documentation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c72ffa1 commit c79381e

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

docs/src/content/docs/packages/dev-server.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: marko/dev-server
33
description: Start your full development environment with a single command.
44
---
55

6-
Start your full development environment with a single command. The Dev Server package provides `up`, `down`, and `status` CLI commands (aliases for `dev:up`, `dev:down`, `dev:status`) that orchestrate your PHP built-in server, Docker Compose services, and frontend build tools together. It auto-detects your project's Docker Compose file and package manager, so zero configuration is required for most projects. All services are managed as background processes tracked via a PID file, letting you stop everything cleanly with `marko down`.
6+
Start your full development environment with a single command. The Dev Server package provides `up`, `down`, `status`, and `open` CLI commands (aliases for `dev:up`, `dev:down`, `dev:status`, `dev:open`) that orchestrate your PHP built-in server, Docker Compose services, and frontend build tools together. It auto-detects your project's Docker Compose file and package manager, so zero configuration is required for most projects. All services are managed as background processes tracked via a PID file, letting you stop everything cleanly with `marko down`.
77

88
## Installation
99

@@ -54,6 +54,14 @@ marko status
5454

5555
Shows the name, PID, status (running/stopped), port, and start time for each managed process.
5656

57+
### Opening in Browser
58+
59+
```bash
60+
marko open
61+
```
62+
63+
Opens the running PHP development server in your default browser. The URL is determined dynamically from the running process, so it works with custom ports (e.g. `--port=8080`). Throws a helpful error if no dev environment is running.
64+
5765
### Stopping the Environment
5866

5967
```bash
@@ -176,6 +184,17 @@ use Marko\Core\Command\Output;
176184
public function execute(Input $input, Output $output): int;
177185
```
178186

187+
### DevOpenCommand
188+
189+
```php
190+
use Marko\Core\Attributes\Command;
191+
use Marko\Core\Command\Input;
192+
use Marko\Core\Command\Output;
193+
194+
#[Command(name: 'dev:open', description: 'Open the running development server in a browser', aliases: ['open'])]
195+
public function execute(Input $input, Output $output): int;
196+
```
197+
179198
### DevStatusCommand
180199

181200
```php

0 commit comments

Comments
 (0)