Open
Conversation
|
Latest downloadable build artifacts for this PR commit
Available artifact names
|
Contributor
Author
|
Not really sure how to test this but there is definitely a lack of tests. |
Contributor
Author
|
bt auth profiles does nothing |
… into cedric/better-dx
7448035 to
73568b4
Compare
…have to manually create one
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.
bt setupasks 0 and 2 questions: project and coding agent (and needs authentication)org choice:
if --api-key is passed, use the provided api key
else if --prefer-profile, use the already registered profile (probably registered with OAuth previously)
else if the user has an api key in the env (variable BRAINTRUST_API_KEY), use it
else if there is already a registered profile, use it. If a profile is registered but the access token isn't accessible (for example storing the access token in plain text in ~/.config/bt/secrets.json but the file was deleted), just force re authentication
else same behavior as a user picking OAuth: give a url to paste in the browser
project choice:
if -p/--project is passed, use the specified project. If the project does not exist, stop the setup. (maybe we should create the project instead?)
else if BRAINTRUST_DEFAULT_PROJECT exist in the env, same as for -p/--project
else if the user has two or more projects, prompt the user to choose the project to use
else the user has exactly one project, the default 'My Project' projects. Create a project in the user's organization named '{whoami}-test' where {whoami} is the result of the whoami command and use this project
skills, mcp, local, global:
by default, choose skills and mcp and global scope
--no-skill, --no-mcp unselect skill/mcp
--local selects local instead of global
--skill --mcp --global are only here to conflict with their --no-... counterpart, they don't do anything else
--no-mcp/skills don't remove pre-existing mcp/skills.
instrument:
by default, instrument
--(no-)instrument (un)select instrumentation
--no-instrument still configures mcp and skills, it's only the agent that isn't launched
agent:
if --agent AGENT flag is passed, use the specified agent
else if only one exists in [claude code, codex, cursor, opencode] (ie only one exist in PATH), use it
otherwise, prompt the user
workflow docs:
if one or multiple --workflow WORKFLOW flags are passed, fetch these workflows
otherwise, fetch all workflows
language:
try to identify the language based on file like pyproject.toml in the project root/sub folders (in current folder and subfolder with depth 1)
if nothing is found, alter the start prompt of the agent to find which language to instrument
TUI/background:
TUI by default
if --background is passed, launch the agent in the background
--tui exist only to conflict with --background (and --no-instrument)
I'm not really sure how to handle --background without --yolo. The agent will often try to use restricted command, but can't get user approval.
yolo mode
self explanatory for claude, codex, cursor
opencode is in yolo mode by default for the directory it is launched in
Besides, --yolo or equivalent don't exist in opencode yet (don't trust your LLM about this, there are many closed/merged/open PRS about this but just check
opencode -hand you'll see it's not there).interactive mode
-i/--interactive
Prompt the user to choose the configuration instead of passing options. Does not ask questions which are already answered by options.
When opening the agent TUI, a wall of text (the prompt) is printed: do we want this?
Bugs
json is very buggy
project isn't asked
Untested/poorly tested:
env variables
no-color, api/app-url, env-file, no-fetch-docs, refresh-docs, workers
TODO
Better help message in the interactive wizard
better json objects, they are not consistent