Goal
Automate the repeatable parts of remote branch agent setup. Reduce SSH babysitting.
Scope
Create scripts/bootstrap-branch.sh that runs on the remote VM and handles:
- Bun install — check if bun exists, install if not, add to PATH in
~/.bash_profile
- GH_TOKEN setup — prompt for PAT, write to
~/.tps/secrets/<agent>-github-pat, add export to ~/.bash_profile
- Repo clone — clone
tpsdev-ai/cli and tpsdev-ai/flair to ~/src/tpsdev-ai/
- Build verify —
bun install && bun run build on both repos
- Git identity — set
user.name and user.email from agent name
- Branch config — create
~/.tps/branch.conf.json with WS transport on port 7000
- Workspace scaffold — create
~/.openclaw/workspace-<agent>/ with template SOUL.md, USER.md, IDENTITY.md, TOOLS.md
Constraints
- Script takes agent name as first argument:
./bootstrap-branch.sh anvil
- Idempotent — safe to re-run
- Prompts for secrets (PAT), never hardcodes them
- Prints a final checklist of what still needs manual setup (Flair keys, branch registration, Discord token)
- Goes in
scripts/ in the TPS CLI repo (public, useful for anyone setting up a branch)
Output
PR to main with the script. Branch: anvil/ops-118-bootstrap
Goal
Automate the repeatable parts of remote branch agent setup. Reduce SSH babysitting.
Scope
Create
scripts/bootstrap-branch.shthat runs on the remote VM and handles:~/.bash_profile~/.tps/secrets/<agent>-github-pat, add export to~/.bash_profiletpsdev-ai/cliandtpsdev-ai/flairto~/src/tpsdev-ai/bun install && bun run buildon both reposuser.nameanduser.emailfrom agent name~/.tps/branch.conf.jsonwith WS transport on port 7000~/.openclaw/workspace-<agent>/with templateSOUL.md,USER.md,IDENTITY.md,TOOLS.mdConstraints
./bootstrap-branch.sh anvilscripts/in the TPS CLI repo (public, useful for anyone setting up a branch)Output
PR to main with the script. Branch:
anvil/ops-118-bootstrap