codematic / README.md
ThongCoder's picture
Update README.md
3ea249e verified
metadata
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! ๐Ÿš€