feat: improve human and agent experience#8
Open
francoischalifour wants to merge 3 commits into
Open
Conversation
Reset terminal color mode before and after formatProgressStatus tests so parallel suites that enable styled output do not leak ANSI codes into CI. Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
- Update management_test.sh for new context output (no Management: line) - Update catalogs_test.sh for citty enum validation error text - Parse --profile in early bootstrap only before the subcommand so configure --profile <name> can create new profiles again Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
albert20260301
suggested changes
Jun 27, 2026
albert20260301
left a comment
There was a problem hiding this comment.
Local verification is failing for me with the full suite:
bash scripts/verify.sh
...
3 tests failed:
- renderAltertableUsage active context > shows active context on root help when stdout is a TTY
- errors > renderCliError formats CliError
- errors > unknown errors render without stack traces
The failures look order-dependent. Running the failing test files alone passes, but in the full suite earlier terminal/color tests leave color enabled for later assertions, so renderCliError returns \u001b[31mERROR\u001b[39m x where the test expects plain ERROR x, and the root help output is colorized enough to miss the plain PROFILE assertion.
Please make the terminal color test setup/teardown hermetic. The likely culprit is the query-format color helper deleting/restoring only part of the env/state; it should restore NO_COLOR, TERM, FORCE_COLOR, ALTERTABLE_COLOR, TEST, CI, TTY flags, and setTerminalColorMode consistently after enabling color.
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.
This PR improves the CLI experience across both human and agent workflows.
For people using the CLI directly, output is now much easier to read, scan, and act on. Tables, query results, management responses, configure flows, context display, help text, and errors have been revisited with clearer spacing, better alignment, safer truncation, terminal-aware styling, and more useful summaries. The goal is for every screen to answer “what happened?”, “what matters?”, and “what should I do next?” without forcing users to parse raw API-shaped output.
For agents and scripts, this introduces an explicit
--agentmode that favors stable, JSON-consumable output and disables terminal affordances like colors, pagers, and human-only formatting. Human output can now stay optimized for readability, while machine consumers get structured data they can reliably parse.Preview
Screenshot.-.Ghostty.-.Caaltertable-cli.-.2026-06-27.at.18.53.13.mp4
What changed
--agentpreset for structured JSON output without pager, color, or terminal styling.--layout auto|table|line,--max-width, JSON/CSV/Markdown formats, type-aware cell formatting, relative timestamps, UUID shortening, and redaction for sensitive-looking fields.altertable configurewizard with plane-specific flows for management and lakehouse credentials.altertable contextas the clearer replacement forwhoami, showing the active profile, environment, planes, credentials status, and authenticated identity when available.--no-colorsupport and centralized terminal styling behavior.Why
The CLI serves two different audiences:
Before this change, those needs competed with each other. Human output had to stay close to raw shapes so it remained scriptable, while scripts had to account for terminal-oriented formatting. This PR separates those concerns.
Human mode is now designed for clarity and scanability. Agent mode is designed for predictable structured consumption.
Testing