Skip to content

Add logs --tail, kill, exec --workdir/--user/--env, up --wait#11

Merged
flaticols merged 1 commit into
mainfrom
feat/cli-small-additions
Jun 21, 2026
Merged

Add logs --tail, kill, exec --workdir/--user/--env, up --wait#11
flaticols merged 1 commit into
mainfrom
feat/cli-small-additions

Conversation

@flaticols

Copy link
Copy Markdown
Owner

Small CLI/runtime additions — no ComposeKit (parser) changes. All flags verified against Apple container's command reference.

Added

  • logs -n/--tail N — limit to the last N lines (container logs -n).
  • kill [services] — new command; -s/--signal (default KILL), reverse dependency order. Mirrors stop.
  • exec --workdir/--user/--env — forwarded to container exec (it already accepts -w/-u/-e); exec previously only forwarded -i/-t.
  • up --wait — blocks until services with a healthcheck report healthy, reusing the existing HealthChecker.

Incidental fix

logs --follow claimed -f, which collided with the global --file -f — ArgumentParser rejected every container compose logs … invocation ("Multiple arguments named -f"). --follow is now long-only. (Pre-existing; surfaced while testing.)

Tests

4 new argv tests via the recording-shim harness (kill signal + order, kill default, logs -n, exec flags). Verified emitted commands via --dry-run --verbose too. 32 tests pass.

All in the container runtime layer + CLI (no ComposeKit changes):
- logs: -n/--tail N (container logs -n).
- kill: new command, -s/--signal (default KILL), reverse dependency order.
- exec: forward --workdir/--user/--env (container exec already accepts them).
- up: --wait blocks until healthchecked services report healthy (reuses HealthChecker).

Also fixes a pre-existing bug: logs' --follow claimed -f, which collides with the
global --file -f and made ArgumentParser reject every 'logs' invocation; --follow
is now long-only.

Tests via the recording-shim harness for kill/logs/exec argv; 32 tests pass.
@flaticols flaticols merged commit f58ac04 into main Jun 21, 2026
1 check passed
@flaticols flaticols deleted the feat/cli-small-additions branch June 21, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant