feat: add agent branch support to CLI#66
Merged
PennyroyalTea merged 5 commits intoelevenlabs:mainfrom Mar 12, 2026
Merged
Conversation
Add support for working with agent branches, allowing users to list branches, and pull/push from specific branches instead of only main. New commands: - `elevenlabs agents branches list --agent <id>` with --include-archived - `elevenlabs agents pull --agent <id> --branch <name_or_id>` - `elevenlabs agents push --agent <id> --branch <name_or_id>` Branch identification accepts both human-readable names and IDs (auto-detected by agtbrch_ prefix). --branch requires --agent since branch names are per-agent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Branch configs are now stored as separate files in agent_configs/ and
tracked in agents.json under a `branches` map per agent, enabling
git-based version control and CI/CD pipelines.
New features:
- `pull --all-branches`: fetch all branches as separate config files
- `pull --branch <name>`: now persistently stores branch config
- `push`: auto-pushes all registered branch configs alongside main
- `init`: updated next-steps with branch workflow guidance
Schema: agents.json entries now support an optional `branches` map:
{ "staging": { "config": "agent_configs/Agent.staging.json",
"branch_id": "agtbrch_xxx", "version_id": "ver_xxx" } }
Fully backward compatible - agents without branches work unchanged.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix variable shadowing: rename inner agentId to currentAgentId in push-impl.ts loop body to avoid confusion with the parameter - Fix dry-run: restructure push-impl.ts so --dry-run previews branch pushes instead of skipping them (previously dead code) - Fix React key: use branch.id instead of array index in BranchesListView Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I definitely need this |
- Add branch support to features list - Show branch config files in directory structure - Document branch commands (branches list, --branch, --all-branches) - Add Branch Workflows section with CI/CD pipeline example - Document agents.json branches schema Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fall back to non-UI codepath for --all-branches (UI view doesn't support it, was silently ignored) - Auto-push registered branch configs in PushView UI mode (previously only worked with --no-ui) - Fix main branch duplication in pullAllBranches when branch_id is unset on the agent entry (fall back to name="main" check) - Move dry-run check before client init and branch resolution in push-impl so --dry-run doesn't make network calls - Remove redundant resolveBranchId call in PullView (resolve once in initial effect, pass through to processNextAgent) - Include archived branches when resolving branch names so resolution doesn't silently fail for archived branches Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
|
lgtm, thanks for your contribution! |
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.
Summary
Implements #56 — adds support for working with agent branches in the CLI.
elevenlabs agents branches list --agent <id>— list all branches for an agent (with--include-archivedflag)elevenlabs agents pull --branch <name_or_id>— pull config from a specific branch, stored persistently inagents.jsonelevenlabs agents pull --all-branches— pull all branch configs as separate files for CI/CD workflowselevenlabs agents push --branch <name_or_id>— push to a specific branchelevenlabs agents push— auto-pushes all registered branch configs alongside mainDesign decisions
agtbrch_prefix)agent_configs/{Agent}.{branch}.json, tracked inagents.jsonunder abranchesmap per agentpull --all --all-branches+pushenables full sync workflowsagents.jsonschema (new optionalbranchesfield){ "agents": [{ "config": "agent_configs/My-Agent.json", "id": "agent_123", "branches": { "staging": { "config": "agent_configs/My-Agent.staging.json", "branch_id": "agtbrch_xxx", "version_id": "ver_xxx" } } }] }Test plan
elevenlabs agents branches list --agent <id>displays brancheselevenlabs agents pull --agent <id> --branch stagingstores branch configelevenlabs agents pull --agent <id> --all-branchesfetches all brancheselevenlabs agents push --agent <id> --branch stagingpushes to branchelevenlabs agents pushauto-pushes registered branch configs🤖 Generated with Claude Code