Skip to content

Single-shot and REPL

Wayland Core runs two ways: it completes a single task and exits, or it opens an interactive session you keep talking to. Which one you get depends on whether you pass a prompt.

wayland-core [OPTIONS] [PROMPT]...

The prompt is a trailing argument, so anything after the options becomes the task.

Pass a prompt and the engine completes the task, prints the result, and exits. This is the mode for scripts, pipelines, and quick one-offs:

Terminal window
wayland-core "List all Markdown files in this folder and summarize each"

Single-shot honors all the usual flags. For unattended runs where no one is at the keyboard to approve tools, combine it with auto-approve (see the warning below):

Terminal window
wayland-core --auto-approve "Format every Rust file in src/"

Run wayland-core with no prompt and it opens the interactive terminal UI (a ratatui TUI) where you hold a back-and-forth session, approve tools as they come up, and watch the work live:

Terminal window
wayland-core

If you prefer the plain line-based REPL, or your terminal cannot drive the TUI, fall back with --no-tui:

Terminal window
wayland-core --no-tui

The TUI writes its logs to $WAYLAND_HOME/logs/wayland-core.log so the screen stays clean. Tail that file in another pane if you want to watch the internals.

The engine detects when its output is piped and adjusts accordingly, so it composes with normal shell tooling:

Terminal window
wayland-core "Generate a one-line release summary" | pbcopy

Resume the most recent session, or a specific one:

Terminal window
wayland-core -c # continue the latest session
wayland-core --resume <SESSION_ID> # resume a specific session
wayland-core --list-sessions # list saved sessions