Agent Sandbox Registry

agent-sandbox

Decision: template command redesign

无中文版

.agents/notes/implemented/feature/2026-09-04-template-command-redesign.md

Decision: template command redesign

Status: implemented Implemented: 2026-09-09 Task: #105

Problem

The existing abx template subcommand family had several design flaws: it assumed a nonexistent central registry, had redundant responsibilities across commands, and left users completely unable to discover templates without a repo. These problems would directly affect the user experience at the first public release.

Decision

Record the existing problems and clarify the redesign direction.

Existing problems (fixed)

  1. abx template list assumed a nonexistent central registry → changed to scan locally installed templates.
  2. abx template delete and abx template cache --clear had redundant responsibilities → responsibilities clarified.
  3. Users could not find any template without providing a repo → solved via abx template search + awesome-templates.yaml.
  4. abx template cache only listed file paths → info now shows full capabilities + custom_commands.

Redesign result

  1. list: scans ~/.abx/templates/ and shows a summary of locally installed templates, with no network request.
  2. info <template>: local-first, falling back to remote GET /templates/{id}, showing full details.
  3. install <source>: installs a template from a GitHub repo or local path into ~/.abx/templates/.
  4. search <keyword>: searches the awesome-templates.yaml index.
  5. build/deploy: builds a Docker image and pushes + creates the template.
  6. delete: deletes a remote template, with confirmation.

API Design

abx template list                 # scan ~/.abx/templates/, no network
abx template info <template>      # local-first, fallback to GET /templates/{id}
abx template install <source>     # from GitHub repo or local path
abx template search <keyword>     # search awesome-templates.yaml
abx template build                # build Docker image
abx template deploy               # push + create template
abx template delete <template>    # delete remote template (confirm)
abx install <source>              # top-level shortcut alias for `template install`

Alternatives considered

Dependencies

Test Strategy

Acceptance criteria

Implementation