Deploy CLI: Status & Destroy
Check deployment status and destroy deployments using praisonai deploy
Check deployment status and manage lifecycle using praisonai deploy status and praisonai deploy destroy.
Status
Check the current status of a deployment.
praisonai deploy status --file agents.yamlExpected Output:
📊 Checking deployment status...
╭─────────────────────────────────────────────────────────────────────────────╮
│ Deployment Status │
├─────────────────┬───────────────────────────────────────────────────────────┤
│ Property │ Value │
├─────────────────┼───────────────────────────────────────────────────────────┤
│ State │ RUNNING │
│ Service Name │ praisonai-service │
│ Provider │ api │
│ Region │ N/A │
│ URL │ http://127.0.0.1:8005 │
│ Healthy │ ✅ Yes │
│ Instances │ 1/1 │
│ Created │ 2024-01-15T10:30:00Z │
│ Updated │ 2024-01-15T10:30:00Z │
╰─────────────────┴───────────────────────────────────────────────────────────╯Status CLI Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--file, -f | string | agents.yaml | Path to agents.yaml |
--verbose, -v | flag | false | Show detailed metadata |
--json | flag | false | Output as JSON |
Status States
| State | Description |
|---|---|
RUNNING | Service is running and healthy |
STOPPED | Service is stopped |
PENDING | Service is starting or updating |
FAILED | Service failed to start |
NOT_FOUND | No deployment found |
UNKNOWN | Status cannot be determined |
Verbose Output
praisonai deploy status --file agents.yaml --verboseShows additional metadata like container IDs, task ARNs, etc.
JSON Output
praisonai deploy status --file agents.yaml --json{
"state": "running",
"url": "http://127.0.0.1:8005",
"message": "Service is running",
"service_name": "praisonai-service",
"provider": "api",
"region": null,
"healthy": true,
"instances_running": 1,
"instances_desired": 1,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"metadata": {}
}Destroy
Delete/destroy a deployment.
praisonai deploy destroy --file agents.yamlExpected Output:
⚠️ Warning: This will destroy the deployment!
File: agents.yaml
Service: praisonai-service
Provider: api
Type 'yes' to confirm destruction: yes
🗑️ Destroying deployment...
✅ Deployment destroyed successfully
Deleted resources:
• process: praisonai-api-8005Destroy CLI Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--file, -f | string | agents.yaml | Path to agents.yaml |
--yes, -y | flag | false | Skip confirmation prompt |
--force | flag | false | Force deletion |
--json | flag | false | Output as JSON |
Skip Confirmation
praisonai deploy destroy --file agents.yaml --yesForce Destroy
Force deletion even if some resources fail to delete:
praisonai deploy destroy --file agents.yaml --yes --forceCloud Destroy Example
praisonai deploy destroy --file agents.yaml --yesExpected Output (AWS):
🗑️ Destroying deployment...
✅ Deployment destroyed successfully
Deleted resources:
• ecs_service: praisonai-service
• ecs_task_definition: praisonai-task:1
• ecr_image: praisonai-app:latest
• cloudwatch_log_group: /ecs/praisonai-servicePython
from praisonai.deploy import Deploy
# Load deployment
deploy = Deploy.from_yaml("agents.yaml")
# Check status
status = deploy.status()
print(f"State: {status.state.value}")
print(f"URL: {status.url}")
print(f"Healthy: {status.healthy}")
# Destroy
result = deploy.destroy(force=False)
if result.success:
print(f"Destroyed: {result.resources_deleted}")
else:
print(f"Error: {result.error}")Troubleshooting
| Issue | Fix |
|---|---|
| NOT_FOUND status | Deployment doesn’t exist, run praisonai deploy run |
| FAILED status | Check logs, run praisonai deploy doctor |
| Destroy failed | Try with --force flag |
| Permission denied | Check cloud provider credentials |
Related
- Deploy CLI Overview – All deploy commands
- Doctor – Check deployment readiness
- API Deploy – Deploy as local API