fix(cli): resolve common UX papercuts in the CLI - #38
Open
usehoplite[bot] wants to merge 2 commits into
Open
Conversation
usehoplite
Bot
force-pushed
the
hoplite/samothrake-e8dc9fcf
branch
from
September 2, 2026 21:58
3051f05 to
e745f9c
Compare
- `distill-align init` now works without the `run` subcommand, matching the README and CLI reference; `init run` is preserved for compatibility - honor the documented global `--config` flag (was silently ignored) and error cleanly when the file is missing - reject invalid `--mode` (synthesize) and `--status` (jobs list) values with a helpful message listing valid choices instead of a raw traceback - `export --format preference` (documented in the README) no longer crashes; unknown formats get a clean error listing supported formats - reject non-array JSON inputs to synthesize/export/validate with a clear message instead of a TypeError - `ingest` fails loudly on empty input instead of silently writing an empty chunks.json - `status` now reports provider keys for all documented providers (Anthropic, Gemini, Azure, generic) instead of only OpenAI - `config show` reports unparseable config files gracefully - fix invalid tab character in the generated config template that made every `distill-align init` config unparseable YAML Adds 11 regression tests covering each fix. Co-authored-by: Omar <omr.omr163@gmail.com>
Co-authored-by: Omar <omr.omr163@gmail.com>
usehoplite
Bot
force-pushed
the
hoplite/samothrake-e8dc9fcf
branch
from
September 3, 2026 01:08
e745f9c to
568404e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audited the main CLI user flows (
init,ingest,synthesize,export,validate,status,jobs,config) for common UX papercuts and fixed the highest-impact, verifiable ones. All fixes are small and CLI-scoped.What changed
distill-align initnow works without therunsubcommand. The README and CLI reference documentdistill-align init(with--path/--name), but the bare command previously exited with code 2 and printed nothing.init runis preserved for compatibility.--configflag is now honored. It was silently ignored (config was always auto-discovered); a missing explicit file now errors cleanly.--mode(synthesize) and--status(jobs list) values now produce a helpful message listing valid choices instead of a rawValueErrortraceback.export --format preferenceno longer crashes. The README quick start documents this command, butpreferencewas missing from theExportConfigformat literal, so it died with a PydanticValidationError. Unknown formats now get a clean error listing supported formats.synthesize/export/validateare rejected with a clear message instead of aTypeError; empty inputs emit a warning.ingestfails loudly on empty input (empty dir or no supported files) instead of silently writing an emptychunks.jsonthat poisons the downstream pipeline.statusreports provider keys for all documented providers (Anthropic, Gemini, Azure, genericDISTILL_) instead of only OpenAI — previously it said "Not set" even whenANTHROPIC_API_KEYwas configured.config showreports unparseable config files gracefully instead of a raw traceback.distill-align initconfig unparseable YAML (theinit→config showflow was broken end-to-end).Verification
tests/unit/test_cli.pycovering each fix.201 passed, 8 skipped(unit + integration + property).ruff checkandruff format --checkclean on all changed files;mypyclean onsrc/distill_align/cli/main.py.init→config showflow and the--configflag.