| title | description | author | ms.date | ms.topic | keywords | estimated_reading_time | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
GitHub Codespaces Installation |
Install HVE-Core in GitHub Codespaces using postCreateCommand |
Microsoft |
2025-12-03 |
how-to |
|
7 |
GitHub Codespaces requires a specific installation approach because traditional methods (peer directories, bind mounts) don't work in cloud environments. This method uses postCreateCommand to clone HVE-Core into the persistent /workspaces directory.
✅ Use this when:
- Your project runs exclusively in Codespaces
- You want automatic HVE-Core setup for all users
- You need zero-config onboarding for contributors
❌ Consider alternatives when:
- You also need local devcontainer support → Multi-Root Workspace
- Your team needs version control → Submodule
- You're using local VS Code only → Peer Clone
| Feature | Local Devcontainer | GitHub Codespaces |
|----------------------------|---------------------|--|---------------------------------|
| ${localWorkspaceFolder} | ✅ Resolves to host | ❌ Not available |
| Bind mounts to host | ✅ Full support | ❌ No host access |
| Persistent storage | Host filesystem | /workspaces only |
| User settings modification | ✅ Via file system | ❌ Only via Settings Sync1 |
Codespaces has a specific storage model:
/
├── workspaces/ # ✅ PERSISTENT - survives stops/restarts
│ ├── your-repo/ # Your cloned repository
│ └── hve-core/ # 👈 HVE-Core goes here
├── home/codespace/ # ⚠️ Semi-persistent (survives stops, not rebuilds)
└── <system-dirs>/ # ❌ Not persistent
The postCreateCommand clones HVE-Core into /workspaces/hve-core where it persists across Codespace sessions.
Use the hve-core-installer agent:
- Open GitHub Copilot Chat (
Ctrl+Alt+I) - Select
hve-core-installerfrom the agent picker - Say: "Install HVE-Core for Codespaces"
- Follow the guided setup
Add the clone command and VS Code settings:
git add .devcontainer/devcontainer.json
git commit -m "feat: add HVE-Core support for Codespaces"
git push- New Codespace: Create from the updated branch
- Existing Codespace: Rebuild (
Ctrl+Shift+P→ "Codespaces: Rebuild Container")
- Open GitHub Copilot Chat (
Ctrl+Alt+I) - Click the agent picker dropdown
- Verify HVE-Core agents appear (task-planner, task-researcher, prompt-builder)
{
"name": "HVE-Core Enabled",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"postCreateCommand": "[ -d /workspaces/hve-core ] || git clone --depth 1 https://github.com/microsoft/hve-core.git /workspaces/hve-core",
"customizations": {
"vscode": {
"settings": {
"chat.modeFilesLocations": { "/workspaces/hve-core/.github/agents": true },
"chat.promptFilesLocations": { "/workspaces/hve-core/.github/prompts": true },
"chat.instructionsFilesLocations": { "/workspaces/hve-core/.github/instructions": true }
}
}
}
}{
"name": "HVE-Core Development Environment",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"postCreateCommand": {
"clone-hve-core": "if [ ! -d /workspaces/hve-core ]; then git clone --depth 1 https://github.com/microsoft/hve-core.git /workspaces/hve-core && echo '✅ HVE-Core cloned'; else echo '✅ HVE-Core present'; fi",
"verify": "test -d /workspaces/hve-core/.github/agents && echo '✅ Verified' || echo '⚠️ Missing'"
},
"updateContentCommand": "cd /workspaces/hve-core && git pull --ff-only 2>/dev/null || echo 'Update skipped'",
"customizations": {
"vscode": {
"settings": {
"chat.promptFilesLocations": {
"/workspaces/hve-core/.github/prompts": true,
".github/prompts": true
},
"chat.instructionsFilesLocations": {
"/workspaces/hve-core/.github/instructions": true,
".github/instructions": true
},
"chat.modeFilesLocations": {
"/workspaces/hve-core/.github/agents": true,
".github/agents": true
}
}
}
}
}For projects needing HVE-Core in both local devcontainers and Codespaces:
{
"name": "HVE-Core (Local + Codespaces)",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
// Clone if not already present (Codespaces path)
"postCreateCommand": "[ -d /workspaces/hve-core ] || git clone --depth 1 https://github.com/microsoft/hve-core.git /workspaces/hve-core",
// Local only: mount peer directory (silently fails in Codespaces)
"mounts": [
"source=${localWorkspaceFolder}/../hve-core,target=/workspaces/hve-core,type=bind,readonly=true,consistency=cached"
],
"customizations": {
"vscode": {
"settings": {
// Both paths - VS Code ignores non-existent paths
"chat.promptFilesLocations": {
"/workspaces/hve-core/.github/prompts": true,
"../hve-core/.github/prompts": true
},
"chat.instructionsFilesLocations": {
"/workspaces/hve-core/.github/instructions": true,
"../hve-core/.github/instructions": true
},
"chat.modeFilesLocations": {
"/workspaces/hve-core/.github/agents": true,
"../hve-core/.github/agents": true
}
}
}
}
}cd /workspaces/hve-core
git pullAdd updateContentCommand to your devcontainer.json:
{
"updateContentCommand": "cd /workspaces/hve-core && git pull --ff-only 2>/dev/null || true"
}This runs when the Codespace starts (not on every terminal open).
To always get the latest version on rebuild:
{
"postCreateCommand": "rm -rf /workspaces/hve-core && git clone --depth 1 https://github.com/microsoft/hve-core.git /workspaces/hve-core"
}Warning: This removes any local changes on every rebuild.
Check HVE-Core was cloned:
ls /workspaces/hve-core/.github/agentsCheck postCreateCommand ran:
Look at the Codespace creation log for clone output or errors.
Network issues: Try rebuilding the Codespace.
GitHub rate limiting: Ensure you're authenticated:
gh auth statusCheck devcontainer.json paths:
Settings must use absolute paths (/workspaces/hve-core/...).
Verify settings in VS Code:
- Open Command Palette (
Ctrl+Shift+P) - Type "Preferences: Open User Settings (JSON)"
- Check if settings are present
The clone command skips if the folder exists. Force update:
cd /workspaces/hve-core
git pullOr modify postCreateCommand to always pull (see Auto-Update section).
| Aspect | Status |
|---|---|
| Codespaces | ✅ Designed for this |
| Local devcontainers | |
| Team sharing | ✅ Auto-setup for all contributors |
| Portable paths | |
| Version pinning | |
| Offline support | ❌ Requires network during creation |
| Setup complexity | ✅ Low (just devcontainer.json) |
To pin to a specific version:
{
"postCreateCommand": "[ -d /workspaces/hve-core ] || git clone --depth 1 --branch v1.0.0 https://github.com/microsoft/hve-core.git /workspaces/hve-core"
}Replace v1.0.0 with your desired version tag.
- Your First Workflow - Try HVE-Core with a real task
- Multi-Root Workspace - For dual local + Codespaces support
- Submodule - For team version control
🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.
Footnotes
-
User-level settings require Settings Sync. Workspace/container-level settings can still be configured via
devcontainer.jsonusingcustomizations.vscode.settings. ↩
{ "name": "My Project with HVE-Core", "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "postCreateCommand": "[ -d /workspaces/hve-core ] || git clone --depth 1 https://github.com/microsoft/hve-core.git /workspaces/hve-core", "customizations": { "vscode": { "settings": { "chat.modeFilesLocations": { "/workspaces/hve-core/.github/agents": true }, "chat.promptFilesLocations": { "/workspaces/hve-core/.github/prompts": true }, "chat.instructionsFilesLocations": { "/workspaces/hve-core/.github/instructions": true } } } } }