Remote Developer - Claude Code instances in isolated Kubernetes pods
Go to file
jordan d2de49a591 feat: Add API key authentication with auto-migrations
Implements API key authentication for all rdev endpoints:

## Database (internal/db)
- Auto-migrating postgres connection
- Embedded SQL migrations via go:embed
- api_keys table with scopes, expiration, project restrictions

## Auth Package (internal/auth)
- Key generation: rdev_sk_<prefix>_<random> format
- Scopes: projects:read, projects:execute, keys:read, keys:write, admin
- SHA-256 key hashing (secrets never stored)
- Expiration options: 30d, 60d, 90d, 1y, never
- Middleware skips /health, /ready, /docs, /openapi.json

## Key Management API
- GET /keys - List keys (keys:read)
- POST /keys - Create key (keys:write)
- GET /keys/{id} - Get key details (keys:read)
- DELETE /keys/{id} - Revoke key (keys:write)

## Environment Variables
- DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME
- RDEV_ADMIN_KEY - Super admin key for bootstrapping

Version bumped to 0.5.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 21:26:26 -07:00
cmd/rdev-api feat: Add API key authentication with auto-migrations 2026-01-24 21:26:26 -07:00
deployments/k8s/base feat: Implement v0.2-v0.4 (workspaces, git, API) 2026-01-24 21:07:00 -07:00
docs docs: Add v0.1.0 history and update reference with k3s notes 2026-01-24 20:09:03 -07:00
history feat: Implement v0.2-v0.4 (workspaces, git, API) 2026-01-24 21:07:00 -07:00
internal feat: Add API key authentication with auto-migrations 2026-01-24 21:26:26 -07:00
pkg/api feat: Add rdev-api Go server with OpenAPI docs 2026-01-24 20:56:27 -07:00
scripts feat: Implement v0.2-v0.4 (workspaces, git, API) 2026-01-24 21:07:00 -07:00
.gitignore feat: Add API key authentication with auto-migrations 2026-01-24 21:26:26 -07:00
CLAUDE.md Initial commit: rdev v0.1 base case 2026-01-24 19:24:07 -07:00
Dockerfile feat: Implement v0.2-v0.4 (workspaces, git, API) 2026-01-24 21:07:00 -07:00
Dockerfile.api feat: Implement v0.2-v0.4 (workspaces, git, API) 2026-01-24 21:07:00 -07:00
go.mod feat: Add API key authentication with auto-migrations 2026-01-24 21:26:26 -07:00
go.sum feat: Add API key authentication with auto-migrations 2026-01-24 21:26:26 -07:00
PLAN.md feat: Implement v0.2-v0.4 (workspaces, git, API) 2026-01-24 21:07:00 -07:00
README.md Initial commit: rdev v0.1 base case 2026-01-24 19:24:07 -07:00

rdev - Remote Developer

Run Claude Code in isolated Kubernetes pods on your k3s cluster.

Quick Start

# 1. Set kubeconfig (REQUIRED - this is k3s, not GKE)
export KUBECONFIG=~/.kube/orchard9-k3sf.yaml

# 2. Authenticate Claude locally (if not already)
claude login

# 3. Create credentials secret
./scripts/create-credentials-secret.sh

# 4. Deploy
./scripts/deploy.sh

# 5. Verify
./scripts/verify.sh

Usage

# Check Claude version
kubectl exec -n rdev claudebox-0 -- claude --version

# Interactive Claude session
kubectl exec -it -n rdev claudebox-0 -- claude "what can you help me with?"

# Run in workspace
kubectl exec -it -n rdev claudebox-0 -- bash
cd /workspace
claude "create a hello world go program"

Architecture

k3s cluster
└── rdev namespace
    └── claudebox-0 (StatefulSet)
        ├── Claude Code CLI
        ├── /workspace (20Gi PVC via Longhorn)
        └── /root/.claude (credentials from secret)

Roadmap

  • v0.1: Base case - single claudebox pod
  • v0.2: Real workspace mounting (pantheon, aeries)
  • v0.3: Git integration (push/pull)
  • v0.4: Discord bot control
  • v0.5: Streaming output
  • v0.6: Multi-project routing

Development

# Build image locally
docker build -t rdev-claudebox:dev .

# Build and push to Artifact Registry
./scripts/build-push.sh v0.1.0

Troubleshooting

# Check pod status
kubectl get pods -n rdev

# View pod logs
kubectl logs claudebox-0 -n rdev

# Describe pod for events
kubectl describe pod claudebox-0 -n rdev

# Check credentials mount
kubectl exec -n rdev claudebox-0 -- ls -la /root/.claude/