Adds `scripts/wsrelateddocgen`, a standalone generator that renders a new Reference page, [`docs/reference/workspace-related-data.md`](https://github.com/coder/coder/blob/nickvigilante/docs-1860-generate-a-standalone-reference-page/docs/reference/workspace-related-data.md), from the `wsrelated` struct tags on `codersdk.Workspace` (#32437). The page explains the `include_related` query parameter, lists the valid paths, and maps every workspace response field to the paths that return it. It's wired into `make gen`, so CI fails when the tags and the page drift apart. This carries over the content from #32449 as agreed with @spikecurtis. The table gets its own page instead of going into a Swagger description, and it doesn't depend on `scripts/apidocgen`, which the FumaDocs OpenAPI plugin is going to replace. This PR doesn't touch `docs/reference/api/`, `scripts/apidocgen`, or the Swagger annotations. A follow-up PR will link the `include_related` parameter description to this page once the page is live. The table is row-for-row identical to the one #32449 generates. Changes from that draft: - The page lists the 12 valid `include_related` paths, generated from the same tags, so readers don't have to scan the table for them. - The generator validates tags with `wsrelated.Parse` instead of adding a `wsrelated.Paths()` export, so there are no `codersdk` changes. - Links from the page to the Workspaces API reference are page-level only, so they keep working when the API reference's anchors change. Refs #32449, DOCS-1860 **Questions for @spikecurtis (resolved)** 1. The four **Not returned** rows (`latest_build.job.available_workers`, `.metadata`, `.worker_name`, and `latest_build.resources[].agents[].metadata`): confirmed. Those fields come back only when you query the job or agent directly. 2. Permission errors: the page now says that Coder checks read access to the related data you select and fails the whole request (`403` by ID, `404` by name), and that selecting less data might avoid the error. Per your suggestion, it doesn't single out `template`, which is the only related data with a permission check today (`coderd/workspaces.go:120`, `:368`, `:2888`). <details> <summary>Placement decision, verification, and doc-check self-check</summary> ### Placement: Reference, not Workspaces - The reader is an integrator calling the REST API or Go SDK. The Workspaces section's manifest scope is "guides for Coder end users on accessing, managing, and personalizing their workspaces", which is a different audience (`docs/.style/style-guide/audience-and-scope.md`). - The page is reference material for one API surface, which matches the existing generated `Reference > API key scopes` page. It sits right after that page in the sidebar and follows the same `scopesdocgen` pattern: route metadata from `docs/manifest/`, `docgenenv.GeneratedHeader`, a Makefile rule with markdownlint and the table formatter, a `.gitattributes` entry, and a CI `docs-gen` filter entry. - It stays out of `docs/reference/api/`. That directory and its `rest-api.json` sidebar fragment belong to the Swagger generator being replaced. ### Verification - `go test ./scripts/wsrelateddocgen/`: passes. Negative controls: removing the "Not returned" rows, changing the multi-path join, dropping rows for fields inside arrays, skipping tag validation, and skipping the multi-path split or the dedupe each make the matching test fail. - `go test ./coderd/ -run 'TestWorkspaceWSRelatedTags$|TestWorkspaceIncludeRelated$|TestWorkspaceByOwnerAndNameIncludeRelated$'`: passes. These existing tests pin the behavior the page describes: omitting the parameter returns everything, paths narrow the response, an invalid path returns `400`, and every tag yields a populated field. - `make docs/reference/workspace-related-data.md docs/manifest.json`: regenerating with `-B` produces identical output. - `make lint/emdash lint/docs-html lint/docs-manifest lint/docs-gen-filter`, markdownlint, and Vale on the page: clean. - `golangci-lint run` with `.golangci.yaml` and `.golangci.new-code.yaml` on the new package: 0 issues. - Not run: the full `make gen` and `make lint`, and a live request against a deployment. The curl example is checked against the handler source and the tests above. CI runs `go test` on Linux, macOS, and Windows. The generator only uses `filepath` for file paths, and its tests don't read files. ### doc-check (author self-check) Fixed before opening: a Vale `AbbreviationFirstUse` warning for REST, a "whose" used for a thing (`word-choice.md#whose-for-people-not-things`), an extra comma before "and", an incomplete list of empty-entry errors, and the missing list of valid paths. Not applied: - I didn't add an explanation of each path. There's no source for those descriptions, and the field table already shows what each path returns. - For the permission paragraph, I didn't narrow the statement to `template`. Self-check flagged the general wording because the other related data loads with system permissions, but that data is workspace-scoped: anyone who can read the workspace can read its builds, resources, and agents (`coderd/database/dbauthz/dbauthz.go:4479`), so the statement holds in every reachable case. </details> --- _Generated by Coder Agents on behalf of @nickvigilante._
title, markdown_url
| title | markdown_url |
|---|---|
| Home | /docs.md |
Coder Workspaces
Coder Workspaces are cloud development environments defined with Terraform, connected through a secure Wireguard tunnel, and automatically shut down when not in use. Agents and developers share the same workspace infrastructure.
- Defined in Terraform: Templates describe the infrastructure for each workspace, from Amazon Elastic Compute Cloud (EC2) VMs and Kubernetes Pods to Docker containers.
- Any architecture and OS: Support ARM and x86-64 across Windows, Linux, and macOS from a single deployment.
- Managed by admins: Platform teams create and maintain templates that enforce approved images, resource limits, and security policies.
- Accessed from any IDE: Connect through VS Code, JetBrains, Cursor, a web terminal, remote desktop, or SSH.
- Automatic shutdown: Idle workspaces stop automatically to reduce cloud spend, and restart in seconds when needed.
Coder Agents
Coder Agents is a native AI coding agent built into Coder. The agent loop runs in the Coder control plane on your infrastructure, not in the workspace and not in a vendor's cloud. Developers interact with agents through the web UI or the Representational State Transfer (REST) API for programmatic and continuous integration (CI)-driven workflows.
- Self-hosted agent loop: The control plane handles planning, model calls, and tool dispatch. Workspaces have zero AI awareness.
- No API keys in workspaces: large language model (LLM) credentials stay in the control plane.
- Any model: Anthropic, OpenAI, Google, Bedrock, or self-hosted endpoints. Switching is a configuration change.
- Governance and cost controls: Centralized model approval, per-user spend limits, and audit logging.
- Open source and inspectable: The full platform is available to audit and extend.
IDE support
You can use:
-
Any Web IDE, such as
- code-server
- JetBrains Projector
- Jupyter
- And others
-
Your existing remote development environment:
-
A file sync such as Mutagen
Why remote development
Provisioning consistent development environments for a large engineering team is difficult. Each developer has preferences for operating systems, editors, and toolchains, and providing a reliable build environment across all of them is a maintenance burden. A missed step during onboarding or an unsupported local configuration can cost hours of debugging.
Remote development solves this by moving the environment off the developer's machine and into managed infrastructure. The developer's laptop becomes a portal into the actual compute where work happens. If a device is lost or replaced, access is simply revoked. No source code or credentials are stored locally.
This approach provides:
- Speed: Server-grade hardware accelerates builds, tests, and large workloads without requiring expensive local machines.
- Consistency: Infrastructure tools such as Terraform, nix, Docker, and Dev Containers produce identical environments for every developer.
- Security: Source code stays on private servers. Users and groups are managed through single sign-on (SSO) and role-based access control (RBAC).
- Compatibility: Workspaces share infrastructure configurations with staging and production, reducing configuration drift.
- Accessibility: Browser-based IDEs and remote IDE extensions let developers work from any device, including lightweight laptops, Chromebooks, and tablets.
Read more on the Coder blog, the Slack engineering blog, or from Alex Ellis at OpenFaaS.
Why Coder
The key difference between Coder and other platforms is that the entire system, agent loop, control plane, model routing, and workspace provisioning, runs on infrastructure you control.
For agents, this means platform teams can:
- Run the entire agent loop on their infrastructure, with no SaaS dependency for orchestration.
- Define Model Context Protocol (MCP) servers, skills, and system prompts centrally so every agent session starts with the same tools, policies, and context.
- Keep LLM credentials out of workspaces entirely.
- Tie every agent action to an authenticated user identity.
- Support air-gapped and restricted-network deployments with self-hosted models.
For workspaces, this means admins can:
- Support any architecture (ARM, x86-64) and operating system (Windows, Linux, macOS).
- Modify pod/container specs, such as adding disks, managing network policies, or setting/updating environment variables.
- Use VM or dedicated workspaces, developing with Kernel features (no container knowledge required).
- Enable persistent workspaces, which are like local machines, but faster and hosted by a cloud service.
Pricing
Coder is free and open source under the GNU Affero General Public License v3.0. All developer productivity features are included in the open source version. A Premium license is available for enhanced support and custom deployments.
How Coder works
Coder workspaces are represented with Terraform, but you do not need to know Terraform to get started. The Coder Registry provides production-ready templates for AWS EC2, Azure, Google Cloud, Kubernetes, and other providers.
Providers and compute environments
Workspaces can include more than just compute. Terraform can add storage buckets, secrets, sidecars, and other resources.
See the templates documentation for details.
What Coder is not
-
Coder is not an infrastructure as code (IaC) platform.
Terraform is the first IaC provisioner in Coder, allowing Coder admins to define Terraform resources as Coder workspaces.
-
Coder is not a DevOps/CI platform.
Coder workspaces can be configured to follow best practices for cloud-service-based workloads, but Coder is not responsible for how you define or deploy the software you write.
-
Coder is not an online IDE.
Coder supports common editors, such as VS Code, vim, and JetBrains, all over HTTPS or SSH.
-
Coder is not a collaboration platform.
You can use Git with your favorite Git platform and dedicated IDE extensions for pull requests, code reviews, and pair programming.
-
Coder is not a SaaS/fully-managed offering.
Coder is a self-hosted solution. You must host Coder in a private data center or on a cloud service, such as AWS, Azure, or GCP.

