MCPcopy Create free account
hub / github.com/JaredStewart/coderlm / cmd_batch

Function cmd_batch

plugin/skills/coderlm/scripts/coderlm_cli.py:384–409  ·  view source on GitHub ↗

Execute multiple CLI commands in one invocation.

(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

382
383
384def cmd_batch(args: argparse.Namespace) -> None:
385 """Execute multiple CLI commands in one invocation."""
386 commands = args.commands
387 lines = commands.strip().split("\n")
388 any_failed = False
389 parser = build_parser()
390
391 for line in lines:
392 line = line.strip()
393 if not line or line.startswith("#"):
394 continue
395 print(f"=== {line} ===")
396 try:
397 tokens = shlex.split(line)
398 sub_args = parser.parse_args(tokens)
399 sub_args.func(sub_args)
400 except SystemExit as e:
401 if e.code != 0:
402 any_failed = True
403 except Exception as e:
404 print(f"ERROR: {e}", file=sys.stderr)
405 any_failed = True
406 print()
407
408 if any_failed:
409 sys.exit(1)
410
411
412# ── REPL Helper Functions (for exec --code) ──────────────────────────

Callers

nothing calls this directly

Calls 1

build_parserFunction · 0.85

Tested by

no test coverage detected