TTY fallback for bt setup and agent detection#109
Merged
ViaDézo1er / cedric (viadezo1er) merged 27 commits intomainfrom Apr 14, 2026
Merged
TTY fallback for bt setup and agent detection#109ViaDézo1er / cedric (viadezo1er) merged 27 commits intomainfrom
ViaDézo1er / cedric (viadezo1er) merged 27 commits intomainfrom
Conversation
Rename/restructure CLI flags to improve UX without changing core behaviour: BaseArgs: - Remove --quiet/-q (BRAINTRUST_QUIET) and --no-input; quiet output is now the global default (set_quiet(true) in configure_output). - Add verbose: bool as #[arg(skip)] — subcommands set it at runtime; set up output messages are shown only when verbose is active. SetupArgs: - --no-mcp-skill → --no-skills + --no-mcp (orthogonal opt-outs) - Add --no-instrument (opt-out; instrument is the new default) - Add --tui / --background (replace --interactive / --quiet in wizard) - Add --language (repeatable), --interactive/-i, --verbose/-v at top level AgentsSetupArgs: - --agent (repeatable Vec) → --agent (single Option); drop AgentArg::All - --yes removed from CLI (#[arg(skip)]); programmatic callers still set yes:true - Add --no-workflow (conflicts with --workflow) AgentsMcpSetupArgs: - Same agents→agent and yes→skip treatment InstrumentSetupArgs: - --quiet → --background (run agent non-interactively, show spinner) - --interactive → --tui (run agent in interactive TUI mode) - --yes → #[arg(skip)] - Add skip_launch: bool (#[arg(skip)]) for future wizard use resolve_selected_agents: signature changes from &[AgentArg] to Option<AgentArg>; None auto-detects all installed agents as before. All call sites, struct literals in tests, and BaseArgs literals in auth/switch/traces/functions updated to match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- `bt setup instrument --interactive` now accepted as alias for --tui - `bt setup instrument --quiet` now accepted as alias for --background - `bt setup --no-mcp-skill` now accepted as hidden alias for --no-skills --no-mcp - Explicit error when --json and --tui are both passed
|
Latest downloadable build artifacts for this PR commit
Available artifact names
|
dc99a47 to
61a776f
Compare
b66a5da to
008c103
Compare
3551ccd to
f642f76
Compare
f642f76 to
38ff897
Compare
move CLI coverage to integration tests
- tty_term(): open /dev/tty as fallback so fuzzy_select works even when stdin/stderr are redirected (e.g. `echo "bt setup" | sh`) - fuzzy_select now uses interact_on(&term) instead of interact() - detect_runnable_agents(): PATH-only check for all four agents - detect_agents(): drop config-dir heuristics, PATH-only - resolve_unambiguous_instrument_agent(): auto-select when exactly one agent is runnable/detected, avoiding an unnecessary prompt - agent_launch_error(): friendly error when agent binary not found on PATH - run_agent_invocation(): /dev/tty stdin fallback for interactive mode - run_instrument_setup(): prefer runnable agents over detected agents Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38ff897 to
f73c76f
Compare
Abhijeet Prasad (AbhiPrasad)
approved these changes
Apr 14, 2026
Now agent detection is only done by looking at PATH Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
df9eb45 to
6e58fae
Compare
…ic-better-dx-pr2
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.
Self-contained infra changes that the wizard depends on.
tty_term()function insrc/ui/select.rs(/dev/ttyfallback)fuzzy_selectusinginteract_on(&term)detect_runnable_agents()(PATH-only check)detect_agentssimplification (drop config-dir heuristics)resolve_unambiguous_instrument_agent/dev/ttystdin fallback inrun_agent_invocationfor interactive modeCursor skill path detection, global quiet mode are fixed in the 3rd PR.
PATH only detection of the agent seem ok, I don't think people would want to install skills/mcp without having the agent.
Part 2 of #94