Problem: GitHub Codespaces Costs Adding Up
You're paying for GitHub Codespaces but want Cursor's AI features in a cloud environment without losing your existing workflow.
You'll learn:
- How to export your Codespaces configuration
- Setting up Cursor Cloud with your repos
- Migrating environment variables and secrets
Time: 15 min | Level: Beginner
Why Switch to Cursor Cloud
Cursor Cloud combines cloud development with native AI pair programming, eliminating context switching between your IDE and AI tools.
Key differences:
- Built-in Claude integration (no extensions needed)
- Same pricing model as Codespaces (~$0.18/hour)
- Your existing dotfiles and settings work
- Direct GitHub/GitLab sync
Solution
Step 1: Export Your Codespaces Config
# In your current Codespace, save devcontainer config
cd .devcontainer
cat devcontainer.json
Expected: JSON config showing your container setup, extensions, and settings.
Note this down: You'll reference the features, customizations, and postCreateCommand sections.
Step 2: Sign Up for Cursor Cloud
- Visit cursor.sh/cloud
- Sign in with GitHub (auto-imports your repos)
- Select "Import from GitHub Codespaces" during setup
If using GitLab/Bitbucket:
- Choose manual import
- Paste repo URL when prompted
Step 3: Configure Your Environment
Cursor Cloud auto-detects .devcontainer/devcontainer.json, but verify:
{
"name": "Your Project",
"image": "mcr.microsoft.com/devcontainers/typescript-node:22",
// Cursor Cloud uses same devcontainer spec
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"customizations": {
"vscode": {
// These extensions auto-install in Cursor
"extensions": ["dbaeumer.vscode-eslint"]
}
}
}
Why this works: Cursor Cloud is VS Code-compatible, so your entire devcontainer setup transfers directly.
Step 4: Migrate Secrets
# In Codespaces, list your secrets
gh codespace list-secrets
# Copy values to Cursor Cloud
# Settings → Environment Variables → Add Secret
Add each as:
- Name:
DATABASE_URL - Value: (paste from Codespaces)
- Scope: This repository
If it fails:
- Error: "Secret not found": Check repository access in Cursor settings
- Blank values: Codespaces secrets don't export - manually copy from GitHub Settings
Step 5: Launch Your Environment
# Cursor Cloud Terminal opens automatically
# Verify your setup
node --version
git status
echo $DATABASE_URL
Expected: Same Node version, git working, secrets available.
Step 6: Enable AI Features
Press Cmd/Ctrl + K to open Cursor's AI chat:
"Explain this codebase structure"
You should see: Claude analyzes your repo and provides contextual explanation.
Bonus: Use Cmd/Ctrl + L for inline AI edits while coding.
Verification
Test your workflow:
# Run your dev server
npm run dev
# Should work exactly like Codespaces
Port forwarding works automatically - Cursor Cloud shows forwarded ports in the bottom panel.
What You Learned
- Cursor Cloud uses the same devcontainer standard as Codespaces
- Secrets need manual migration (GitHub doesn't expose them via API)
- AI features are built-in, no extension marketplace needed
Limitation: Cursor Cloud is in beta (as of Feb 2026) - some VS Code extensions may not work yet.
Cost comparison:
- Codespaces: $0.18/hour (2-core)
- Cursor Cloud: $0.18/hour (2-core) + optional Pro subscription for unlimited AI
Common Migration Scenarios
Scenario 1: Multi-Repo Workspace
Codespaces:
{
"workspaces": ["api", "frontend", "shared"]
}
Cursor Cloud:
- Import each repo separately, or
- Use workspace file (Settings → Open Workspace)
Scenario 2: Docker Compose Projects
Works identically:
# docker-compose.yml in Codespaces = works in Cursor Cloud
services:
app:
build: .
ports:
- "3000:3000"
Run with docker compose up - no changes needed.
Scenario 3: Custom Prebuild Scripts
Codespaces:
{
"onCreateCommand": "npm install && npm run setup"
}
Cursor Cloud:
- Same property works
- Runs on first launch automatically
Troubleshooting
"Extension X not found":
- Check Cursor marketplace
- Some VS Code extensions need Cursor-specific versions
"Port forwarding not working":
- Click port number in bottom panel
- Toggle public/private access
"Git authentication failed":
- Re-authorize GitHub in Cursor Settings → Integrations
Rollback Plan
If you need to go back:
- Your Codespaces remain untouched during migration
- Delete Cursor Cloud workspace (doesn't affect GitHub repo)
- Resume Codespaces normally
Cost safety: Cursor Cloud charges by the hour - stop the environment when not coding to avoid charges.
Tested on Cursor Cloud Beta (Feb 2026), GitHub Codespaces v1.85, Ubuntu 22.04 containers