--- title: VS Code on Web emoji: 💻 colorFrom: blue colorTo: purple sdk: docker pinned: false app_port: 7860 --- # VS Code on Web - Hugging Face Spaces This Space deploys VS Code in your browser using code-server with persistent storage via Hugging Face Datasets. ## Features - 🌐 VS Code running in your browser - 💾 Persistent storage using Hugging Face Datasets - 🐍 Pre-installed Python 3 and pip - 📦 Node.js and npm included - 🛠️ Build tools and common utilities - 🔒 Password-protected access - 🤖 AI coding assistant (Continue) with Gemini support ## Setup ### 1. Create a Hugging Face Dataset Create a new private dataset on Hugging Face to store your VS Code data: https://huggingface.co/new-dataset ### 2. Configure Environment Variables In your Space settings, add these secrets: - `HF_TOKEN`: Your Hugging Face access token (with write permissions) - `HF_DATASET`: Your dataset name (e.g., `username/vscode-data`) ### 3. Access Your VS Code Once deployed, access your VS Code instance through this Space. The default password is `huggingface`. ## How Persistence Works The startup script automatically: - Downloads your saved workspace, settings, and extensions from the HF dataset on startup - Auto-saves every 5 minutes while running - Saves all data when the Space shuts down **Persisted data includes:** - VS Code settings and configuration - Installed extensions - Workspace files and folders - Extension settings (including API keys) ## Configuration - **Port**: 7860 - **Default Password**: `huggingface` (change in Dockerfile) - **Workspace Directory**: `/home/coder/workspace` - **Auto-save interval**: Every 5 minutes ## Installed Tools - Git - Python 3 with pip - Node.js with npm - Build essentials (gcc, g++, make) - Text editors (vim, nano) - Hugging Face CLI - Continue extension (supports Gemini, GPT-4, Claude, etc.) ## Notes - Without `HF_TOKEN` and `HF_DATASET` set, the Space runs without persistence - The first startup takes longer as it sets up the environment - Large workspaces may take time to sync - Your data is stored in your private HF dataset and not accessible to others