OER·harvester

← Back to the library
GitHub MARKDOWN resource

Cloud Setup ☁️ – GitHub Codespaces

Inferred Use this guide if you don’t want to install anything locally. Codespaces gives you a free, browser-based VS Code instance with all dependencies pre-installed.

Licence
OPEN MIT
Authors
Microsoft (microsoft)
Updated
2026-07-16 · GitHub
Language
en
Length
328 words
Open original ↗

Cloud Setup ☁️ – GitHub Codespaces

Source: 01 Setup Cloud · GitHub · microsoft/generative-ai-for-beginners Authors: Microsoft (microsoft) Licence: MIT — https://spdx.org/licenses/MIT.html

Use this guide if you don’t want to install anything locally.
Codespaces gives you a free, browser-based VS Code instance with all dependencies pre-installed.


1. Why Codespaces?

Benefit What it means for you
✅ Zero installs Works on Chromebook, iPad, school lab PCs…
✅ Pre-built dev container Python 3, Node.js, .NET, Java already inside
✅ Free quota Personal accounts get 120 core-hours / 60 GB-hours per month

💡 Tip
Keep your quota healthy by stopping or deleting idle codespaces
(View ▸ Command Palette ▸ Codespaces: Stop Codespace).


2. Create a Codespace (one click)

  1. Fork this repo (top-right Fork button).
  2. In your fork, click Code ▸ Codespaces ▸ Create codespace on main.
    Dialog showing buttons to create a codespace

✅ A browser VS Code window opens and the dev container starts building. This takes ~2 minutes the first time.

3. Add your API key (the safe way)

  1. ⚙️ Gear icon -> Command Pallete-> Codespaces : Manage user secret -> Add a new secret.
  2. Name: OPENAI_API_KEY
  3. Value: paste your key → Add secret

That’s it—our code will pick it up automatically.

Option B .env file (if you really need one)

cp .env.copy .env
code .env         # fill in OPENAI_API_KEY=your_key_here

Disclaimer: This document has been translated using AI translation service Co-op Translator. While we strive for accuracy, please be aware that automated translations may contain errors or inaccuracies. The original document in its native language should be considered the authoritative source. For critical information, professional human translation is recommended. We are not liable for any misunderstandings or misinterpretations arising from the use of this translation.