How to View Service Logs Using the Dream CLI

You can view logs for a specific service by running dream logs <service> [N] (or .\dream.ps1 logs <service> [N] on Windows), which streams real-time Docker output from the container with an optional line limit that defaults to 100 lines.

The Dream CLI in the Light-Heart-Labs/DreamServer repository provides a consistent interface for monitoring your LLM infrastructure across Linux, macOS, and Windows. Whether you are debugging the Llama server or checking the Dashboard API status, the logs command offers direct access to Docker Compose container output without manual docker commands.

Cross-Platform Command Syntax

The Dream CLI implements identical syntax across all supported platforms, with platform-specific script wrappers handling the underlying Docker calls.

Linux and macOS

On Linux and macOS systems, execute the appropriate shell script with the logs sub-command:

./dream logs <service> [N]

For macOS specifically, you may need to use the dedicated macOS installer script:

./dream-macos.sh logs <service> [N]

The <service> parameter corresponds to the Docker Compose service name defined in your DreamServer configuration, such as llama-server, dashboard, or whisper. The optional [N] parameter specifies the number of trailing log lines to display; if omitted, the command defaults to 100 lines.

Windows PowerShell

Windows users utilize the PowerShell wrapper with identical arguments:

.\dream.ps1 logs <service> [N]

Both platform implementations validate the service name and translate your command into the underlying Docker Compose log invocation.

Implementation Details and Source Files

According to the DreamServer source code, the logs functionality is implemented in platform-specific installer scripts that standardize Docker log access.

macOS Implementation

In dream-server/installers/macos/dream-macos.sh, the logs sub-command parses the service name and optional line count, then invokes docker compose logs -f --tail <N> <service>. This implementation streams real-time output with automatic following of new entries, matching the behavior of the native Docker CLI.

Windows Implementation

The PowerShell script at dream-server/installers/windows/dream.ps1 provides equivalent functionality for Windows environments, including usage help messages and parameter validation before calling the underlying Docker Compose command.

Supporting Infrastructure

The dream-server/installers/lib/compose-failure-report.sh file contains diagnostic logic that references log location strategies, offering guidance on using docker compose logs -f for troubleshooting startup failures. Additionally, dream-server/installers/lib/ui.sh provides standardized UI helper messages that reference log viewing commands across the installer ecosystem.

Practical Usage Examples

The following examples demonstrate common log inspection scenarios for DreamServer services:

View the last 100 lines of the Llama server (default):

./dream logs llama-server

Stream the last 200 lines of the Dashboard container:

./dream logs dashboard 200

Inspect the Dashboard API with 250 lines of history:

./dream logs dashboard-api 250

Windows PowerShell: Check the last 50 lines of the Whisper service:

.\dream.ps1 logs whisper 50

All commands automatically append the -f (follow) flag to the underlying Docker command, meaning they continue to stream new log entries until you terminate the process with Ctrl+C.

Summary

  • The Dream CLI provides a unified logs sub-command across Linux, macOS (dream or dream-macos.sh), and Windows (dream.ps1).
  • Command syntax requires a service name (e.g., llama-server, dashboard, whisper) and accepts an optional line count parameter that defaults to 100.
  • Underlying implementation invokes docker compose logs -f --tail <N> <service> to stream real-time output.
  • Key source files include dream-server/installers/macos/dream-macos.sh and dream-server/installers/windows/dream.ps1.

Frequently Asked Questions

Can I view logs for all services at once using the Dream CLI?

The Dream CLI is designed for per-service log retrieval to reduce noise, but you can view all service logs by using native Docker Compose commands directly. The scripts in dream-server/installers/lib/compose-failure-report.sh reference strategies for combined log viewing during troubleshooting scenarios.

What is the default number of log lines displayed?

If you omit the optional [N] parameter, the Dream CLI defaults to displaying the last 100 lines of the container's log history. This default is consistent across the macOS shell script and Windows PowerScript implementations.

Does the logs command work on macOS Apple Silicon?

Yes, the dream-macos.sh script located in dream-server/installers/macos/ provides native support for macOS systems, including Apple Silicon Macs. The script handles service log streaming identically to the Linux version.

How do I stop following the logs once the command starts?

Since the Dream CLI invokes docker compose logs -f (follow mode) under the hood, the command continues streaming indefinitely. Terminate the process by pressing Ctrl+C in your terminal or PowerShell window to return to the command prompt.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →