Skip to content

Implement CLI commands (egg start, stop, exec, logs, status) #29

@james-in-a-box

Description

@james-in-a-box

Summary

The CLI argument parser exists in cli/main.py but all commands return "not yet implemented". Need to implement actual functionality.

Current State

# cli/main.py:68
print(f"Command '{args.command}' not yet implemented")
return 1

Commands to Implement

Core Commands

  • egg start - Start gateway + sandbox containers
    • --config <path> - Config file location
    • --private - Enable private network mode
    • -p/--prompt - Run with prompt in non-interactive mode
  • egg stop - Stop running containers
  • egg status - Show container health and status

Utility Commands

  • egg exec <cmd> - Execute command inside sandbox
  • egg logs [--follow] - View container logs
  • egg config validate - Validate configuration files

Implementation Notes

Commands should:

  1. Load configuration from egg.yaml
  2. Manage Docker containers (start/stop/exec)
  3. Handle network setup (public vs private mode)
  4. Provide clear error messages

Dependencies

Acceptance Criteria

  • egg start launches gateway and sandbox containers
  • egg stop cleanly shuts down containers
  • egg status shows running state and health
  • egg exec runs commands in sandbox
  • egg logs streams container output
  • Error handling for missing Docker, config errors, etc.

Context

From codebase audit - this is Phase 4 in PR #693 implementation plan.

Authored-by: jib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions