Skip to content

feat: add headless dev mode, start/stop subcommands, and project logs#944

Merged
Soner (shyim) merged 1 commit intonextfrom
feat/project-dev-headless-and-logs
Apr 1, 2026
Merged

feat: add headless dev mode, start/stop subcommands, and project logs#944
Soner (shyim) merged 1 commit intonextfrom
feat/project-dev-headless-and-logs

Conversation

@shyim
Copy link
Copy Markdown
Member

Summary

  • Restructure project dev to auto-detect TTY: launches TUI in terminals, starts containers in background for AI agents and CI
  • Add project dev start / project dev stop subcommands with spinner, timing, and URL output
  • Add project logs command to read Shopware application logs from var/log/
  • Add StartEnvironment / StopEnvironment to executor interface with type constants

New Commands

Command Description
project dev Auto-detects: TUI in terminal, headless otherwise
project dev start Start environment in background
project dev stop Stop environment
project logs Show last 100 lines of most recent log file
project logs --list List available log files
project logs --follow Tail a log file
project logs --lines 50 Control number of lines

Test plan

  • project dev in a terminal opens the TUI as before
  • project dev piped or in non-TTY runs headless (starts containers, prints URLs)
  • project dev start starts containers with spinner and timing output
  • project dev stop stops containers with spinner and timing output
  • project logs --list lists log files from var/log/
  • project logs shows last 100 lines of most recent log file
  • project logs --follow tails the log file
  • golangci-lint run ./... passes with 0 issues
  • go test ./... passes

Restructure `project dev` to support non-interactive usage:

- `project dev` auto-detects TTY: launches TUI in terminal, starts
  containers in background otherwise (for AI agents and CI)
- `project dev start` explicitly starts in background with spinner,
  elapsed time, shop/admin URLs, and discovered service URLs
- `project dev stop` stops the environment with spinner and timing

Add `project logs` command for reading Shopware application logs:

- Reads from var/log/, defaults to most recently modified .log file
- `--list` / `-l` lists available log files with size and modification time
- `--lines` controls number of lines (default 100)
- `--follow` / `-f` tails the log file

Executor interface changes:

- Add `StartEnvironment` and `StopEnvironment` methods
- Add `TypeDocker`, `TypeLocal`, `TypeSymfonyCLI` constants
- Docker executor captures compose output, only shows on failure
- Local and Symfony CLI executors return `ErrNotSupported`

Extract `DiscoverServices` as a public function in devtui for reuse.
@shyim Soner (shyim) merged commit c1e49dc into next Apr 1, 2026
2 checks passed
@shyim Soner (shyim) deleted the feat/project-dev-headless-and-logs branch April 1, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant