feat: CLI error UX improvements#8375
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@akshayka while this is not an API change, it is a very close-to-the-user modification, so your feedback would be appreciated! |
|
🤔 @peter-gy I think we need to rename that test. Not sure if you are online so I'll do it |
thanks! |
dmadisetti
left a comment
There was a problem hiding this comment.
Weird. I cannot replicate this failure locally.
akshayka
left a comment
There was a problem hiding this comment.
This is quite nice, @peter-gy. I have a couple comments.
1. When is the upgrade message shown? Is it deliberate for it to only show on error?
Right now, I only see the upgrade message on command error:
$ marimo edit --sandbox
Update available 0.19.11 → 0.20.0
Run pixi upgrade marimo to upgrade.
Or run python -m pip install --upgrade marimo.
Error: pyzmq is required when running the marimo edit server on a directory with --sandbox.
Tip: Install with:
pixi add 'marimo[sandbox]' pyzmq
Or with pip:
python -m pip install 'marimo[sandbox]' pyzmq
2. Error legibility.
When an upgrade is available it takes time for my eyes to scan and find the error message. Could this be improved by putting "Error" in bold red?
3. pyzmq suggested install.
The suggested install for pyzmq looks incorrect. Installing marimo[sandbox] and pyzmq is redundant.`
Instead of
python -m pip install 'marimo[sandbox]' pyzmq
Shouldn't it be
python -m pip install marimo[sandbox] # or python -m pip install pyzmq
|
Thanks for the input @akshayka.
Good catch. I changed the order so
Great point, just made the
Mm, yes, makes sense. Got rid of redundant |
akshayka
left a comment
There was a problem hiding this comment.
@peter-gy thanks for the changes, the messages feel much better now.
One nit:
Instead of splitting the upgrade messages over two sentences, i.e. instead of
Run pixi upgrade marimo to upgrade.
Or run python -m pip install --upgrade marimo.
could we instead have a single sentence
Run pixi upgrade marimo or python -m pip install --upgrade marimo to upgrade.
The idea of the list-like design was to let each command sit on its own copy-pasteable line, similarly to the suggestions we display for missing dependencies. |
812383f to
19142ee
Compare

📝 Summary
Improves CLI error UX so error output is easier to scan, easier to act on, and more consistent across entry points.
Parser errors now do not include full help dump, typo paths suggest likely commands/flags, and dependency failures show pkg manager aware install commands with clear fallback guidance. Runtime/setup failures that were previously surfaced as usage errors were also normalized to runtime-style CLI errors.
🔍 Description of Changes
I used https://github.com/marimo-team/marimo/compare/ms/cli-errors?expand=1 as the starting direction for CLI error normalization and carried over the core idea of moving non-usage failures to structured runtime/dependency errors through shared abstractions.
From there, this PR extends the scope by:
error,usage, and--helphint, instead of full command help.export,thumbnail,convert,sandbox,mcp,upgrade).Examples
Top-level typo suggestion
Nested command typo suggestion
Flag typo handling
Runtime vs usage error semantics
Dependency hints (manager-aware + fallback)
MCP / sandbox dependency paths