Spaces:
Sleeping
Sleeping
| title: Visual Studio Code | |
| emoji: π» | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: docker | |
| pinned: true | |
| license: mit | |
| short_description: An online VS Code on the Web, now equipped with toolchains. | |
| # π» VS Code on the Web IDE with Auto Backup | |
| This Space runs **VS Code on the Web** with a **full developer toolchain**, ready for mega collaboration: | |
| ### π§ Installed Developer Tools | |
| - **Python 3.12**: pip, virtualenv, JupyterLab, `black`, `flake8`, `mypy`, IPython | |
| - **C/C++**: gcc, g++, clang, lld, cmake, ninja, valgrind, gdb | |
| - **Rust**: stable toolchain via rustup | |
| - **Go**: latest stable | |
| - **Java**: OpenJDK 17 | |
| - **C#/.NET**: .NET SDK 8.0 | |
| - **Node.js 20**: npm, yarn, pnpm, TypeScript, ts-node, nodemon | |
| - **CLI Productivity Tools**: git, git-lfs, htop, fzf, ripgrep, silversearcher-ag, rsync, sqlite3, tree, jq, net-tools | |
| --- | |
| ### π Security Hardening | |
| - **Bash history is disabled globally**: | |
| All interactive shells inside this container are launched with: | |
| - `HISTFILE` unset | |
| - `HISTSIZE=0`, `HISTFILESIZE=0` | |
| - `.bash_history` linked to `/dev/null` | |
| π This ensures **no command history is ever logged to disk**, protecting sensitive tokens and commands. | |
| --- | |
| ### ποΈ Auto Backup | |
| Every 45 minutes, `/workspace` is automatically uploaded to your Hugging Face repo defined in environment variables: | |
| - `BACKUP_REPO` β target repo (e.g., `username/my-backup`) | |
| - `HF_TOKEN` β your Hugging Face API token | |
| > β οΈ On first launch, the backup service will attempt to restore `/workspace` from your `BACKUP_REPO`. Make sure the repo exists. If empty, a fresh workspace will be created. | |
| Backups are uploaded with a **cache-safe method** to avoid LFS errors. | |
| --- | |
| ### π Usage | |
| 1. Set secrets in **Space Settings**: | |
| - `BACKUP_REPO` | |
| - `HF_TOKEN` | |
| **Notes**: | |
| - Leaving either secret empty will **disable Auto Backup** and restore. | |
| - All files are wiped on Space restart. Using either persistent storage space or the Auto Backup Service is highly recommended. | |
| 2. Launch the Space β Access VS Code at `http://<space-url>` | |
| - No authentication by default (`--auth none`). | |
| - Optional: enable a password via environment variables if desired. | |
| 3. Work normally β backups run in the background every 45 minutes. | |
| --- | |
| ### β οΈ Important Notes | |
| 1. I **STRONGLY ADVISE** against putting credentials directly into the IDE. If you must use them, *remove them immediately* after use to prevent accidental leaks and misuse. | |
| 2. All command history is disabled for your safety β but *always treat the `/workspace` folder contents as sensitive*. | |
| 3. If you plan to duplicate this Space for backups, **DO NOT** make the Space public! Environment variables in Hugging Face Spaces can be exposed to anyone with container access (e.g., via `env`, `printenv`, or process inspection). | |
| 4. I am **NOT** responsible for any damages caused by leaked passwords/tokens from this Space β so take extreme care with your credentials. | |
| ### βΉοΈ Additional Notes | |
| - Since this Space is hosted remotely (not local), you may experience some latency when performing actions. | |
| - This IDE is designed for collaborative coding β so feel free to invite friends and enjoy a **feature-packed online coding adventure**! π | |