Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>OpsPilot AI — DevOps CopilotNew to Visual Studio Code? Get it now.
OpsPilot AI — DevOps Copilot

OpsPilot AI — DevOps Copilot

anirudhdeshmukh

|
8 installs
| (0) | Free
Enterprise DevOps Copilot — policy-driven, autonomous infrastructure automation with BYOK support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

OpsPilot AI — DevOps Copilot

Plain-English DevOps automation inside VS Code — Terraform, Kubernetes, Helm. Bring your own LLM key (Anthropic, Azure OpenAI, or local Ollama). All execution runs locally against a self-hosted backend you start with one docker compose command.


Requirements

  • VS Code 1.90+
  • Docker Desktop (running)
  • One LLM provider key — Anthropic, Azure OpenAI, or Ollama (local, free)

That's it. No cloud signup, no SaaS account.


1. Create .env

In any empty folder:

JWT_SECRET_KEY=replace-with-a-32-char-random-string
REDIS_PASSWORD=changeme
POSTGRES_PASSWORD=opspilot

# Pick ONE LLM provider:
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...
CLAUDE_MODEL=claude-sonnet-4-6

# — or Azure —
# LLM_PROVIDER=azure
# AZURE_FOUNDRY_ENDPOINT=https://YOUR_RESOURCE.cognitiveservices.azure.com/
# AZURE_FOUNDRY_API_KEY=...
# AZURE_FOUNDRY_DEPLOYMENT=gpt-4o

# — or Ollama (free, local) —
# LLM_PROVIDER=ollama
# OLLAMA_BASE_URL=http://host.docker.internal:11434
# OLLAMA_MODEL=llama3.2

2. Start the backend (one command)

From the same folder as .env:

curl -o docker-compose.hub.yml \
  https://gist.githubusercontent.com/Iam-anirudhdeshmukh/34af785c93aa730866cb16560fd77898/raw/eb1a84e81a1cf9140aa2f6e945f48d4b7927c5fa/docker-compose.hub.yml

docker compose -f docker-compose.hub.yml up -d

This starts three containers: opspilot-api (FastAPI) + opspilot-redis + opspilot-postgres. Wait ~10 seconds, then:

curl http://localhost:8000/health
# {"status":"ok","version":"1.0.0-beta.1"}

3. Connect the extension

  1. Click the OpsPilot AI icon in the VS Code activity bar
  2. Server URL: http://localhost:8000
  3. Cmd+Shift+P → OpsPilot: Set Password → enter admin123
  4. Click Check API Health → status bar turns green

Demo logins (built-in):

Username Password Role
admin@opspilot.dev admin123 run + approve
dev@opspilot.dev dev123 run only

4. Try it

Type any of these in the task input box:

Create an Azure VM with a VNet and subnets for production

→ status: files_written. Click Validate Plan → review → Apply.

Get all pods in the default namespace

→ status: completed. Pod list appears in the result panel.

Scale the nginx deployment to 5 replicas in opspilot-test namespace on production

→ status: pending_approval. Approval card appears in the sidebar.

Install the redis Helm chart as release opspilot-redis in opspilot-test namespace

→ Helm install output in the result panel.

Use any namespace — just mention it in the task. OpsPilot extracts it automatically.

Switch the run-mode dropdown to Simulate for a dry run (no execution).


Useful docker-compose commands

# Tail API logs
docker compose -f docker-compose.hub.yml logs -f api

# Restart after editing .env
docker compose -f docker-compose.hub.yml up -d --force-recreate api

# Stop everything
docker compose -f docker-compose.hub.yml down

# Wipe Redis + Postgres state and start fresh
docker compose -f docker-compose.hub.yml down -v

Approval matrix

Environment Risk Approvals
dev LOW 0 — runs immediately
dev MEDIUM+ 1
qa / prod Any 1
prod HIGH (destroy / rollback) 2

Optional: state locking, rollback, remote backend

Set in VS Code Settings → OpsPilot AI. All default OFF.

Setting What it does
opspilot.enableStateLocking Per-session Redis lock; emits backend.tf for native Terraform locking when a backend is configured
opspilot.rollbackOnFailure Auto-runs terraform destroy if apply fails — adds statuses rolling_back / rolled_back / rollback_failed
opspilot.backend Remote backend config — s3 (AWS + DynamoDB), gcs, or azurerm

Troubleshooting

Problem Fix
"API unreachable" in extension curl http://localhost:8000/health — if it fails, run docker compose -f docker-compose.hub.yml logs api
401 Unauthorized JWT expired (60 min) — re-run OpsPilot: Set Password
status: failed from LLM Check key in .env, then docker compose -f docker-compose.hub.yml up -d --force-recreate api (restart re-reads .env)
Ollama not reachable from container Use http://host.docker.internal:11434, not localhost
kubectl / helm not found Install on your host machine — OpsPilot calls them via subprocess
Panel blank Cmd+Shift+P → Developer: Reload Window

Links

  • Docker Hub image: hub.docker.com/r/dskystar/opspilot-ai
  • Compose file + full guide: gist.github.com/Iam-anirudhdeshmukh/34af785c93aa730866cb16560fd77898
  • Publisher: marketplace.visualstudio.com/publishers/anirudhdeshmukh
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft