PRD 0003: Bottle Backend abstraction #5
@@ -1,6 +1,6 @@
|
|||||||
"""Main CLI dispatcher.
|
"""Main CLI dispatcher.
|
||||||
|
|
||||||
Commands: build, cleanup, edit, info, init, list, start
|
Commands: cleanup, edit, info, init, list, start
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
@@ -9,7 +9,6 @@ import sys
|
|||||||
|
|
||||||
from ..log import Die, die
|
from ..log import Die, die
|
||||||
from ._common import PROG
|
from ._common import PROG
|
||||||
from .build import cmd_build
|
|
||||||
from .cleanup import cmd_cleanup
|
from .cleanup import cmd_cleanup
|
||||||
from .edit import cmd_edit
|
from .edit import cmd_edit
|
||||||
from .info import cmd_info
|
from .info import cmd_info
|
||||||
@@ -18,7 +17,6 @@ from .list import cmd_list
|
|||||||
from .start import cmd_start
|
from .start import cmd_start
|
||||||
|
|
||||||
COMMANDS = {
|
COMMANDS = {
|
||||||
"build": cmd_build,
|
|
||||||
"cleanup": cmd_cleanup,
|
"cleanup": cmd_cleanup,
|
||||||
"edit": cmd_edit,
|
"edit": cmd_edit,
|
||||||
"info": cmd_info,
|
"info": cmd_info,
|
||||||
@@ -31,7 +29,6 @@ COMMANDS = {
|
|||||||
def usage() -> None:
|
def usage() -> None:
|
||||||
sys.stderr.write(f"usage: {PROG} <command> [args...]\n\n")
|
sys.stderr.write(f"usage: {PROG} <command> [args...]\n\n")
|
||||||
sys.stderr.write("Commands:\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(" 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(" edit open an agent in vim for editing\n")
|
||||||
sys.stderr.write(" info print env, skills, and prompt details for a named agent\n")
|
sys.stderr.write(" info print env, skills, and prompt details for a named agent\n")
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user