{
"name": "TypeAgent Development",
"build": { "dockerfile": "Dockerfile" },
// Multi-arch base image (linux/amd64 and linux/arm64) so this configuration
// works on Apple Silicon as well as x86_64 hosts.
//
// This configuration works with:
// - VS Code + Docker Desktop (local, including macOS arm64)
// - GitHub Codespaces (cloud)
// - JetBrains IDEs with Dev Containers support
"features": {
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/git-lfs:1": {
"autoPull": false
},
"ghcr.io/devcontainers/features/node:1": {
"version": "22",
"nodeGypDependencies": true
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.12",
"installTools": true
},
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "8.0"
},
"ghcr.io/devcontainers/features/azure-cli:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
// base:ubuntu-24.04 does not pre-install zsh / oh-my-zsh, so add common-utils
// and create the non-root `codespace` user expected by the rest of this config.
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"username": "codespace",
"userUid": "1001",
"userGid": "1001"
}
},
// Publish SSH port on loopback only so host-side `ssh typeagent-devcontainer`
// works without exposing 2222 on the LAN. Plain `forwardPorts` is only
// honored by the VS Code / Codespaces port-forwarding UI and does NOT
// actually publish the port when the container is started via the
// devcontainer CLI, which leaves `localhost:2222` unreachable.
"appPort": ["127.0.0.1:2222:2222"],
"forwardPorts": [8999, 8081, 8082, 3000, 3443],
"portsAttributes": {
"8999": { "label": "Agent Server (WebSocket)", "onAutoForward": "notify" },
"8081": { "label": "Browser Agent (WebSocket)", "onAutoForward": "notify" },
"8082": { "label": "Code Agent (WebSocket)", "onAutoForward": "notify" },
"3000": { "label": "API Server (HTTP)", "onAutoForward": "notify" },
"3443": { "label": "API Server (HTTPS)", "onAutoForward": "notify" }
},
"mounts": [
// Global pnpm store - shared across containers for fast installs
"source=pnpm-global-store,target=/home/codespace/.local/share/pnpm/store,type=volume",
// Per-container node_modules (symlinks to global store)
"source=typeagent-node_modules-${devcontainerId},target=${containerWorkspaceFolder}/ts/node_modules,type=volume",
// Claude Code config persistence
"source=claude-code-config-${devcontainerId},target=/home/codespace/.claude,type=volume",
// Copilot CLI chat log persistence
"source=copilot-cli-config-${devcontainerId},target=/home/codespace/.copilot,type=volume",
// VS Code server data (extensions, settings cache, workspace storage, history)
// so editor state survives container recreate.
"source=vscode-server-${devcontainerId},target=/home/codespace/.vscode-server,type=volume"
],
"containerEnv": {
"LOCAL_GIT_USER_NAME": "${localEnv:LOCAL_GIT_USER_NAME}",
"LOCAL_GIT_USER_EMAIL": "${localEnv:LOCAL_GIT_USER_EMAIL}"
// For Codespaces, set these as repository secrets:
// - AZURE_OPENAI_API_KEY
// - AZURE_OPENAI_ENDPOINT
// - ANTHROPIC_API_KEY (for Claude Code)
},
"postCreateCommand": "bash .devcontainer/scripts/post-create.sh",
"postStartCommand": "bash .devcontainer/scripts/post-start.sh",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-dotnettools.csharp",
"ms-azuretools.vscode-azurefunctions",
"github.copilot",
"humao.rest-client"
],
"settings": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib",
"terminal.integrated.defaultProfile.linux": "zsh"
}
},
// Codespaces-specific settings
"codespaces": {
"openFiles": [
"ts/README.md"
]
}
},
"remoteUser": "codespace",
// Resource requirements
// Codespaces: Choose "4-core" or higher machine type
// Local: Ensure Docker has at least these resources allocated
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
}
}microsoft/TypeAgent
Publicmirrored fromhttps://github.com/microsoft/TypeAgentAvailable
.devcontainer/devcontainer.json
125lines · modepreview