Skip to content

CLI: Add --quiet flag to dx build and dx serve to reduce output verbosity #4716

@xsoheilalizadeh

Description

@xsoheilalizadeh

Environment

  • dx version: 0.7.0-rc.0 (a519fba)
  • rustc: 1.89.0 (29483883e 2025-08-04)
  • OS: macOS 14.5.0 (Darwin 24.5.0 arm64)

Description

dx build currently outputs every single package compilation (e.g., "Compiled [1/411]: unicode_ident"), resulting in hundreds of log lines. There's --verbose for more output, but no --quiet for less.

Current Behavior

Running dx build --fullstack on a typical project produces:

  • 799 "Compiled [N/411]" progress lines
  • 1218 total output lines
  • Only way to reduce is redirecting stderr

Example output:

[   1.605s] INFO Compiled [  1/411]: unicode_ident
[   1.605s] INFO Compiled [  2/411]: build-script-build
[   1.605s] INFO Compiled [  3/411]: build-script-build
... (796 more lines) ...

Requested Feature

Add --quiet flag (similar to cargo build --quiet) that:

  • Suppresses per-package compilation progress
  • Still shows warnings and errors
  • Still shows final build result
  • Works for dx build and dx serve

Example:

dx build --quiet
# Output:
# [   32.974s] INFO Build completed successfully in 4262ms

Use Cases

  • CI/CD pipelines: Reduce log clutter, focus on warnings/errors
  • AI tools: Smaller context window usage when monitoring builds
  • Local development: Less terminal spam when you just want the result
  • Log aggregation: Cleaner logs in production build systems

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelated to the dioxus-cli programenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions