Skip to content

Phase 1.3: Core stack instance lifecycle commands #3

@omattsson

Description

@omattsson

Overview

The primary developer workflow: create, deploy, monitor, stop, clean, and delete stack instances.

Commands

Command Description
stack list List instances (filters: --mine, --status, --cluster, --definition)
stack get <id> Show instance detail
stack create Create instance (--definition, --name, --branch, --cluster, --ttl)
stack deploy <id> Trigger deploy, return log ID
stack stop <id> Trigger stop
stack clean <id> Undeploy + remove namespace
stack delete <id> Delete instance
stack status <id> Pod states and deployment status
stack logs <id> Latest deployment log output
stack clone <id> Clone an existing instance
stack extend <id> Extend TTL (--minutes)

Tasks

  • Implement all commands listed above
  • Table output with colored status badges (Running=green, Error=red, Draft=gray)
  • --output json for scripting, --quiet for ID-only output
  • Confirmation prompts for destructive operations (delete, clean) with --yes to skip

Acceptance Criteria

  • Complete lifecycle: create → deploy → status → logs → stop → clean → delete
  • stackctl stack list --mine --status running -o json returns valid JSON
  • stackctl stack list -q returns one ID per line (pipeable to xargs)

Depends On

API Endpoints

Method Path Description
GET /api/v1/stack-instances List (query params: owner, status, cluster_id)
GET /api/v1/stack-instances/:id Get detail
POST /api/v1/stack-instances Create
DELETE /api/v1/stack-instances/:id Delete
POST /api/v1/stack-instances/:id/deploy Deploy
POST /api/v1/stack-instances/:id/stop Stop
POST /api/v1/stack-instances/:id/clean Clean
GET /api/v1/stack-instances/:id/status Pod status
GET /api/v1/stack-instances/:id/deploy-log Latest log
POST /api/v1/stack-instances/:id/clone Clone
POST /api/v1/stack-instances/:id/extend Extend TTL

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreCore stack lifecycle commandsphase-1Phase 1: Foundation + Core Lifecycle (MVP)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions