Skip to content

Add bt init command with managed .bt directory layout#98

Draft
Parker Henderson (parkerhendo) wants to merge 8 commits intomainfrom
init-cleanup
Draft

Add bt init command with managed .bt directory layout#98
Parker Henderson (parkerhendo) wants to merge 8 commits intomainfrom
init-cleanup

Conversation

@parkerhendo
Copy link
Copy Markdown
Contributor

@parkerhendo Parker Henderson (parkerhendo) commented Apr 6, 2026

TL;DR

Updates bt init command with managed gitignore rules and improved runner script caching to use repository-local storage.

What changed?

  • Update bt init to generate .bt/.gitignore to ignore generated artifacts
  • Introduced new bt_dir module to centralize .bt/ directory path management and layout enforcement
  • Refactored runner script materialization to use repository-local .bt/cache/runners/ instead of global cache so all runners are handled the same way (instead of ts-node having a special case)
  • Consolidate js_runner and python_runner modules into unified runner module with js and py submodules
  • Updated config saving to automatically ensure proper .bt/ directory layout
  • Added symlink protection for all .bt/ directory operations

The managed .bt/.gitignore tracks config.json, .gitignore, and skills/ by default while ignoring runtime artifacts like runner caches.

How to test?

Run bt init in a new directory to verify it creates the expected structure. Test that eval commands now cache runners in .bt/cache/runners/ within the repository. Verify that the gitignore rules properly track/ignore the expected files.

Why make this change?

This establishes a consistent project structure for Braintrust repositories, improves runner script caching by keeping artifacts local to each project, and provides better control over what gets tracked in version control through managed gitignore rules.

@parkerhendo Parker Henderson (parkerhendo) changed the title Clean up runner artifacts and init command Add bt init command with managed .bt directory layout Apr 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Latest downloadable build artifacts for this PR commit fbb02a52eea3:

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

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