Skip to content

Comments

Add experiments, functions, tools, and scorers commands#31

Open
parkerhendo wants to merge 27 commits intomainfrom
parker/remaining-function-cmds
Open

Add experiments, functions, tools, and scorers commands#31
parkerhendo wants to merge 27 commits intomainfrom
parker/remaining-function-cmds

Conversation

@parkerhendo
Copy link
Contributor

@parkerhendo parkerhendo commented Feb 18, 2026

Add commands!

  1. bt tools
  2. bt scorers
  3. bt functions
  4. bt experiments

Add comprehensive function management commands and improve CLI structure

  • Add tools and scorers commands via shared functions module

    • Implement bt tools, bt scorers, and bt functions commands
    • Add function listing, viewing, deletion, and invocation capabilities
    • Support filtering by function type (LLM, scorer, task, tool, etc.)
  • Add experiments command with list, view, and delete

    • Implement bt experiments command with full CRUD operations
    • Add interactive experiment selection and browser integration
    • Include experiment metadata display and confirmation prompts
  • Replace REST API with BTQL for function queries

    • Migrate function listing from REST endpoints to BTQL queries
    • Add SQL escaping utilities for secure query construction
    • Improve query performance and flexibility
  • Extract shared prompt rendering utilities

    • Create reusable prompt rendering module for chat/completion display
    • Add syntax highlighting for template variables and code blocks
    • Support tool calls, images, and multi-part content rendering
  • Hide environment variable values in help output

    • Add hide_env_values = true to sensitive CLI arguments
    • Protect API keys, URLs, and project names from help text exposure
  • Improve CLI structure and context handling

    • Add ResolvedContext pattern for consistent auth/project resolution
    • Enhance interactive selection with fuzzy search capabilities
    • Standardize error handling and status reporting across commands
  • Update dependencies and fix compatibility issues

    • Upgrade multiple crates including clap, futures, anyhow, chrono
    • Update clap_lex from 0.7.7 to 1.0.0 for improved parsing
    • Remove deprecated pin-utils dependency from futures

- Add --org/-o global flag to BaseArgs (env: BRAINTRUST_DEFAULT_ORG)
- Add with_org_name() to ApiClient for org override
- Wire org override into prompts module
- Extract prompt rendering helpers to src/ui/prompt_render.rs
- Update prompts/view.rs to use shared helpers
- Create src/functions/ with shared API client, list, view, delete
- Parameterize by FunctionKind (type_name, plural, function_type, url_segment)
- Client-side filtering by function_type (API lacks server-side filter)
- src/tools.rs and src/scorers.rs as thin wrappers
- View renders prompt_data (messages, tools, model) and function_data
- Register bt tools and bt scorers in main.rs
- Create src/experiments/ with API client, list, view, delete
- Experiments use name (not slug) as identifier
- List shows Name, Description, Created, Commit columns
- View shows metadata fields (description, created, commit, dataset, public, tags)
- Support --web to open in browser, --name/-n flag
- Register bt experiments (alias: bt exp) in main.rs
- Use .clone() instead of swap_remove in interactive selection
  (matches prompts/delete.rs pattern)
- Improve function subcommand help text to be more descriptive
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

Latest downloadable build artifacts for this PR commit b61ce4d63421:

Available artifact names
  • ``cargo-dist-cache
  • ``artifacts-plan-dist-manifest
  • ``artifacts-build-local-aarch64-unknown-linux-gnu
  • ``artifacts-build-local-x86_64-unknown-linux-gnu
  • ``artifacts-build-local-aarch64-apple-darwin
  • ``artifacts-build-local-x86_64-apple-darwin
  • ``artifacts-build-local-x86_64-pc-windows-msvc
  • ``artifacts-build-global

@parkerhendo parkerhendo changed the title parker/remaining function cmds Add experiments, functions, tools, and scorers commands Feb 25, 2026
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.

1 participant