Skip to content

Add --quiet flag#1539

Merged
svenstaro merged 2 commits intosvenstaro:masterfrom
joshleeb:show-urls
Jan 9, 2026
Merged

Add --quiet flag#1539
svenstaro merged 2 commits intosvenstaro:masterfrom
joshleeb:show-urls

Conversation

@joshleeb
Copy link
Copy Markdown
Contributor

@joshleeb joshleeb commented Dec 26, 2025

This change adds the --quiet flag (along with the MINISERVE_QUIET env variable) which, when enabled, reduce output and silences warnings.

For example

$ ./miniserve . --quiet
Bound to [::]:8080, 0.0.0.0:8080

@joshleeb joshleeb changed the title Add show_urls config flag Add show-urls config flag Dec 26, 2025
@svenstaro
Copy link
Copy Markdown
Owner

Hey, thanks for the contribution. What's your use case for this?

Also, since this is a boolean flag and true by default, it'd be better to call the flag --hide-urls.

@joshleeb
Copy link
Copy Markdown
Contributor Author

joshleeb commented Jan 8, 2026

What's your use case for this?

The motivation is that I use miniserve a lot in scripts/makefiles where the port is set explicitly and doesn't change. For these use cases, miniserve is used as a local server that will only be accessed via localhost and so I don't need (nor want) to see any of the other interfaces the server is available on.

An alternative would be to pipe the output of miniserve to /dev/null, but it is nice to see some of the output such as the version, port, and path.

Also, since this is a boolean flag and true by default, it'd be better to call the flag --hide-urls.

Happy to make the change 😄

@svenstaro
Copy link
Copy Markdown
Owner

Alright, in that case, what do you think about a --quiet flag? I suppose more users might have your use-case and would appreciate it if miniserve were more quiet in general. We could then also silence warnings I suppose.

@joshleeb
Copy link
Copy Markdown
Contributor Author

joshleeb commented Jan 8, 2026

SGTM 👍 I'll update the PR

@joshleeb joshleeb changed the title Add show-urls config flag Add --quiet flag Jan 8, 2026
@joshleeb
Copy link
Copy Markdown
Contributor Author

joshleeb commented Jan 8, 2026

@svenstaro updated the commit and PR 😄

@svenstaro svenstaro merged commit 9e64fb0 into svenstaro:master Jan 9, 2026
17 of 18 checks passed
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.

2 participants