Develop in a Devcontainer
The Framework M devcontainer is a zero-config environment for Framework M development. It bundles Python, Node, PostgreSQL, Redis, and NATS, so you do not need to install the services locally.
This page covers opening the environment with either VS Code Dev Containers or Devsy. For creating and running an app, follow Getting Started.
What you get
| Component | Details |
|---|---|
| Python | 3.12 with uv and the m CLI linked |
| Node | 24 with pnpm |
| PostgreSQL | 16 (db service) |
| Redis | 7 (redis service) |
| NATS | 2 (nats service) |
| Ports | 8000 (m prod), 8888 API, 5173 Vite, 9999 Studio |
| VS Code | Python, Pylance, Prettier, ESLint |
The devcontainer runs in enterprise mode: DATABASE_URL, REDIS_URL, and NATS_URL point at the bundled services.
Database note: the container uses PostgreSQL, not SQLite. When following Getting Started, skip its SQLite
.envstep and use a Postgres + server extra (for example[server-granian,postgres]) pluspsycopg2-binaryformigrate sync/all. The container'sDATABASE_URLis already set.
Option 1 — VS Code Dev Containers extension
Prerequisites
- Docker Desktop (or Docker Engine on Linux)
- VS Code
- The Dev Containers extension
Open the container
-
Clone the devcontainer repository and open it in VS Code:
git clone https://github.com/framework-m/framework-m-devcontainer.gitcd framework-m-devcontainercode . -
Open the Command Palette (
Ctrl/Cmd + Shift + P) and run:Dev Containers: Reopen in ContainerVS Code builds the Compose stack, runs
postCreateCommand(uv sync), and links themCLI. -
Wait for the build to finish. The first build takes longer because it downloads the base image and installs Python, Node, and pnpm.
-
Verify the environment:
m --versionuv --versionnode --versionpnpm --version -
Open the Ports panel. The container forwards:
Port Service 8000m prod8888Framework M API ( m dev)5173Vite frontend 9999Studio UI
Next: follow Getting Started to create an app. The container root is already a uv project with
framework-mandframework-m-studio, so skip Getting Started's initialuv init/uv addsteps and start at creating the app. The container already setsDATABASE_URL,REDIS_URL, andNATS_URL; do not add a SQLite.envunless you intentionally want to switch.
Option 2 — Devsy
Devsy is a community fork of DevPod. It runs the same .devcontainer/devcontainer.json on local Docker, a remote host, Kubernetes, or a cloud machine. Use the desktop app for everyday work or the CLI for automation.
Desktop
-
Install Devsy Desktop for your platform.
-
Open Providers and click + Add. Choose Docker, then Add Provider.
-
Open Workspaces and click + Create. The wizard has five steps:
- Provider: select the Docker provider.
- Source: enter
https://github.com/framework-m/framework-m-devcontainer. - IDE: choose VS Code (Remote - SSH), VS Code Browser, or None.
- Review: check the workspace name and configuration.
- Launch: Devsy builds the devcontainer and opens your IDE.
-
If you chose None, connect over SSH:
ssh <workspace>.devsyDevsy adds a
<workspace>.devsyentry to~/.ssh/config.
CLI
Install the CLI and start the same workspace from a terminal:
curl -L https://devsy.sh/install.sh | sh
devsy provider add docker
devsy workspace up github.com/framework-m/framework-m-devcontainer --ide vscode
Use --ide openvscode for VS Code in the browser, or --ide none for SSH only. Add --id framework-dev to give the workspace a stable name.
Ports
The devcontainer declares 8000, 8888, 5173, and 9999. Use your editor's Ports panel to open them. If you connect over plain SSH, forward them manually:
ssh -L 8000:localhost:8000 \
-L 8888:localhost:8888 \
-L 5173:localhost:5173 \
-L 9999:localhost:9999 \
<workspace>.devsy
Next: follow Getting Started. As with VS Code, skip the initial project-setup steps because the container is already configured.
MCP server
Devsy exposes workspace control to MCP-capable AI clients:
devsy mcp serve
Configure the client to launch that command. A typical configuration:
{
"mcpServers": {
"devsy": {
"command": "devsy",
"args": ["mcp", "serve"]
}
}
}
Available tools:
workspace_list,workspace_status,workspace_create,workspace_start,workspace_stop,workspace_deleteworkspace_exec— run a one-shot command in a running workspaceprovider_list,provider_add,provider_delete,provider_use
workspace_status returns the saved configuration, not whether the workspace is running. Use devsy workspace status <name> --result-format json for live state.
workspace_exec is bounded by devsy mcp serve flags: --exec-timeout-default (5m), --exec-timeout-max (30m), --exec-output-cap (100 KiB per stream), and --mcp-max-concurrent-ops (8).
The MCP server has the same authority as your local Devsy CLI: it can create/delete workspaces, run commands, and manage providers. Only connect clients you trust.
Agent skill
Devsy also publishes an agent skill that teaches an agent how to choose workspaces and providers, run commands, and recover from timeouts:
npx skills add devsy-org/devsy --skill devsy
Add -g to install it for all projects, or --agent to target a specific agent. The skill requires Node.js for npx. Installing the skill is separate from running the MCP server; configure both independently.
Notes
- Rebuild the container after changing
.devcontainer/:- VS Code: Dev Containers: Rebuild Container
- Devsy:
devsy workspace up <workspace> --recreate
- If a port is not reachable, check the editor's Ports panel or use the SSH forwarding command above.
- The devcontainer repository's README is intentionally minimal and links back here and to Getting Started.