arch: admin config dir (~/.baudbot/) and standalone config command#30
Merged
Conversation
Phase 2 of CLI restructure: - bin/config.sh: standalone interactive config command - Writes secrets to ~/.baudbot/.env (admin-owned) - Shows masked existing values on re-run - Accepts BAUDBOT_CONFIG_USER env var for install.sh - bin/deploy.sh: copies ~/.baudbot/.env → agent's ~/.config/.env - Falls back to existing agent config if no admin config found - Sets 600 perms and correct ownership - install.sh: calls 'baudbot config' then 'baudbot deploy' instead of inline prompting. ~200 lines removed. - bin/baudbot: config command now routes to config.sh - bin/doctor.sh: checks for admin config dir - CI: verifies admin config written + deployed to agent
If getent fails (user doesn't exist, auth service outage), CONFIG_HOME would be empty, causing secrets to be written to /.baudbot on the root filesystem. Now exits with a clear error instead.
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.
What
Phase 2 of the CLI restructure (TODO-41e29e4e). Admin config now lives in
~/.baudbot/instead of being written directly to the agent's home.Flow
Admin can edit secrets without
sudo -u baudbot_agent. Re-runningbaudbot configshows masked existing values and preserves anything you don't change.New:
bin/config.shStandalone interactive config command, extracted from install.sh (~200 lines removed from install.sh).
~/.baudbot/.envon the calling userSUDO_USERorBAUDBOT_CONFIG_USERenv varsk-a****)BAUDBOT_SECRETif AgentMail is configuredBAUDBOT_SOURCE_DIRandBAUDBOT_AGENT_HOMEChanges
bin/config.sh(new)Standalone config command.
baudbot configroutes here.bin/deploy.shNew section: copies
~/.baudbot/.env→ agent's~/.config/.envwith 600 perms and correct ownership. Falls back to existing agent config if no admin config found.install.shReplaced ~200 lines of inline prompting with:
bin/baudbotconfigcommand now routes toconfig.sh(was a stub).bin/doctor.shAdded admin config check (
~/.baudbot/.envexists).CI scripts
Verify admin config written to
~/.baudbot/.envand deployed to agent.