| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
A fully configured Linux development environment for TypeAgent: Node.js 22, Python 3.12, .NET 8.0, pnpm, Azure CLI, GitHub CLI, and Claude Code, in a container you can run locally or in GitHub Codespaces.
| Variant | Config file | Use when |
|---|---|---|
| standard | .devcontainer/devcontainer.json | Codespaces, or local dev without GUI/agent worktrees |
| vnc | .devcontainer/vnc/devcontainer.json | You need the Electron shell GUI inside the container |
| agent | .devcontainer/agent/devcontainer.json | Local only: VS Code agent windows that create worktrees |
Quick decision aid:
See Variants in detail below for what each one changes and why.
No local prerequisites. Only the standard variant works in Codespaces; vnc and agent require host-side resources that Codespaces does not provide.
cd ts
pnpm run buildUse this wrapper when you want a single command that also forwards your host git identity and (optionally) sets up SSH access. --config accepts a short name (vnc, agent) or an explicit path.
.devcontainer/scripts/start-devcontainer.sh # standard
.devcontainer/scripts/start-devcontainer.sh --config vnc
.devcontainer/scripts/start-devcontainer.sh --config agent
.devcontainer/scripts/start-devcontainer.sh --ssh # also wire host SSHLifecycle flags:
| Flag | Effect |
|---|---|
| --recreate | Recreate the container (keep image, keep volumes) |
| --rebuild | Rebuild the image without cache (implies --recreate) |
| --clean | Recreate the container and remove its Docker volumes |
| --reset | --rebuild plus --clean (full fresh start) |
For local-only workflows where you want SSH set up with host-key checks disabled, pass --insecure-local (implies --ssh):
.devcontainer/scripts/start-devcontainer.sh --insecure-localThe default. Works in Codespaces and locally. Source tree is bind-mounted under /workspaces/<repo>/, and ts/node_modules lives on a Docker named volume so native modules stay container-local.
Does not support VS Code agent windows that auto-create git worktrees: a separate host VS Code window cannot open a worktree path that exists only inside the container. Use the agent variant for that workflow. (In Codespaces the agent worktree feature does work natively, because every attached VS Code window sees the same /workspaces/... paths in the same Codespace VM.)
Same as standard plus the desktop-lite feature for a noVNC web desktop on port 6080. Use this when you need to run Electron (the TypeAgent shell) inside the container. Heavier resource requirements (4 CPU, 16 GB RAM).
The desktop-lite feature is amd64-only, so on Apple Silicon this variant may require Rosetta / QEMU emulation.
Variant designed for VS Code agent windows that auto-create git worktrees. VS Code's Copilot CLI agent writes worktrees to a hardcoded <dirname(repo)>/<basename(repo)>.worktrees, which is not configurable. To make those worktrees usable from both host and container, this variant:
Worktrees created by an agent window are visible at the same path on the host, so a separate host VS Code window can open them directly. This does not work in Codespaces (no host path).
cd ts
pnpm run build # build all packages
pnpm run cli # run the CLI
pnpm run test:local # run unit tests
pnpm run start:agent-server # start the agent serverFor variants without the VNC desktop, run the backend in the container and the Electron shell on your host - the agent server port is forwarded:
# In container
pnpm run server
# On host
cd ts && pnpm run shellHow your git identity ends up inside the container depends on how you started it:
Verify with:
git config --global --listIf you are using the container for untrusted / agent work, you almost certainly want to disable the automatic ~/.gitconfig projection - see Hardening for untrusted / agent use.
../scripts/agent-worktree.sh feature-name # create
../scripts/agent-worktree.sh --cleanup feature-nameEach worktree shares git history but has independent working tree, branch state, and (via pnpm's content-addressable store) effective node_modules.
The base image includes an SSH server. To configure key-based access from the host:
.devcontainer/scripts/setup-ssh-access.shThe script:
For local-only workflows where you intentionally want host-key checking off:
.devcontainer/scripts/setup-ssh-access.sh --insecure-localWhen using a non-default variant, pass it through:
.devcontainer/scripts/setup-ssh-access.sh --config vnc
.devcontainer/scripts/setup-ssh-access.sh --config agentConnect:
ssh typeagent-devcontainerPre-installed:
claude # interactive session
claude "your prompt" # one-shotWhen you plan to give a coding agent broad shell access in the container, assume any credential reachable from the container is reachable by the agent (and by anything that prompt-injects it). Lock down what the host wires in.
1. Disable VS Code's automatic credential / SSH wiring.
The Dev Containers extension by default copies your host ~/.gitconfig, installs a git credential helper that proxies back to the host, and forwards SSH and GPG agent sockets. Turn those off in your User settings.json (not the repo's devcontainer config):
Older VS Code versions use the remote.containers.* prefix.
start-devcontainer.sh does not copy ~/.gitconfig; it only forwards user.name / user.email via LOCAL_GIT_USER_* env vars. No host credential helpers or SSH agents are wired in by the wrapper.
2. Verify inside the container.
git config --global --get credential.helper # should be empty
ls -la ~/.gitconfig # only the identity from post-create
echo "$SSH_AUTH_SOCK" # should be empty3. If the agent needs to push, use a scoped bot credential.
Preferred, in order:
echo "$GH_BOT_TOKEN" | gh auth login --with-token --hostname github.com
gh auth setup-gitAvoid: forwarding your personal SSH agent, bind-mounting ~/.git-credentials, or running gh auth login with your personal account.
4. Extra isolation.
| Port | Service | Variants |
|---|---|---|
| 2222 | Dev container SSH (host-published on 127.0.0.1) | all |
| 3000 | API server (HTTP) | all |
| 3443 | API server (HTTPS) | all |
| 8081 | Browser agent (WebSocket) | all |
| 8082 | Code agent (WebSocket) | all |
| 8999 | Agent server (WebSocket) | all |
| 5901 | VNC client | vnc |
| 6080 | noVNC web desktop | vnc |
Runs as codespace, UID/GID 1001 (matches the Codespaces convention).
| Mount point in container | Type | Purpose |
|---|---|---|
| workspace folder | bind | Source tree (host or Codespaces filesystem) |
| <workspace>/ts/node_modules | volume | Container-local node_modules (native build) |
| /home/codespace/.local/share/pnpm/store | volume | Shared pnpm content-addressable store |
| /home/codespace/.claude | volume | Claude Code config |
| /home/codespace/.copilot | volume | Copilot CLI config |
| <host repo>.worktrees | bind | Agent worktrees, same path host & container (agent) |
.devcontainer/Dockerfile extends the Ubuntu 24.04 base with pre-installed system libraries (libsecret). This avoids apt-get install on every container creation and leverages Docker's layer cache for fast rebuilds.
pnpm store prune
pnpm installThe ts/node_modules and pnpm store named volumes are created by Docker as root:root on first mount. post-create.sh chowns them to codespace automatically. If you ever hit this manually after the script has run:
sudo chown -R codespace:codespace \
"$(pwd)/ts/node_modules" \
/home/codespace/.local/share/pnpm \
/home/codespace/.claude \
/home/codespace/.copilot
cd ts && pnpm installDo not blindly chown -R the workspace tree itself in the agent variant: it is a host bind mount, and the change will be visible on the host.
If scripts fail with \r': command not found, the repo has CRLF line endings. Fix with:
git config core.autocrlf input
git rm --cached -r .
git reset --hard| Goal | Command Palette | CLI |
|---|---|---|
| Recreate container | Dev Containers: Rebuild Container | start-devcontainer.sh --rebuild |
| Rebuild image, drop volumes (reset) | Dev Containers: Rebuild Container Without Cache | start-devcontainer.sh --reset |
| Back | FazBrowse Home | New Git URL |
{ "dev.containers.copyGitConfig": false, "dev.containers.gitCredentialHelperConfigLocation": "none", "dev.containers.forwardSSH": false, "dev.containers.forwardGPG": false, }