refactor(cli): remove redundant 'build' command
test / run tests/run_tests.py (pull_request) Successful in 13s

DockerBottlePlatform.launch already runs 'docker build' on every
start, and the layer cache makes no-change rebuilds nearly free.
Anything 'cli.py build' did, 'cli.py start' does for you.
This commit is contained in:
2026-05-10 23:05:24 -04:00
parent 5f82044403
commit 4a45c267f3
2 changed files with 1 additions and 23 deletions
+1 -4
View File
@@ -1,6 +1,6 @@
"""Main CLI dispatcher.
Commands: build, cleanup, edit, info, init, list, start
Commands: cleanup, edit, info, init, list, start
"""
from __future__ import annotations
@@ -9,7 +9,6 @@ import sys
from ..log import Die, die
from ._common import PROG
from .build import cmd_build
from .cleanup import cmd_cleanup
from .edit import cmd_edit
from .info import cmd_info
@@ -18,7 +17,6 @@ from .list import cmd_list
from .start import cmd_start
COMMANDS = {
"build": cmd_build,
"cleanup": cmd_cleanup,
"edit": cmd_edit,
"info": cmd_info,
@@ -31,7 +29,6 @@ COMMANDS = {
def usage() -> None:
sys.stderr.write(f"usage: {PROG} <command> [args...]\n\n")
sys.stderr.write("Commands:\n")
sys.stderr.write(" build build (or rebuild) the claude-bottle Docker image\n")
sys.stderr.write(" cleanup stop and remove all active claude-bottle containers\n")
sys.stderr.write(" edit open an agent in vim for editing\n")
sys.stderr.write(" info print env, skills, and prompt details for a named agent\n")
-19
View File
@@ -1,19 +0,0 @@
"""build: build (or rebuild) the claude-bottle Docker image."""
from __future__ import annotations
import argparse
import os
from .. import docker as docker_mod
from ._common import PROG, REPO_DIR
def cmd_build(argv: list[str]) -> int:
parser = argparse.ArgumentParser(prog=f"{PROG} build", add_help=True)
parser.parse_args(argv)
docker_mod.require_docker()
image = os.environ.get("CLAUDE_BOTTLE_IMAGE", "claude-bottle:latest")
docker_mod.build_image(image, REPO_DIR)
return 0