Installation
Copy
npm install -g kodo-cli
Authentication
Copy
# Login with your API key
kodo login YOUR_API_KEY
# Or set environment variable
export KODO_API_KEY=your_api_key
Commands
Incidents
Copy
# List incidents
kodo incidents list
kodo incidents list --status investigating
# Create incident
kodo incident create \
--title "Database issues" \
--status investigating \
--severity major \
--services "API,Database" \
--message "We are investigating connection timeouts"
# Update incident
kodo incident update inc_abc123 \
--status identified \
--message "Root cause identified"
# Resolve incident
kodo incident resolve inc_abc123 \
--message "Issue resolved"
Services
Copy
# List services
kodo services list
# Create service
kodo service create \
--name "Payment API" \
--description "Handles payment processing"
# Update status
kodo service update svc_abc123 --status degraded
Monitors
Copy
# List monitors
kodo monitors list
# Create uptime monitor
kodo monitor create \
--name "API Health" \
--url "https://api.example.com/health" \
--interval 300
# Create heartbeat monitor
kodo heartbeat create \
--name "Nightly Backup" \
--interval 86400
# Send heartbeat
kodo heartbeat ping hb_abc123
# Disable monitor
kodo monitor disable mon_abc123
Status
Copy
# View current status
kodo status
# View specific service
kodo status svc_abc123
CI/CD Integration
GitHub Actions
Copy
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start maintenance
env:
KODO_API_KEY: ${{ secrets.KODO_API_KEY }}
run: |
npm install -g kodo-cli
kodo incident create \
--title "Scheduled Deployment" \
--status maintenance \
--severity minor
- name: Deploy
run: ./deploy.sh
- name: End maintenance
if: always()
run: |
kodo incident resolve $INCIDENT_ID \
--message "Deployment complete"
GitLab CI
Copy
deploy:
script:
- npm install -g kodo-cli
- kodo incident create --title "Deployment" --status maintenance
- ./deploy.sh
- kodo incident resolve $INCIDENT_ID
environment: production
Scripting
Copy
#!/bin/bash
# deployment-wrapper.sh
# Start maintenance incident
INCIDENT=$(kodo incident create \
--title "Scheduled Deployment" \
--status maintenance \
--severity minor \
--output json | jq -r '.id')
# Run deployment
if ./deploy.sh; then
kodo incident resolve $INCIDENT --message "Deployment successful"
else
kodo incident update $INCIDENT \
--status investigating \
--severity major \
--message "Deployment failed, rolling back"
fi
Configuration
Create~/.kodorc or .kodorc in your project:
Copy
{
"apiKey": "your_api_key",
"defaultOrg": "my-org",
"output": "table"
}
Output Formats
Copy
# Table (default)
kodo incidents list
# JSON
kodo incidents list --output json
# Quiet (IDs only)
kodo incidents list --output quiet