From 3aa3e1b6f718c3471bcf2bc60f422602699c0da3 Mon Sep 17 00:00:00 2001 From: Nick Vigilante Date: Fri, 10 Jul 2026 15:49:25 +0000 Subject: [PATCH 1/6] docs: normalize code-fence languages for Shiki compatibility Normalize non-standard code-fence language tags across docs/** so a strict highlighter (Shiki, used by Fumadocs) won't fail the build on an unrecognized language: - tf, terraform -> hcl - pwsh -> powershell - env, output -> text - Dockerfile -> dockerfile promql fences are left as-is; Shiki doesn't bundle a promql grammar, so it needs a custom grammar registration when the site adopts Shiki (DOCS-118), rather than degrading to text. Updates the formatting style guide to document the canonical tags. DOCS-476 --- docs/.style/style-guide/formatting.md | 9 +++++- docs/about/contributing/modules.md | 4 +-- docs/about/contributing/templates.md | 12 ++++---- docs/admin/external-auth/index.md | 26 ++++++++-------- .../validated-architectures/index.md | 2 +- .../integrations/devcontainers/integration.md | 12 ++++---- .../integrations/multiple-kube-clusters.md | 4 +-- docs/admin/integrations/oauth2-provider.md | 2 +- docs/admin/integrations/vault.md | 2 +- docs/admin/networking/index.md | 2 +- docs/admin/networking/port-forwarding.md | 2 +- docs/admin/networking/workspace-proxies.md | 2 +- docs/admin/security/secrets.md | 4 +-- docs/admin/setup/appearance.md | 2 +- .../extending-templates/agent-metadata.md | 2 +- .../docker-in-workspaces.md | 14 ++++----- .../extending-templates/dynamic-parameters.md | 30 +++++++++---------- .../environment-variables.md | 8 ++--- .../extending-templates/external-auth.md | 2 +- .../templates/extending-templates/index.md | 6 ++-- .../jetbrains-preinstall.md | 2 +- .../templates/extending-templates/modules.md | 2 +- .../extending-templates/parameters.md | 26 ++++++++-------- .../prebuilt-workspaces.md | 4 +-- .../extending-templates/resource-metadata.md | 6 ++-- .../extending-templates/resource-ordering.md | 12 ++++---- .../resource-persistence.md | 8 ++--- .../extending-templates/variables.md | 2 +- .../templates/extending-templates/web-ides.md | 24 +++++++-------- .../extending-templates/workspace-tags.md | 2 +- .../managing-templates/change-management.md | 2 +- .../managing-templates/dependencies.md | 6 ++-- .../templates/startup-coordination/example.md | 4 +-- docs/admin/users/idp-sync.md | 4 +-- docs/admin/users/oidc-auth/google.md | 4 +-- docs/admin/users/oidc-auth/index.md | 12 ++++---- docs/admin/users/oidc-auth/microsoft.md | 4 +-- docs/admin/users/oidc-auth/refresh-tokens.md | 4 +-- docs/ai-coder/agent-firewall/index.md | 6 ++-- docs/ai-coder/agent-firewall/version.md | 4 +-- .../agents/platform-controls/git-providers.md | 6 ++-- docs/ai-coder/ai-gateway/clients/codex.md | 4 +-- docs/ai-coder/ai-gateway/clients/mux.md | 2 +- docs/ai-coder/ai-gateway/mcp.md | 2 +- docs/ai-coder/github-to-tasks.md | 2 +- .../customize-your-template/add-a-language.md | 8 ++--- .../authenticate-to-github.md | 4 +-- .../customize-your-template/index.md | 2 +- .../install-command-line-tools.md | 10 +++---- docs/install/airgap.md | 6 ++-- docs/install/registry-mirror-artifactory.md | 4 +-- docs/install/upgrade.md | 2 +- docs/tutorials/cloning-git-repositories.md | 4 +-- docs/tutorials/faqs.md | 12 ++++---- docs/tutorials/gcp-to-aws.md | 2 +- docs/tutorials/image-pull-secret.md | 2 +- docs/tutorials/template-from-scratch.md | 14 ++++----- .../workspace-access/antigravity.md | 2 +- .../workspace-access/port-forwarding.md | 2 +- .../workspace-access/remote-desktops.md | 2 +- 60 files changed, 192 insertions(+), 185 deletions(-) diff --git a/docs/.style/style-guide/formatting.md b/docs/.style/style-guide/formatting.md index f18429296c2f2..4b25525585c28 100644 --- a/docs/.style/style-guide/formatting.md +++ b/docs/.style/style-guide/formatting.md @@ -138,11 +138,16 @@ Use the most specific language tag available: Prefix each typed line with `$`. - `powershell` for Windows command-line blocks. PowerShell is the default Windows shell in the Coder docs. -- `tf` for Terraform and HCL. + `pwsh` is not a valid tag; use `powershell`. +- `hcl` for Terraform and HCL. + `tf` and `terraform` are not the canonical tag; use `hcl`. - `yaml` for YAML. - `go` for Go. - `json` for JSON. - `text` for command output shown on its own, and for any block with no syntax to highlight. + `env`, `output`, `none`, and `url` are not valid tags; use `text`. +- `dockerfile` for Dockerfiles, lowercase. + `Dockerfile` (capitalized) is not a valid tag. `bash` and `shell` are aliases of `sh`. Use `sh` so the corpus stays consistent. @@ -156,7 +161,9 @@ Do not copy the pattern into hand-written pages. The docs site highlights code with [Speed-Highlight](https://github.com/speed-highlight/core), which detects the language from the code content, not from the fence label. The fence label still drives highlighting on GitHub and in most editors, and `markdownlint` rule `MD040` requires one, so always declare the most specific language. +A future docs renderer may adopt [Shiki](https://shiki.style), which fails the build on a fence label it doesn't recognize as a language or alias, so use only tags Shiki supports. For content with no sensible language tag, fall back to `text`. +A fence label needing a grammar Shiki doesn't bundle (for example `promql`) stays as-is; register it as a custom grammar when the site adopts Shiki, rather than degrading it to `text`. **Do**: diff --git a/docs/about/contributing/modules.md b/docs/about/contributing/modules.md index 05d06e9299fa4..5ac9e9e8ba153 100644 --- a/docs/about/contributing/modules.md +++ b/docs/about/contributing/modules.md @@ -104,7 +104,7 @@ This creates: Edit `main.tf` to build your module's features. Here's an example based on the `git-clone` module structure: -```terraform +```hcl terraform { required_providers { coder = { @@ -212,7 +212,7 @@ This module clones a Git repository into your Coder workspace and ensures Git is ## Usage -```tf +```hcl module "git_clone" { source = "registry.coder.com/[your-username]/git-clone/coder" version = "~> 1.0" diff --git a/docs/about/contributing/templates.md b/docs/about/contributing/templates.md index d0c18f078a21f..ac80dd4422915 100644 --- a/docs/about/contributing/templates.md +++ b/docs/about/contributing/templates.md @@ -103,7 +103,7 @@ cd registry/[your-username]/templates/[template-name] Create `main.tf` with your complete Terraform configuration: -```terraform +```hcl terraform { required_providers { coder = { @@ -262,7 +262,7 @@ You can customize this template by: Use registry modules for common features: -```terraform +```hcl # VS Code in browser module "code-server" { count = data.coder_workspace.me.start_count @@ -311,7 +311,7 @@ module "dotfiles" { Provide meaningful customization options: -```terraform +```hcl variable "git_repo_url" { description = "Git repository to clone" type = string @@ -432,7 +432,7 @@ Before submitting your template, verify: ### Docker-based template -```terraform +```hcl # Simple Docker template resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count @@ -446,7 +446,7 @@ resource "docker_container" "workspace" { ### AWS EC2 template -```terraform +```hcl # AWS EC2 template resource "aws_instance" "workspace" { count = data.coder_workspace.me.start_count @@ -463,7 +463,7 @@ resource "aws_instance" "workspace" { ### Kubernetes template -```terraform +```hcl # Kubernetes template resource "kubernetes_pod" "workspace" { count = data.coder_workspace.me.start_count diff --git a/docs/admin/external-auth/index.md b/docs/admin/external-auth/index.md index 8f01738442cbf..bad27f2f1e112 100644 --- a/docs/admin/external-auth/index.md +++ b/docs/admin/external-auth/index.md @@ -24,7 +24,7 @@ If you have experience with a provider that is not listed here, please After you create an OAuth application, set environment variables to configure the Coder server to use it: -```env +```text CODER_EXTERNAL_AUTH_0_ID="" CODER_EXTERNAL_AUTH_0_TYPE= CODER_EXTERNAL_AUTH_0_CLIENT_ID= @@ -47,7 +47,7 @@ configure your callback URL as `https://example.com/external-auth/primary-github Add the following code to any template to add a button to the workspace setup page which will allow you to authenticate with your provider: -```tf +```hcl data "coder_external_auth" "" { id = "" } @@ -142,7 +142,7 @@ acting as an OAuth client to external identity providers. Coder will usually assume PKCE support is available with "S256" as the code challenge method. Manual configuration is available to override any default behavior. -```env +```text # Enable PKCE with S256 (recommended when supported) CODER_EXTERNAL_AUTH_0_PKCE_METHODS="S256" @@ -156,7 +156,7 @@ CODER_EXTERNAL_AUTH_0_PKCE_METHODS="none" Azure DevOps requires the following environment variables: -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops" CODER_EXTERNAL_AUTH_0_TYPE=azure-devops CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -170,7 +170,7 @@ CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://app.vssps.visualstudio.com/oauth2/token Azure DevOps (via Entra ID) requires the following environment variables: -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops" CODER_EXTERNAL_AUTH_0_TYPE=azure-devops-entra CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -185,7 +185,7 @@ CODER_EXTERNAL_AUTH_0_AUTH_URL="https://login.microsoftonline.com//oa Bitbucket Server requires the following environment variables: -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-bitbucket-server" CODER_EXTERNAL_AUTH_0_TYPE=bitbucket-server CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxx @@ -199,7 +199,7 @@ This callback path includes the value of `CODER_EXTERNAL_AUTH_0_ID`. ### Gitea -```env +```text CODER_EXTERNAL_AUTH_0_ID="gitea" CODER_EXTERNAL_AUTH_0_TYPE=gitea CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxxx @@ -219,7 +219,7 @@ or to integrate with an existing GitHub authentication. For a more complete, step-by-step guide, follow the [configure a GitHub OAuth app](#configure-a-github-oauth-app) section instead. -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-github" CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -236,7 +236,7 @@ as `https://example.com/external-auth/primary-github/callback`, where GitHub Enterprise requires the following environment variables: -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-github" CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -255,7 +255,7 @@ as `https://example.com/external-auth/primary-github/callback`, where GitLab self-managed requires the following environment variables: -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-gitlab" CODER_EXTERNAL_AUTH_0_TYPE=gitlab # This value is the "Application ID" @@ -281,7 +281,7 @@ Visit the [JFrog Artifactory](../../admin/integrations/jfrog-artifactory.md) gui Custom authentication and token URLs should be used for self-managed Git provider deployments. -```env +```text CODER_EXTERNAL_AUTH_0_AUTH_URL="https://github.example.com/oauth/authorize" CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/oauth/token" CODER_EXTERNAL_AUTH_0_REVOKE_URL="https://github.example.com/oauth/revoke" @@ -296,7 +296,7 @@ CODER_EXTERNAL_AUTH_0_REGEX=github\.company\.com Optionally, you can request custom scopes: -```env +```text CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key" ``` @@ -358,7 +358,7 @@ Below is an example configuration with multiple providers: > git config --global credential.useHttpPath true > ``` -```env +```text # Provider 1) github.com CODER_EXTERNAL_AUTH_0_ID=primary-github CODER_EXTERNAL_AUTH_0_TYPE=github diff --git a/docs/admin/infrastructure/validated-architectures/index.md b/docs/admin/infrastructure/validated-architectures/index.md index 9fa4968bf856f..5027d89f5408c 100644 --- a/docs/admin/infrastructure/validated-architectures/index.md +++ b/docs/admin/infrastructure/validated-architectures/index.md @@ -163,7 +163,7 @@ compute as users start/stop workspaces at the beginning and end of their day. Set nodeSelectors, affinities, and tolerations in Coder templates to assign workspaces to the given node group: -```tf +```hcl resource "kubernetes_deployment" "coder" { spec { template { diff --git a/docs/admin/integrations/devcontainers/integration.md b/docs/admin/integrations/devcontainers/integration.md index 1b37c1bc52c12..f5213a70e32cf 100644 --- a/docs/admin/integrations/devcontainers/integration.md +++ b/docs/admin/integrations/devcontainers/integration.md @@ -40,7 +40,7 @@ Use the [devcontainers-cli](https://registry.coder.com/modules/devcontainers-cli) module to ensure the `@devcontainers/cli` is installed in your workspace: -```terraform +```hcl module "devcontainers-cli" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/devcontainers-cli/coder" @@ -57,7 +57,7 @@ The resource automatically starts a Dev Container in your workspace, ensuring it's ready when you access the workspace: -```terraform +```hcl resource "coder_devcontainer" "my-repository" { count = data.coder_workspace.me.start_count agent_id = coder_agent.dev.id @@ -83,7 +83,7 @@ default behavior. If you need to explicitly disable Dev Containers, set the `CODER_AGENT_DEVCONTAINERS_ENABLE` environment variable to `false`: -```terraform +```hcl resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = "codercom/oss-dogfood:latest" @@ -153,7 +153,7 @@ and [`coder_env`](https://registry.terraform.io/providers/coder/coder/latest/doc resources to a `coder_devcontainer` by referencing its `subagent_id` attribute as the `agent_id`: -```terraform +```hcl resource "coder_devcontainer" "my-repository" { count = data.coder_workspace.me.start_count agent_id = coder_agent.dev.id @@ -227,7 +227,7 @@ For the full reference, see Here's a simplified template example that uses Dev Containers with manual configuration: -```terraform +```hcl terraform { required_providers { coder = { source = "coder/coder" } @@ -277,7 +277,7 @@ resource "coder_env" "env" { By default, discovered containers appear in the dashboard but developers must manually start them. To have them start automatically, enable autostart: -```terraform +```hcl resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = "codercom/oss-dogfood:latest" diff --git a/docs/admin/integrations/multiple-kube-clusters.md b/docs/admin/integrations/multiple-kube-clusters.md index 32d5ced73bbfc..d2b9a42ef4821 100644 --- a/docs/admin/integrations/multiple-kube-clusters.md +++ b/docs/admin/integrations/multiple-kube-clusters.md @@ -62,7 +62,7 @@ From there, add [template parameters](../templates/extending-templates/parameters.md) to allow developers to pick their desired cluster. -```tf +```hcl # main.tf data "coder_parameter" "kube_context" { @@ -159,7 +159,7 @@ rolebinding.rbac.authorization.k8s.io/coder-v2 created You can start from our [example template](../../../examples/templates/kubernetes). -```tf +```hcl variable "host" { description = "Cluster host address" sensitive = true diff --git a/docs/admin/integrations/oauth2-provider.md b/docs/admin/integrations/oauth2-provider.md index 910a6c31b45d5..8c1c2b06fc249 100644 --- a/docs/admin/integrations/oauth2-provider.md +++ b/docs/admin/integrations/oauth2-provider.md @@ -28,7 +28,7 @@ coder server --experiments oauth2 Or set the environment variable: -```env +```text CODER_EXPERIMENTS=oauth2 ``` diff --git a/docs/admin/integrations/vault.md b/docs/admin/integrations/vault.md index 012932a557b2f..452a89ecba619 100644 --- a/docs/admin/integrations/vault.md +++ b/docs/admin/integrations/vault.md @@ -23,7 +23,7 @@ GitHub [external authentication](../external-auth/index.md) to get the token and To use this module, add the following code to your Terraform configuration. -```tf +```hcl module "vault" { source = "registry.coder.com/modules/vault-github/coder" version = "1.0.7" diff --git a/docs/admin/networking/index.md b/docs/admin/networking/index.md index 4403617234b8d..2801b9f8c8c1a 100644 --- a/docs/admin/networking/index.md +++ b/docs/admin/networking/index.md @@ -80,7 +80,7 @@ Template admins can overwrite the site-wide access URL at the template level by leveraging the `url` argument when [defining the Coder provider](https://registry.terraform.io/providers/coder/coder/latest/docs#url-1): -```terraform +```hcl provider "coder" { url = "https://coder.namespace.svc.cluster.local" } diff --git a/docs/admin/networking/port-forwarding.md b/docs/admin/networking/port-forwarding.md index f5678403adb94..9ae2034bc4839 100644 --- a/docs/admin/networking/port-forwarding.md +++ b/docs/admin/networking/port-forwarding.md @@ -85,7 +85,7 @@ workspace's template. This approach shows a visual application icon in the dashboard. See the following `coder_app` example for a Node React app and note the `subdomain` and `share` settings: -```tf +```hcl # node app resource "coder_app" "node-react-app" { agent_id = coder_agent.dev.id diff --git a/docs/admin/networking/workspace-proxies.md b/docs/admin/networking/workspace-proxies.md index d6b6aa1ed13fb..834ad052465c9 100644 --- a/docs/admin/networking/workspace-proxies.md +++ b/docs/admin/networking/workspace-proxies.md @@ -194,7 +194,7 @@ docker run --rm -it --entrypoint /opt/coder ghcr.io/coder/coder:latest wsproxy s #### Custom Dockerfile -```Dockerfile +```dockerfile FROM ghcr.io/coder/coder:latest ENTRYPOINT ["/opt/coder", "wsproxy", "server"] ``` diff --git a/docs/admin/security/secrets.md b/docs/admin/security/secrets.md index b7d9285fff92d..3d1a5e1a81013 100644 --- a/docs/admin/security/secrets.md +++ b/docs/admin/security/secrets.md @@ -65,7 +65,7 @@ which excludes obscure API providers. Dynamic secrets can be implemented in your template code like so: -```tf +```hcl resource "twilio_iam_api_key" "api_key" { account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" friendly_name = "Test API Key" @@ -96,7 +96,7 @@ can also show them in the Workspace UI with Can be produced with -```tf +```hcl resource "twilio_iam_api_key" "api_key" { account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" friendly_name = "Test API Key" diff --git a/docs/admin/setup/appearance.md b/docs/admin/setup/appearance.md index 66dbc2587e78e..e595d25af9b4b 100644 --- a/docs/admin/setup/appearance.md +++ b/docs/admin/setup/appearance.md @@ -98,7 +98,7 @@ coder: if running as a system service, set an environment variable `CODER_SUPPORT_LINKS` in `/etc/coder.d/coder.env` as follows, -```env +```text CODER_SUPPORT_LINKS='[{"name": "Hello GitHub", "target": "https://github.com/coder/coder", "icon": "bug"}, {"name": "Hello Slack", "target": "https://codercom.slack.com/archives/C014JH42DBJ", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/slack.svg"}, {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/discord.svg", "location": "navbar"}, {"name": "Hello Foobar", "target": "https://discord.gg/coder", "icon": "/emojis/1f3e1.png"}]' ``` diff --git a/docs/admin/templates/extending-templates/agent-metadata.md b/docs/admin/templates/extending-templates/agent-metadata.md index 92d43702ca0bf..238d23396847e 100644 --- a/docs/admin/templates/extending-templates/agent-metadata.md +++ b/docs/admin/templates/extending-templates/agent-metadata.md @@ -22,7 +22,7 @@ usage about the workspace's host. Here's a standard set of metadata snippets for Linux agents: -```tf +```hcl resource "coder_agent" "main" { os = "linux" ... diff --git a/docs/admin/templates/extending-templates/docker-in-workspaces.md b/docs/admin/templates/extending-templates/docker-in-workspaces.md index 3cfb0432e02df..b22088b24916f 100644 --- a/docs/admin/templates/extending-templates/docker-in-workspaces.md +++ b/docs/admin/templates/extending-templates/docker-in-workspaces.md @@ -23,7 +23,7 @@ inside Coder workspaces. See [Systemd in Docker](#systemd-in-docker). After [installing Sysbox](https://github.com/nestybox/sysbox#installation) on the Coder host, modify your template to use the sysbox-runc runtime: -```tf +```hcl resource "docker_container" "workspace" { # ... name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}" @@ -52,7 +52,7 @@ After modify your template to use the sysbox-runc RuntimeClass. This requires the Kubernetes Terraform provider version 2.16.0 or greater. -```tf +```hcl terraform { required_providers { coder = { @@ -169,7 +169,7 @@ $ kubectl create secret docker-registry \ --docker-email= ``` -```tf +```hcl env { name = "CODER_IMAGE_PULL_SECRET" value_from { @@ -265,7 +265,7 @@ Before using Podman, please review the following documentation: Rootless containers rely on Linux user-namespaces. [Bottlerocket](https://github.com/bottlerocket-os/bottlerocket) disables them by default (`user.max_user_namespaces = 0`), so Podman commands will return an error until you raise the limit: -```output +```text cannot clone: Invalid argument user namespaces are not enabled in /proc/sys/user/max_user_namespaces ``` @@ -311,7 +311,7 @@ your nodes cannot run Sysbox. ### Use a privileged sidecar container in Docker-based templates -```tf +```hcl resource "coder_agent" "main" { os = "linux" arch = "amd64" @@ -348,7 +348,7 @@ resource "docker_container" "workspace" { ### Use a privileged sidecar container in Kubernetes-based templates -```tf +```hcl terraform { required_providers { coder = { @@ -420,7 +420,7 @@ After modify your template to use the sysbox-runc RuntimeClass. This requires the Kubernetes Terraform provider version 2.16.0 or greater. -```tf +```hcl terraform { required_providers { coder = { diff --git a/docs/admin/templates/extending-templates/dynamic-parameters.md b/docs/admin/templates/extending-templates/dynamic-parameters.md index b0f0229ca23fa..07cfd34100c35 100644 --- a/docs/admin/templates/extending-templates/dynamic-parameters.md +++ b/docs/admin/templates/extending-templates/dynamic-parameters.md @@ -148,7 +148,7 @@ Users can avoid restrictions like `disabled` if they create a workspace via the This attribute accepts JSON like so: -```terraform +```hcl data "coder_parameter" "styled_parameter" { ... styling = jsonencode({ @@ -182,7 +182,7 @@ Single-select parameters with options can use the `form_type="dropdown"` attribu [Try dropdown lists on the Parameter Playground](https://playground.coder.app/parameters/kgNBpjnz7x) -```terraform +```hcl locals { ides = [ "VS Code", @@ -219,7 +219,7 @@ The large text entry option can be used to enter long strings like AI prompts, s [Try textarea parameters on the Parameter Playground](https://playground.coder.app/parameters/RCAHA1Oi1_) -```terraform +```hcl data "coder_parameter" "text_area" { name = "text_area" @@ -249,7 +249,7 @@ For example, adding multiple IDEs with a single parameter. [Try multi-select parameters on the Parameter Playground](https://playground.coder.app/parameters/XogX54JV_f) -```terraform +```hcl locals { ides = [ "VS Code", "JetBrains IntelliJ", @@ -289,7 +289,7 @@ This is the original styling for list parameters. [Try radio parameters on the Parameter Playground](https://playground.coder.app/parameters/3OMDp5ANZI). -```terraform +```hcl data "coder_parameter" "environment" { name = "environment" display_name = "Environment" @@ -325,7 +325,7 @@ This can be used for a TOS confirmation or to expose advanced options. [Try checkbox parameters on the Parameters Playground](https://playground.coder.app/parameters/ycWuQJk2Py). -```terraform +```hcl data "coder_parameter" "enable_gpu" { name = "enable_gpu" display_name = "Enable GPU" @@ -342,7 +342,7 @@ The `validation` block is used to constrain (or clamp) the minimum and maximum v [Try slider parameters on the Parameters Playground](https://playground.coder.app/parameters/RsBNcWVvfm). -```terraform +```hcl data "coder_parameter" "cpu_cores" { name = "cpu_cores" display_name = "CPU Cores" @@ -366,7 +366,7 @@ Note that this does not secure information on the backend and is purely cosmetic Note: This text may not be properly hidden in the Playground. The `mask_input` styling attribute is supported in v2.24.0 and later. -```terraform +```hcl data "coder_parameter" "private_api_key" { name = "private_api_key" display_name = "Your super secret API key" @@ -405,7 +405,7 @@ Use Terraform conditionals and the `count` block to allow a checkbox to expose o [Try conditional parameters on the Parameter Playground](https://playground.coder.app/parameters/xmG5MKEGNM). -```terraform +```hcl data "coder_parameter" "show_cpu_cores" { name = "show_cpu_cores" display_name = "Toggles next parameter" @@ -440,7 +440,7 @@ This allows you to suggest an option dynamically without strict enforcement. [Try dynamic defaults in the Parameter Playground](https://playground.coder.app/parameters/DEi-Bi6DVe). -```terraform +```hcl locals { ides = [ "VS Code", @@ -505,7 +505,7 @@ A parameter's validation block can leverage inputs from other parameters. [Try dynamic validation in the Parameter Playground](https://playground.coder.app/parameters/sdbzXxagJ4). -```terraform +```hcl data "coder_parameter" "git_repo" { name = "git_repo" display_name = "Git repo" @@ -557,7 +557,7 @@ Note that parameters must be indexed when using the `count` attribute. [Try daisy-chaining parameters in the Parameter Playground](https://playground.coder.app/parameters/jLUUhoDLIa). -```terraform +```hcl locals { ides = [ @@ -659,7 +659,7 @@ data source. [Try out admin-only options in the Playground](https://playground.coder.app/parameters/5Gn9W3hYs7). -```terraform +```hcl locals { roles = [for r in data.coder_workspace_owner.me.rbac_roles: r.name] @@ -701,7 +701,7 @@ This way developers can't accidentally induce low-latency with world-spanning co [Try user-aware regions in the parameter playground](https://playground.coder.app/parameters/tBD-mbZRGm) -```terraform +```hcl locals { eu_regions = [ @@ -752,7 +752,7 @@ Some users associate groups with namespaces, such as Kubernetes, then allow user [Try groups as options in the Parameter Playground](https://playground.coder.app/parameters/lKbU53nYjl). -```terraform +```hcl locals { groups = data.coder_workspace_owner.me.groups } diff --git a/docs/admin/templates/extending-templates/environment-variables.md b/docs/admin/templates/extending-templates/environment-variables.md index 27082154f1382..a79739511d1da 100644 --- a/docs/admin/templates/extending-templates/environment-variables.md +++ b/docs/admin/templates/extending-templates/environment-variables.md @@ -8,7 +8,7 @@ development environments. ## Basic usage -```tf +```hcl resource "coder_agent" "dev" { os = "linux" arch = "amd64" @@ -43,7 +43,7 @@ the convention for `PATH`-style variables on Unix systems. Multiple `coder_env` resources can each add directories to `PATH`: -```tf +```hcl resource "coder_env" "path_tools" { agent_id = coder_agent.dev.id name = "PATH" @@ -66,7 +66,7 @@ This produces `PATH` with the value Use `error` to catch accidental duplicate definitions: -```tf +```hcl resource "coder_env" "editor" { agent_id = coder_agent.dev.id name = "EDITOR" @@ -96,7 +96,7 @@ after `coder_env` resources are merged, so `merge_strategy = "error"` does not trigger when the conflict is with the agent's `env` block — only when two `coder_env` resources define the same key: -```tf +```hcl resource "coder_agent" "dev" { os = "linux" arch = "amd64" diff --git a/docs/admin/templates/extending-templates/external-auth.md b/docs/admin/templates/extending-templates/external-auth.md index 62e05af10d191..209bb8596c2f1 100644 --- a/docs/admin/templates/extending-templates/external-auth.md +++ b/docs/admin/templates/extending-templates/external-auth.md @@ -67,7 +67,7 @@ If the token is required to be inserted into the workspace, for example template. This token will not auto-refresh. The following example will authenticate via GitHub and auto-clone a repo into the `~/coder` directory. -```tf +```hcl data "coder_external_auth" "github" { # Matches the ID of the external auth provider in Coder. id = "github" diff --git a/docs/admin/templates/extending-templates/index.md b/docs/admin/templates/extending-templates/index.md index d7864e7d30b31..28488b27d1842 100644 --- a/docs/admin/templates/extending-templates/index.md +++ b/docs/admin/templates/extending-templates/index.md @@ -18,7 +18,7 @@ The associated agent will facilitate port forwarding, and IDEs. The agent may also display real-time [workspace metadata](./agent-metadata.md) like resource usage. -```tf +```hcl resource "coder_agent" "dev" { os = "linux" arch = "amd64" @@ -168,7 +168,7 @@ on a scheduled basis. It provides more control than the deprecated ### Basic example -```tf +```hcl resource "coder_script" "install_dependencies" { agent_id = coder_agent.main.id display_name = "Install Dependencies" @@ -209,7 +209,7 @@ internally. For example: You can also reference external script files: -```tf +```hcl resource "coder_script" "init_docker" { agent_id = coder_agent.main.id display_name = "Initialize Docker" diff --git a/docs/admin/templates/extending-templates/jetbrains-preinstall.md b/docs/admin/templates/extending-templates/jetbrains-preinstall.md index 0bb11ef9e6a1b..8043726cf1e64 100644 --- a/docs/admin/templates/extending-templates/jetbrains-preinstall.md +++ b/docs/admin/templates/extending-templates/jetbrains-preinstall.md @@ -43,7 +43,7 @@ Add the following command to your template's `startup_script`: If you are using our [jetbrains-gateway](https://registry.coder.com/modules/coder/jetbrains-gateway) module, you can configure it by adding the following snippet to your template: -```tf +```hcl module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" diff --git a/docs/admin/templates/extending-templates/modules.md b/docs/admin/templates/extending-templates/modules.md index cc2bdca55a901..b377a9cd321cb 100644 --- a/docs/admin/templates/extending-templates/modules.md +++ b/docs/admin/templates/extending-templates/modules.md @@ -8,7 +8,7 @@ You can store these modules externally from your Coder deployment, like in a git repository or a Terraform registry. This example shows how to reference a module from your template: -```tf +```hcl data "coder_workspace" "me" {} module "coder-base" { diff --git a/docs/admin/templates/extending-templates/parameters.md b/docs/admin/templates/extending-templates/parameters.md index 3eb7957a73160..e9dbdf74fd79a 100644 --- a/docs/admin/templates/extending-templates/parameters.md +++ b/docs/admin/templates/extending-templates/parameters.md @@ -14,7 +14,7 @@ parameters like instance size, geographical location, repository URL, etc. This example lets a developer choose a Docker host for the workspace: -```tf +```hcl data "coder_parameter" "docker_host" { name = "Region" description = "Which region would you like to deploy to?" @@ -44,7 +44,7 @@ data "coder_parameter" "docker_host" { From there, a template can refer to a parameter's value: -```tf +```hcl provider "docker" { host = data.coder_parameter.docker_host.value } @@ -64,7 +64,7 @@ JSON array and the Terraform [jsonencode](https://developer.hashicorp.com/terraform/language/functions/jsonencode) function. For example: -```tf +```hcl data "coder_parameter" "security_groups" { name = "Security groups" icon = "/icon/aws.png" @@ -109,7 +109,7 @@ data "coder_parameter" "security_groups" { A `string` parameter can provide a set of options to limit the user's choices: -```tf +```hcl data "coder_parameter" "docker_host" { name = "Region" description = "Which region would you like to deploy to?" @@ -171,7 +171,7 @@ Example: A parameter is _required_ if it doesn't have the `default` property. The user **must** provide a value to this parameter before creating a workspace: -```tf +```hcl data "coder_parameter" "account_name" { name = "Account name" description = "Cloud account name" @@ -182,7 +182,7 @@ data "coder_parameter" "account_name" { If a parameter contains the `default` property, Coder will use this value if the user does not specify any: -```tf +```hcl data "coder_parameter" "base_image" { name = "Base image" description = "Base machine image to download" @@ -193,7 +193,7 @@ data "coder_parameter" "base_image" { Admins can also set the `default` property to an empty value so that the parameter field can remain empty: -```tf +```hcl data "coder_parameter" "dotfiles_url" { name = "dotfiles URL" description = "Git repository with dotfiles" @@ -215,7 +215,7 @@ resources like volumes, regions, and so on. Example: -```tf +```hcl data "coder_parameter" "region" { name = "Region" description = "Region where the workspace is hosted" @@ -238,7 +238,7 @@ but do not persist after the workspace is stopped. Since these parameters are ephemeral in nature, subsequent builds proceed in the standard manner: -```tf +```hcl data "coder_parameter" "force_rebuild" { name = "force_rebuild" type = "bool" @@ -262,7 +262,7 @@ You can also specify its monotonicity as `increasing` or `decreasing` to verify the current and new values. Use the `monotonic` attribute for resources that can't be shrunk or grown without implications, like disk volume size. -```tf +```hcl data "coder_parameter" "instances" { name = "Instances" type = "number" @@ -279,7 +279,7 @@ It is possible to override the default `error` message for a `number` parameter, along with its associated `min` and/or `max` properties. The following message placeholders are available `{min}`, `{max}`, and `{value}`. -```tf +```hcl data "coder_parameter" "instances" { name = "Instances" type = "number" @@ -303,7 +303,7 @@ data "coder_parameter" "instances" { You can validate a `string` parameter to match a regular expression. The `regex` property requires a corresponding `error` property. -```tf +```hcl data "coder_parameter" "project_id" { name = "Project ID" description = "Alpha-numeric project ID" @@ -344,7 +344,7 @@ For a complete list of all available fields, see the
Expand for an example -```tf +```hcl data "coder_workspace_preset" "goland-gpu" { name = "GoLand with GPU" description = "Development workspace with GPU acceleration for GoLand IDE" diff --git a/docs/admin/templates/extending-templates/prebuilt-workspaces.md b/docs/admin/templates/extending-templates/prebuilt-workspaces.md index 669ce02307be4..9be4e5fbe9c8a 100644 --- a/docs/admin/templates/extending-templates/prebuilt-workspaces.md +++ b/docs/admin/templates/extending-templates/prebuilt-workspaces.md @@ -123,7 +123,7 @@ This allows you to reduce resource costs during off-hours while maintaining avai Configure scheduling by adding a `scheduling` block within your `prebuilds` configuration: -```tf +```hcl data "coder_workspace_preset" "goland" { name = "GoLand: Large" parameters { @@ -187,7 +187,7 @@ Cron expressions follow the format: `* HOUR DOM MONTH DAY-OF-WEEK` **Example schedules:** -```tf +```hcl # Business hours only (8AM-6:59PM, Mon-Fri) schedule { cron = "* 8-18 * * 1-5" diff --git a/docs/admin/templates/extending-templates/resource-metadata.md b/docs/admin/templates/extending-templates/resource-metadata.md index 21f29c10594d4..c98a8e6ed2e95 100644 --- a/docs/admin/templates/extending-templates/resource-metadata.md +++ b/docs/admin/templates/extending-templates/resource-metadata.md @@ -24,7 +24,7 @@ You can also present automatically updating, dynamic values with Expose the disk size, deployment name, and persistent directory in a Kubernetes template with: -```tf +```hcl resource "kubernetes_persistent_volume_claim" "root" { ... } @@ -63,7 +63,7 @@ Some resources don't need to be exposed in the dashboard's UI. This helps keep the workspace view clean for developers. To hide a resource, use the `hide` attribute: -```tf +```hcl resource "coder_metadata" "hide_serviceaccount" { count = data.coder_workspace.me.start_count resource_id = kubernetes_service_account.user_data.id @@ -80,7 +80,7 @@ resource "coder_metadata" "hide_serviceaccount" { To use custom icons for your resource metadata, use the `icon` attribute. It must be a valid path or URL. -```tf +```hcl resource "coder_metadata" "resource_with_icon" { count = data.coder_workspace.me.start_count resource_id = kubernetes_service_account.user_data.id diff --git a/docs/admin/templates/extending-templates/resource-ordering.md b/docs/admin/templates/extending-templates/resource-ordering.md index c26c88f4d5a10..00bf778b8b232 100644 --- a/docs/admin/templates/extending-templates/resource-ordering.md +++ b/docs/admin/templates/extending-templates/resource-ordering.md @@ -16,7 +16,7 @@ The `order` property of `coder_parameter` resource allows specifying the order of parameters in UI forms. In the below example, `project_id` will appear _before_ `account_id`: -```tf +```hcl data "coder_parameter" "project_id" { name = "project_id" display_name = "Project ID" @@ -37,7 +37,7 @@ data "coder_parameter" "account_id" { Agent resources within the UI left pane are sorted based on the `order` property, followed by `name`, ensuring a consistent and intuitive arrangement. -```tf +```hcl resource "coder_agent" "primary" { ... @@ -59,7 +59,7 @@ The `coder_agent` exposes metadata to present operational metrics in the UI. Metrics defined with Terraform `metadata` blocks can be ordered using additional `order` property; otherwise, they are sorted by `key`. -```tf +```hcl resource "coder_agent" "main" { ... @@ -107,7 +107,7 @@ workspace view. Only template defined applications can be arranged. _VS Code_ or _Terminal_ buttons are static. -```tf +```hcl resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -135,7 +135,7 @@ The options for Coder parameters maintain the same order as in the file structure. This simplifies management and ensures consistency between configuration files and UI presentation. -```tf +```hcl data "coder_parameter" "database_region" { name = "database_region" display_name = "Database Region" @@ -166,7 +166,7 @@ In cases where multiple item properties exist, the order is inherited from the file, facilitating seamless integration between a Coder template and UI presentation. -```tf +```hcl resource "coder_metadata" "attached_volumes" { resource_id = docker_image.main.id diff --git a/docs/admin/templates/extending-templates/resource-persistence.md b/docs/admin/templates/extending-templates/resource-persistence.md index a0ccbeea6069f..03beef3c00e4a 100644 --- a/docs/admin/templates/extending-templates/resource-persistence.md +++ b/docs/admin/templates/extending-templates/resource-persistence.md @@ -24,7 +24,7 @@ meta-argument. In this example, Coder will provision or tear down the `docker_container` resource: -```tf +```hcl data "coder_workspace" "me" { } @@ -39,7 +39,7 @@ resource "docker_container" "workspace" { Take this example resource: -```tf +```hcl data "coder_workspace" "me" { } @@ -59,7 +59,7 @@ To prevent this, use immutable IDs: You should also avoid using `coder_workspace.me.name` if your deployment allows workspace renaming via `CODER_ALLOW_WORKSPACE_RENAMES` or `--allow-workspace-renames`. -```tf +```hcl data "coder_workspace" "me" { } @@ -80,7 +80,7 @@ You can prevent Terraform from recreating a resource under any circumstance by setting the [`ignore_changes = all` directive in the `lifecycle` block](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes). -```tf +```hcl data "coder_workspace" "me" { } diff --git a/docs/admin/templates/extending-templates/variables.md b/docs/admin/templates/extending-templates/variables.md index 3c1d02f0baf63..f20693197fdab 100644 --- a/docs/admin/templates/extending-templates/variables.md +++ b/docs/admin/templates/extending-templates/variables.md @@ -6,7 +6,7 @@ construction of customizable templates. Unlike parameters, which are primarily for workspace customization, template variables remain under the control of the template author, ensuring workspace users cannot modify them. -```tf +```hcl variable "CLOUD_API_KEY" { type = string description = "API key for the service" diff --git a/docs/admin/templates/extending-templates/web-ides.md b/docs/admin/templates/extending-templates/web-ides.md index e5ae8a810dd55..58acbbb1d7cf9 100644 --- a/docs/admin/templates/extending-templates/web-ides.md +++ b/docs/admin/templates/extending-templates/web-ides.md @@ -5,7 +5,7 @@ In Coder, web IDEs are defined as resources in the template. With our generic model, any web application can be used as a Coder application. For example: -```tf +```hcl # Add button to open Portainer in the workspace dashboard # Note: Portainer must be already running in the workspace resource "coder_app" "portainer" { @@ -35,7 +35,7 @@ cd your-template/ vim main.tf ``` -```tf +```hcl resource "coder_agent" "main" { arch = "amd64" os = "linux" @@ -57,7 +57,7 @@ For advanced use, we recommend installing code-server in your VM snapshot or container image. Here's a Dockerfile which leverages some special [code-server features](https://coder.com/docs/code-server): -```Dockerfile +```dockerfile FROM codercom/enterprise-base:ubuntu # install the latest version @@ -75,7 +75,7 @@ RUN code-server --install-extension eamodio.gitlens You'll also need to specify a `coder_app` resource related to the agent. This is how code-server is displayed on the workspace page. -```tf +```hcl resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -156,7 +156,7 @@ To use Jupyter Notebook in your workspace, you can install it by using the [Jupyter Notebook module](https://registry.coder.com/modules/jupyter-notebook) from the Coder registry: -```tf +```hcl module "jupyter-notebook" { source = "registry.coder.com/modules/jupyter-notebook/coder" version = "1.0.19" @@ -171,7 +171,7 @@ module "jupyter-notebook" { Configure your agent and `coder_app` like so to use Jupyter. Notice the `subdomain=true` configuration: -```tf +```hcl data "coder_workspace" "me" {} resource "coder_agent" "coder" { @@ -203,7 +203,7 @@ resource "coder_app" "jupyter" { Or Alternatively, you can use the JupyterLab module from the Coder registry: -```tf +```hcl module "jupyter" { source = "registry.coder.com/modules/jupyter-lab/coder" version = "1.0.0" @@ -225,7 +225,7 @@ value substitution to recreate the path structure. Configure your agent and `coder_app` like so to use RStudio. Notice the `subdomain=true` configuration: -```tf +```hcl resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -272,7 +272,7 @@ community template example. Configure your agent and `coder_app` like so to use Airflow. Notice the `subdomain=true` configuration: -```tf +```hcl resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -305,7 +305,7 @@ resource "coder_app" "airflow" { or use the [Airflow module](https://registry.coder.com/modules/apache-airflow) from the Coder registry: -```tf +```hcl module "airflow" { source = "registry.coder.com/modules/airflow/coder" version = "1.0.13" @@ -323,7 +323,7 @@ manipulate files in a web browser. Show and manipulate the contents of the `/home/coder` directory in a browser. -```tf +```hcl resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -358,7 +358,7 @@ Or alternatively, you can use the [`filebrowser`](https://registry.coder.com/modules/filebrowser) module from the Coder registry: -```tf +```hcl module "filebrowser" { source = "registry.coder.com/modules/filebrowser/coder" version = "1.0.8" diff --git a/docs/admin/templates/extending-templates/workspace-tags.md b/docs/admin/templates/extending-templates/workspace-tags.md index f2c5ac874cbe1..80fdae13da628 100644 --- a/docs/admin/templates/extending-templates/workspace-tags.md +++ b/docs/admin/templates/extending-templates/workspace-tags.md @@ -14,7 +14,7 @@ can enable dynamic tag selection and modify static template tags. Here is a sample `coder_workspace_tags` data resource with a few workspace tags specified: -```tf +```hcl data "coder_workspace_tags" "custom_workspace_tags" { tags = { "az" = var.az diff --git a/docs/admin/templates/managing-templates/change-management.md b/docs/admin/templates/managing-templates/change-management.md index d7aec85ed0515..6b00b49cd4506 100644 --- a/docs/admin/templates/managing-templates/change-management.md +++ b/docs/admin/templates/managing-templates/change-management.md @@ -16,7 +16,7 @@ pipelines. To run the provider in a CI/CD pipeline, and to prevent drift, you'll need to store the Terraform state [remotely](https://developer.hashicorp.com/terraform/language/backend). -```tf +```hcl terraform { required_providers { coderd = { diff --git a/docs/admin/templates/managing-templates/dependencies.md b/docs/admin/templates/managing-templates/dependencies.md index 80d80da679364..7be5b19a3297c 100644 --- a/docs/admin/templates/managing-templates/dependencies.md +++ b/docs/admin/templates/managing-templates/dependencies.md @@ -26,7 +26,7 @@ If you add a Terraform provider to `required_providers` without specifying a version requirement, Terraform will always fetch the latest version on each invocation: -```terraform +```hcl terraform { required_providers { coder = { @@ -47,7 +47,7 @@ To prevent this, add a [version constraint](https://developer.hashicorp.com/terraform/language/expressions/version-constraints) to each provider in the `required_providers` block: -```terraform +```hcl terraform { required_providers { coder = { @@ -69,7 +69,7 @@ provider will be limited to all versions matching `1.0.x`. The above also applies to Terraform modules. In the below example, the module `razzledazzle` is locked to version `1.2.3`. -```terraform +```hcl module "razzledazzle" { source = "registry.example.com/modules/razzle/dazzle" version = "1.2.3" diff --git a/docs/admin/templates/startup-coordination/example.md b/docs/admin/templates/startup-coordination/example.md index c9af9974278d7..c56aae66c409e 100644 --- a/docs/admin/templates/startup-coordination/example.md +++ b/docs/admin/templates/startup-coordination/example.md @@ -81,7 +81,7 @@ We've omitted some details (such as persistent storage) for brevity, but these a ### Before -```terraform +```hcl data "coder_provisioner" "me" {} data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} @@ -139,7 +139,7 @@ Based on the above, we can improve both the startup time and reliability of the Here is the updated version of the template: -```terraform +```hcl data "coder_provisioner" "me" {} data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} diff --git a/docs/admin/users/idp-sync.md b/docs/admin/users/idp-sync.md index 3c7ec708be3f9..87c93b37564ee 100644 --- a/docs/admin/users/idp-sync.md +++ b/docs/admin/users/idp-sync.md @@ -454,7 +454,7 @@ If you enable this, your OIDC provider might be sending over many unnecessary groups. Use filtering options on the OIDC provider to limit the groups sent over to prevent creating excess groups. -```env +```text # as an environment variable CODER_OIDC_GROUP_AUTO_CREATE=true ``` @@ -471,7 +471,7 @@ want to filter out groups that do not match a certain pattern. For example, if you want to only allow groups that start with `my-group-` to be created, you can set the following environment variable. -```env +```text # as an environment variable CODER_OIDC_GROUP_REGEX_FILTER="^my-group-.*$" ``` diff --git a/docs/admin/users/oidc-auth/google.md b/docs/admin/users/oidc-auth/google.md index 298497b27bebc..e1e99e321981f 100644 --- a/docs/admin/users/oidc-auth/google.md +++ b/docs/admin/users/oidc-auth/google.md @@ -19,7 +19,7 @@ This guide shows how to configure Coder to authenticate users with Google using Set the following environment variables on your Coder deployment and restart Coder: -```env +```text CODER_OIDC_ISSUER_URL=https://accounts.google.com CODER_OIDC_CLIENT_ID= CODER_OIDC_CLIENT_SECRET= @@ -39,7 +39,7 @@ CODER_OIDC_ICON_URL=/icon/google.svg Google uses auth URL parameters to issue refresh tokens. Configure: -```env +```text # Keep standard scopes CODER_OIDC_SCOPES=openid,profile,email # Add Google-specific auth URL params diff --git a/docs/admin/users/oidc-auth/index.md b/docs/admin/users/oidc-auth/index.md index 56adb915c6621..6180b9f95af4b 100644 --- a/docs/admin/users/oidc-auth/index.md +++ b/docs/admin/users/oidc-auth/index.md @@ -13,7 +13,7 @@ Your OIDC provider will ask you for the following parameter: Set the following environment variables on your Coder deployment and restart Coder: -```env +```text CODER_OIDC_ISSUER_URL="https://issuer.corp.com" CODER_OIDC_EMAIL_DOMAIN="your-domain-1,your-domain-2" CODER_OIDC_CLIENT_ID="533...des" @@ -57,7 +57,7 @@ Coder requires all OIDC email addresses to be verified by default. If the provider, Coder will validate that its value is `true`. If needed, you can disable this behavior with the following setting: -```env +```text CODER_OIDC_IGNORE_EMAIL_VERIFIED=true ``` @@ -84,7 +84,7 @@ If your upstream identity provider uses a different claim, you can set If you'd like to change the OpenID Connect button text and/or icon, you can configure them like so: -```env +```text CODER_OIDC_SIGN_IN_TEXT="Sign in with Gitea" CODER_OIDC_ICON_URL=https://gitea.io/images/gitea.png ``` @@ -130,7 +130,7 @@ The general steps to configure persistent user sessions are: To remove email and password login, set the following environment variable on your Coder deployment: -```env +```text CODER_DISABLE_PASSWORD_AUTH=true ``` @@ -157,7 +157,7 @@ authentication. Upon deactivation, users are [Configure](../../setup/index.md) your SCIM application with an auth key and supply it the Coder server. -```env +```text CODER_SCIM_AUTH_HEADER="your-api-key" ``` @@ -166,7 +166,7 @@ CODER_SCIM_AUTH_HEADER="your-api-key" If your OpenID Connect provider requires client TLS certificates for authentication, you can configure them like so: -```env +```text CODER_TLS_CLIENT_CERT_FILE=/path/to/cert.pem CODER_TLS_CLIENT_KEY_FILE=/path/to/key.pem ``` diff --git a/docs/admin/users/oidc-auth/microsoft.md b/docs/admin/users/oidc-auth/microsoft.md index db9958f1bd0b7..f91ddd784c37d 100644 --- a/docs/admin/users/oidc-auth/microsoft.md +++ b/docs/admin/users/oidc-auth/microsoft.md @@ -24,7 +24,7 @@ This guide shows how to configure Coder to authenticate users with Microsoft Ent Set the following environment variables on your Coder deployment and restart Coder: -```env +```text CODER_OIDC_ISSUER_URL=https://login.microsoftonline.com/{tenant-id}/v2.0 # Replace {tenant-id} with your Azure tenant ID CODER_OIDC_CLIENT_ID= CODER_OIDC_CLIENT_SECRET= @@ -42,7 +42,7 @@ CODER_OIDC_ICON_URL=/icon/microsoft.svg ## Enable refresh tokens (recommended) -```env +```text # Keep standard scopes CODER_OIDC_SCOPES=openid,profile,email,offline_access ``` diff --git a/docs/admin/users/oidc-auth/refresh-tokens.md b/docs/admin/users/oidc-auth/refresh-tokens.md index 53a114788240e..a64e4c464409d 100644 --- a/docs/admin/users/oidc-auth/refresh-tokens.md +++ b/docs/admin/users/oidc-auth/refresh-tokens.md @@ -60,7 +60,7 @@ Without this, users will be logged out when their access token expires. In your [Coder configuration](../../../reference/cli/server.md#--oidc-auth-url-params): -```env +```text CODER_OIDC_SCOPES=openid,profile,email CODER_OIDC_AUTH_URL_PARAMS='{"access_type": "offline", "prompt": "consent"}' ``` @@ -76,7 +76,7 @@ including the ability to refresh access tokens without requiring the user to rea Add the `offline_access` scope to enable refresh tokens in your [Coder configuration](../../../reference/cli/server.md#--oidc-auth-url-params): -```env +```text CODER_OIDC_SCOPES=openid,profile,email,offline_access CODER_OIDC_AUTH_URL_PARAMS='{"access_type":"offline"}' ``` diff --git a/docs/ai-coder/agent-firewall/index.md b/docs/ai-coder/agent-firewall/index.md index ca410dceaada3..63396f2c16bf9 100644 --- a/docs/ai-coder/agent-firewall/index.md +++ b/docs/ai-coder/agent-firewall/index.md @@ -45,7 +45,7 @@ maintain allow lists and share detailed policies with teammates. In your Terraform module, install Agent Firewall with minimal configuration: -```tf +```hcl module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" @@ -55,7 +55,7 @@ module "agent-firewall" { To use a custom policy, pass it inline via `agent_firewall_config`, below is an example of minimal configuration for Claude Code module: -```tf +```hcl module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" @@ -93,7 +93,7 @@ launches Agent Firewall manually inside the workspace picks up the same configuration without extra flags. This is especially convenient for managing extensive allow lists in version control. -```tf +```hcl module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" diff --git a/docs/ai-coder/agent-firewall/version.md b/docs/ai-coder/agent-firewall/version.md index 28de4d238c7ab..2ea492eb616a1 100644 --- a/docs/ai-coder/agent-firewall/version.md +++ b/docs/ai-coder/agent-firewall/version.md @@ -36,7 +36,7 @@ this case, you need to: Example configuration: -```tf +```hcl module "claude-code" { source = "dev.registry.coder.com/coder/claude-code/coder" version = "4.7.0" @@ -52,7 +52,7 @@ If you're using Claude Code module before v4.7.0, the module expects to use Agent Firewall directly. You need to explicitly set `boundary_version` in your Terraform configuration: -```tf +```hcl module "claude-code" { source = "dev.registry.coder.com/coder/claude-code/coder" version = "4.6.0" diff --git a/docs/ai-coder/agents/platform-controls/git-providers.md b/docs/ai-coder/agents/platform-controls/git-providers.md index 8b6e03a14d01f..8d4b6a2eeb260 100644 --- a/docs/ai-coder/agents/platform-controls/git-providers.md +++ b/docs/ai-coder/agents/platform-controls/git-providers.md @@ -13,7 +13,7 @@ For public `github.com`, no additional configuration is needed. For self-hosted GitHub Enterprise, add `API_BASE_URL` to your [existing configuration](../../../admin/external-auth/index.md#github-enterprise): -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-github" CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -45,7 +45,7 @@ The default GitLab scopes (`read_user`) are sufficient for basic authentication. To use merge request features (diffs, status checks) with Coder Agents, configure: -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-gitlab" CODER_EXTERNAL_AUTH_0_TYPE=gitlab CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -62,7 +62,7 @@ pushing commits and creating merge requests. For self-hosted GitLab, set `AUTH_URL` and `TOKEN_URL` to your instance. Coder derives `API_BASE_URL` automatically from `AUTH_URL`: -```env +```text CODER_EXTERNAL_AUTH_0_ID="primary-gitlab" CODER_EXTERNAL_AUTH_0_TYPE=gitlab CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx diff --git a/docs/ai-coder/ai-gateway/clients/codex.md b/docs/ai-coder/ai-gateway/clients/codex.md index 5ce4a21cdb272..df59eee7e4e17 100644 --- a/docs/ai-coder/ai-gateway/clients/codex.md +++ b/docs/ai-coder/ai-gateway/clients/codex.md @@ -96,7 +96,7 @@ If configuring within a Coder workspace, you can use the For the centralized API key flow, set `enable_ai_gateway`: -```tf +```hcl module "codex" { source = "registry.coder.com/coder-labs/codex/coder" version = "~> 5.0" @@ -111,7 +111,7 @@ through `base_config_toml` and inject the Coder API token with a `coder_env` resource. Users authenticate by running `codex login` with their ChatGPT account: -```tf +```hcl resource "coder_env" "coder_api_token" { agent_id = coder_agent.main.id name = "CODER_API_TOKEN" diff --git a/docs/ai-coder/ai-gateway/clients/mux.md b/docs/ai-coder/ai-gateway/clients/mux.md index a7da16fdb5787..8d6f49a6fc736 100644 --- a/docs/ai-coder/ai-gateway/clients/mux.md +++ b/docs/ai-coder/ai-gateway/clients/mux.md @@ -59,7 +59,7 @@ export ANTHROPIC_BASE_URL="https://coder.example.com/api/v2/ai-gateway/anthropic If you want to run Mux inside a Coder workspace (for example, as a Coder app), you can install it with the [Mux module](https://registry.coder.com/modules/coder/mux) and pre-configure AI Gateway via environment variables on the agent: -```tf +```hcl data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} diff --git a/docs/ai-coder/ai-gateway/mcp.md b/docs/ai-coder/ai-gateway/mcp.md index 494f43832b5df..0ffa362d07132 100644 --- a/docs/ai-coder/ai-gateway/mcp.md +++ b/docs/ai-coder/ai-gateway/mcp.md @@ -38,7 +38,7 @@ See the diagram in [Implementation Details](./reference.md#implementation-detail You can also control which tools are injected by using an allow and/or a deny regular expression on the tool names: -```env +```text CODER_EXTERNAL_AUTH_0_MCP_TOOL_ALLOW_REGEX=(.+_gist.*) CODER_EXTERNAL_AUTH_0_MCP_TOOL_DENY_REGEX=(create_gist) ``` diff --git a/docs/ai-coder/github-to-tasks.md b/docs/ai-coder/github-to-tasks.md index 4d99b6986da08..18208c7c9f80c 100644 --- a/docs/ai-coder/github-to-tasks.md +++ b/docs/ai-coder/github-to-tasks.md @@ -110,7 +110,7 @@ You can also choose to modify the other [input parameters](https://github.com/co If your prompt uses the GitHub CLI `gh`, your template must pass the user's GitHub token to the agent. Add this to your template's Terraform: -```terraform +```hcl data "coder_external_auth" "github" { id = "github" # Must match your CODER_EXTERNAL_AUTH_0_ID } diff --git a/docs/get-started/customize-your-template/add-a-language.md b/docs/get-started/customize-your-template/add-a-language.md index 019aaad85a316..38e1774a48824 100644 --- a/docs/get-started/customize-your-template/add-a-language.md +++ b/docs/get-started/customize-your-template/add-a-language.md @@ -22,7 +22,7 @@ A parameter is a question Coder asks when someone creates a workspace. Each parameter comes from a `coder_parameter` [data source](https://developer.hashicorp.com/terraform/language/data-sources) in the template. The **Programming Languages** parameter is a multi-select list, and each language the reader can choose is an `option` block: -```tf +```hcl data "coder_parameter" "languages" { name = "languages" display_name = "Programming Languages" @@ -54,7 +54,7 @@ Adding an `option` adds a choice to that list. In `main.tf`, find the `data "coder_parameter" "languages"` block. Add a Ruby `option` after the last existing option, before the parameter's closing brace: -```tf +```hcl option { name = "Ruby" value = "ruby" @@ -203,7 +203,7 @@ The shipped presets cover combinations like Go and Python, but none selects Ruby In `main.tf`, find the `# --- Presets ---` section and add a Ruby preset next to the existing ones: -```tf +```hcl data "coder_workspace_preset" "ruby_dev" { name = "Ruby Development" icon = "/icon/ruby.svg" @@ -292,7 +292,7 @@ Your template files after this guide's changes, starting from the Quickstart tem ### main.tf -```tf +```hcl terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/authenticate-to-github.md b/docs/get-started/customize-your-template/authenticate-to-github.md index d783a0a11616c..3cf4d2d521065 100644 --- a/docs/get-started/customize-your-template/authenticate-to-github.md +++ b/docs/get-started/customize-your-template/authenticate-to-github.md @@ -36,7 +36,7 @@ The `id` points at a provider configured on the Coder deployment, and the local Add this `coder_external_auth` block to `main.tf`: -```tf +```hcl data "coder_external_auth" "github" { id = "github" } @@ -140,7 +140,7 @@ Both are data sources, and neither creates infrastructure. Your `main.tf` after this guide's changes, starting from the Quickstart template: -```tf +```hcl terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/index.md b/docs/get-started/customize-your-template/index.md index 398e76c6338a1..ab5fba8d8c8f3 100644 --- a/docs/get-started/customize-your-template/index.md +++ b/docs/get-started/customize-your-template/index.md @@ -29,7 +29,7 @@ It consists of one or more Terraform files (`*.tf`), and it can include template Every Coder template declares the `coder` provider inside a `required_providers` block: -```tf +```hcl terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/install-command-line-tools.md b/docs/get-started/customize-your-template/install-command-line-tools.md index 132e4bb905296..4a121c7879517 100644 --- a/docs/get-started/customize-your-template/install-command-line-tools.md +++ b/docs/get-started/customize-your-template/install-command-line-tools.md @@ -186,7 +186,7 @@ The volume backs `/home/linuxbrew`, the prefix where Homebrew installs, so Homeb In `main.tf`, add a volume for Homebrew's directory next to the existing `home_volume`: -```tf +```hcl resource "docker_volume" "homebrew_volume" { name = "coder-${data.coder_workspace.me.id}-homebrew" lifecycle { @@ -197,7 +197,7 @@ resource "docker_volume" "homebrew_volume" { Then mount it in the `docker_container "workspace"` resource, alongside the block that mounts `/home/coder`: -```tf +```hcl volumes { container_path = "/home/linuxbrew" volume_name = docker_volume.homebrew_volume.name @@ -267,7 +267,7 @@ It installs prebuilt binaries into `/home/coder`, which already persists, so the In `main.tf`, add a script next to the existing `install_languages` resource: -```tf +```hcl resource "coder_script" "install_tools" { agent_id = coder_agent.main.id display_name = "Install Tools" @@ -335,7 +335,7 @@ This approach relies on the `/home/linuxbrew` volume you added in Step 4, so Hom Use this `install_tools` script in place of the mise version: -```tf +```hcl resource "coder_script" "install_tools" { agent_id = coder_agent.main.id display_name = "Install Tools" @@ -395,7 +395,7 @@ Refer to [Resource persistence](../../admin/templates/extending-templates/resour Your `main.tf` after this guide's changes, starting from the Quickstart template: -```tf +```hcl terraform { required_providers { coder = { diff --git a/docs/install/airgap.md b/docs/install/airgap.md index 244978d7d1593..bbd681c71922e 100644 --- a/docs/install/airgap.md +++ b/docs/install/airgap.md @@ -39,7 +39,7 @@ following: Here's an example Dockerfile: -```Dockerfile +```dockerfile FROM ghcr.io/coder/coder:latest USER root @@ -118,7 +118,7 @@ ENV TF_CLI_CONFIG_FILE=/home/coder/.terraformrc > [example templates](../../examples/templates) > you intend to use. -```tf +```hcl # filesystem-mirror-example.tfrc provider_installation { filesystem_mirror { @@ -127,7 +127,7 @@ provider_installation { } ``` -```tf +```hcl # network-mirror-example.tfrc provider_installation { network_mirror { diff --git a/docs/install/registry-mirror-artifactory.md b/docs/install/registry-mirror-artifactory.md index 21e7a07078db7..dcb369b79b6e8 100644 --- a/docs/install/registry-mirror-artifactory.md +++ b/docs/install/registry-mirror-artifactory.md @@ -79,7 +79,7 @@ Replace: Update your Coder templates to use Artifactory instead of the public registry: -```tf +```hcl # Before: Direct from Coder registry module "code-server" { source = "registry.coder.com/coder/code-server/coder" @@ -170,7 +170,7 @@ The Artifactory mirror supports all namespaces from the Coder registry: All modules use the same source format: -```tf +```hcl source = "///coder" ``` diff --git a/docs/install/upgrade.md b/docs/install/upgrade.md index 8c4282202d219..1c93a4be10eb8 100644 --- a/docs/install/upgrade.md +++ b/docs/install/upgrade.md @@ -72,7 +72,7 @@ Download the latest Windows installer or binary from [GitHub releases](https://github.com/coder/coder/releases/latest), or upgrade from Winget. -```pwsh +```powershell winget install Coder.Coder ``` diff --git a/docs/tutorials/cloning-git-repositories.md b/docs/tutorials/cloning-git-repositories.md index b166ef8dd1552..f3667abf64ec5 100644 --- a/docs/tutorials/cloning-git-repositories.md +++ b/docs/tutorials/cloning-git-repositories.md @@ -29,7 +29,7 @@ With the authentication in place, it is time to set up the template to use the [Coder Registry](https://registry.coder.com/) by adding it to our template's Terraform configuration. -```tf +```hcl module "git-clone" { source = "registry.coder.com/modules/git-clone/coder" version = "1.0.12" @@ -47,7 +47,7 @@ You can also use customize the Git URL and make it dynamic for use cases where a template supports multiple projects. -```tf +```hcl data "coder_parameter" "git_repo" { name = "git_repo" display_name = "Git repository" diff --git a/docs/tutorials/faqs.md b/docs/tutorials/faqs.md index f2a0902eb790f..b938760984108 100644 --- a/docs/tutorials/faqs.md +++ b/docs/tutorials/faqs.md @@ -107,7 +107,7 @@ default (shows all), add this block inside the [`coder_agent`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent) of a template and configure as needed: -```tf +```hcl display_apps { vscode = false vscode_insiders = false @@ -143,7 +143,7 @@ In the template, set option to `authenticated` and when a workspace is built with this template, the pretty globe shows up next to path-based `code-server`: -```tf +```hcl resource "coder_app" "code-server" { ... share = "authenticated" @@ -292,7 +292,7 @@ One way is to reference a Terraform module from a GitHub repo to avoid duplication and then just extend it or pass template-specific parameters/resources: -```tf +```hcl # template1/main.tf module "central-coder-module" { source = "github.com/org/central-coder-module" @@ -303,7 +303,7 @@ resource "ebs_volume" "custom_template1_only_resource" { } ``` -```tf +```hcl # template2/main.tf module "central-coder-module" { source = "github.com/org/central-coder-module" @@ -350,7 +350,7 @@ duplicate name errors. This code produces a hashed value that will be difficult to replicate. -```tf +```hcl locals { concatenated_string = "${data.coder_workspace.me.name}+${data.coder_workspace_owner.me.name}" hashed_string = md5(local.concatenated_string) @@ -538,7 +538,7 @@ To achieve this, template admins can use the environment variable This variable allows the system to check if the executed application is on the block list, which includes `scp`, `rsync`, `ftp`, and `nc`. -```tf +```hcl resource "docker_container" "workspace" { ... env = [ diff --git a/docs/tutorials/gcp-to-aws.md b/docs/tutorials/gcp-to-aws.md index c1e767494ed80..bd196d3679f62 100644 --- a/docs/tutorials/gcp-to-aws.md +++ b/docs/tutorials/gcp-to-aws.md @@ -169,7 +169,7 @@ coder: Navigate to your EC2 workspace template in Coder, and configure the AWS provider using the block below: -```tf +```hcl provider "aws" { assume_role_with_web_identity { # enter role ARN here - copy from AWS console diff --git a/docs/tutorials/image-pull-secret.md b/docs/tutorials/image-pull-secret.md index a8802bf2f2c52..52673d09297e9 100644 --- a/docs/tutorials/image-pull-secret.md +++ b/docs/tutorials/image-pull-secret.md @@ -70,7 +70,7 @@ template. In the example below, we define the secret via the `image_pull_secrets` argument. Note that this argument is nested at the same level as the `container` argument: -```tf +```hcl resource "kubernetes_pod" "dev" { metadata { # this must be the same namespace where workspaces will be deployed diff --git a/docs/tutorials/template-from-scratch.md b/docs/tutorials/template-from-scratch.md index 9872b7cfb5345..e319fb55448ac 100644 --- a/docs/tutorials/template-from-scratch.md +++ b/docs/tutorials/template-from-scratch.md @@ -79,7 +79,7 @@ Edit the Terraform `main.tf` file to provision the workspace's resources. Start by setting up the providers. At a minimum, we need the `coder` provider. For this template, we also need the `docker` provider: -```tf +```hcl terraform { required_providers { coder = { @@ -137,7 +137,7 @@ needs `curl` access to the Coder server. Add this snippet after the last closing `}` in `main.tf` to create the agent: -```tf +```hcl resource "coder_agent" "main" { arch = data.coder_provisioner.me.arch os = "linux" @@ -220,7 +220,7 @@ We installed code-server in the `startup_script` argument. To add code-server to the workspace, make it available in the workspace with a `coder_app` resource. See [web IDEs](../user-guides/workspace-access/web-ides.md) for more examples: -```tf +```hcl resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -241,7 +241,7 @@ resource "coder_app" "code-server" { You can also use a `coder_app` resource to link to external apps, such as links to wikis or cloud consoles: -```tf +```hcl resource "coder_app" "coder-server-doc" { agent_id = coder_agent.main.id icon = "/emojis/1f4dd.png" @@ -271,7 +271,7 @@ Later, we use the Terraform [count](https://developer.hashicorp.com/terraform/language/meta-arguments/count) meta-argument to make sure that our Docker container is ephemeral. -```tf +```hcl resource "docker_volume" "home_volume" { name = "coder-${data.coder_workspace.me.id}-home" # Protect the volume from being deleted due to changes in attributes. @@ -289,7 +289,7 @@ For details, see To set up our Docker container, our template has a `docker_image` resource that uses `build/Dockerfile`, which we created earlier: -```tf +```hcl resource "docker_image" "main" { name = "coder-${data.coder_workspace.me.id}" build { @@ -307,7 +307,7 @@ resource "docker_image" "main" { Our `docker_container` resource uses `coder_workspace` `start_count` to start and stop the Docker container: -```tf +```hcl resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = docker_image.main.name diff --git a/docs/user-guides/workspace-access/antigravity.md b/docs/user-guides/workspace-access/antigravity.md index b89b29d10c6c3..27d6cb3fc35fe 100644 --- a/docs/user-guides/workspace-access/antigravity.md +++ b/docs/user-guides/workspace-access/antigravity.md @@ -57,7 +57,7 @@ Your Coder administrator can add Antigravity as a one-click workspace app using the [Antigravity module](https://registry.coder.com/modules/coder/antigravity) from the Coder registry: -```tf +```hcl module "antigravity" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/antigravity/coder" diff --git a/docs/user-guides/workspace-access/port-forwarding.md b/docs/user-guides/workspace-access/port-forwarding.md index 26843bcb936f0..ef64990c9b76a 100644 --- a/docs/user-guides/workspace-access/port-forwarding.md +++ b/docs/user-guides/workspace-access/port-forwarding.md @@ -75,7 +75,7 @@ workspace's template. This approach shows a visual application icon in the dashboard. See the following `coder_app` example for a Node React app and note the `subdomain` and `share` settings: -```tf +```hcl # node app resource "coder_app" "node-react-app" { agent_id = coder_agent.dev.id diff --git a/docs/user-guides/workspace-access/remote-desktops.md b/docs/user-guides/workspace-access/remote-desktops.md index f07589a53993f..35fee4b4de39b 100644 --- a/docs/user-guides/workspace-access/remote-desktops.md +++ b/docs/user-guides/workspace-access/remote-desktops.md @@ -38,7 +38,7 @@ coder://coder.example.com/v0/open/ws/myworkspace/agent/main/rdp?username=Adminis To include a Coder Desktop button on the workspace dashboard page, add a `coder_app` resource to the template: -```tf +```hcl locals { server_name = regex("https?:\\/\\/([^\\/]+)", data.coder_workspace.me.access_url)[0] } From ef7501d04ec72fe2189b92d49fe1070776a5caf7 Mon Sep 17 00:00:00 2001 From: Nick Vigilante Date: Fri, 10 Jul 2026 18:47:15 +0000 Subject: [PATCH 2/6] fix(docs): use terraform grammar for tf/hcl and dotenv for env Correcting the normalization from the previous commit: - tf and hcl both mapped to hcl, but Shiki ships terraform and hcl as two distinct grammars (Terraform's own resource/provider syntax vs generic HCL used by other HashiCorp tools like Vault). Nearly every fenced block in docs/** is literal Terraform code, so terraform is the correct canonical tag, not hcl. - env mapped to text, discarding real syntax highlighting, but Shiki bundles a dedicated dotenv grammar for exactly this KEY=VALUE content, so env blocks now map to dotenv instead. Verified every fence tag now used under docs/** against the full list of Shiki's 235 bundled languages and aliases (only promql remains unsupported, as already documented). DOCS-476 --- docs/.style/style-guide/formatting.md | 8 +++-- docs/about/contributing/modules.md | 4 +-- docs/about/contributing/templates.md | 12 ++++---- docs/admin/external-auth/index.md | 26 ++++++++-------- .../validated-architectures/index.md | 2 +- .../integrations/devcontainers/integration.md | 12 ++++---- .../integrations/multiple-kube-clusters.md | 4 +-- docs/admin/integrations/oauth2-provider.md | 2 +- docs/admin/integrations/vault.md | 2 +- docs/admin/networking/index.md | 2 +- docs/admin/networking/port-forwarding.md | 2 +- docs/admin/networking/wildcard-access-url.md | 2 +- docs/admin/security/secrets.md | 4 +-- docs/admin/setup/appearance.md | 2 +- .../extending-templates/agent-metadata.md | 2 +- .../docker-in-workspaces.md | 12 ++++---- .../extending-templates/dynamic-parameters.md | 30 +++++++++---------- .../environment-variables.md | 8 ++--- .../extending-templates/external-auth.md | 2 +- .../templates/extending-templates/index.md | 12 ++++---- .../jetbrains-preinstall.md | 2 +- .../templates/extending-templates/modules.md | 2 +- .../extending-templates/parameters.md | 26 ++++++++-------- .../prebuilt-workspaces.md | 6 ++-- .../extending-templates/process-priority.md | 2 +- .../extending-templates/resource-metadata.md | 6 ++-- .../resource-monitoring.md | 2 +- .../extending-templates/resource-ordering.md | 12 ++++---- .../resource-persistence.md | 8 ++--- .../extending-templates/variables.md | 2 +- .../templates/extending-templates/web-ides.md | 22 +++++++------- .../extending-templates/workspace-tags.md | 2 +- .../managing-templates/change-management.md | 2 +- .../managing-templates/dependencies.md | 6 ++-- docs/admin/templates/open-in-coder.md | 4 +-- .../templates/startup-coordination/example.md | 4 +-- .../templates/startup-coordination/usage.md | 2 +- docs/admin/users/idp-sync.md | 4 +-- docs/admin/users/oidc-auth/google.md | 4 +-- docs/admin/users/oidc-auth/index.md | 12 ++++---- docs/admin/users/oidc-auth/microsoft.md | 4 +-- docs/admin/users/oidc-auth/refresh-tokens.md | 4 +-- docs/admin/users/quotas.md | 2 +- docs/ai-coder/agent-firewall/index.md | 6 ++-- docs/ai-coder/agent-firewall/nsjail/ecs.md | 2 +- docs/ai-coder/agent-firewall/nsjail/k8s.md | 2 +- docs/ai-coder/agent-firewall/version.md | 4 +-- .../agents/platform-controls/git-providers.md | 6 ++-- .../template-optimization.md | 4 +-- .../ai-gateway/clients/claude-code.md | 4 +-- docs/ai-coder/ai-gateway/clients/codex.md | 4 +-- docs/ai-coder/ai-gateway/clients/index.md | 2 +- docs/ai-coder/ai-gateway/clients/mux.md | 2 +- docs/ai-coder/ai-gateway/mcp.md | 2 +- docs/ai-coder/custom-agents.md | 2 +- docs/ai-coder/github-to-tasks.md | 2 +- docs/ai-coder/tasks-core-principles.md | 2 +- docs/ai-coder/tasks-lifecycle.md | 6 ++-- docs/ai-coder/tasks-migration.md | 4 +-- docs/ai-coder/tasks.md | 2 +- .../customize-your-template/add-a-language.md | 8 ++--- .../authenticate-to-github.md | 4 +-- .../customize-your-template/index.md | 2 +- .../install-command-line-tools.md | 10 +++---- docs/install/airgap.md | 4 +-- docs/install/registry-mirror-artifactory.md | 6 ++-- docs/tutorials/cloning-git-repositories.md | 4 +-- docs/tutorials/faqs.md | 12 ++++---- docs/tutorials/gcp-to-aws.md | 2 +- docs/tutorials/image-pull-secret.md | 2 +- docs/tutorials/template-from-scratch.md | 14 ++++----- .../workspace-access/antigravity.md | 2 +- .../workspace-access/port-forwarding.md | 2 +- .../workspace-access/remote-desktops.md | 2 +- 74 files changed, 211 insertions(+), 209 deletions(-) diff --git a/docs/.style/style-guide/formatting.md b/docs/.style/style-guide/formatting.md index 4b25525585c28..de8361806edf6 100644 --- a/docs/.style/style-guide/formatting.md +++ b/docs/.style/style-guide/formatting.md @@ -139,13 +139,15 @@ Use the most specific language tag available: - `powershell` for Windows command-line blocks. PowerShell is the default Windows shell in the Coder docs. `pwsh` is not a valid tag; use `powershell`. -- `hcl` for Terraform and HCL. - `tf` and `terraform` are not the canonical tag; use `hcl`. +- `terraform` for Terraform and HCL. + `tf` and `hcl` are not the canonical tag; use `terraform`. + Shiki ships `terraform` and `hcl` as two distinct grammars; `terraform` is the more specific one and matches what nearly every Coder docs code block actually is. - `yaml` for YAML. - `go` for Go. - `json` for JSON. +- `dotenv` for `.env`-style `KEY=VALUE` blocks. - `text` for command output shown on its own, and for any block with no syntax to highlight. - `env`, `output`, `none`, and `url` are not valid tags; use `text`. + `output`, `none`, and `url` are not valid tags; use `text`. - `dockerfile` for Dockerfiles, lowercase. `Dockerfile` (capitalized) is not a valid tag. diff --git a/docs/about/contributing/modules.md b/docs/about/contributing/modules.md index 5ac9e9e8ba153..7543a21c9a5ad 100644 --- a/docs/about/contributing/modules.md +++ b/docs/about/contributing/modules.md @@ -104,7 +104,7 @@ This creates: Edit `main.tf` to build your module's features. Here's an example based on the `git-clone` module structure: -```hcl +```terraform terraform { required_providers { coder = { @@ -212,7 +212,7 @@ This module clones a Git repository into your Coder workspace and ensures Git is ## Usage -```hcl +```terraform module "git_clone" { source = "registry.coder.com/[your-username]/git-clone/coder" version = "~> 1.0" diff --git a/docs/about/contributing/templates.md b/docs/about/contributing/templates.md index ac80dd4422915..d0c18f078a21f 100644 --- a/docs/about/contributing/templates.md +++ b/docs/about/contributing/templates.md @@ -103,7 +103,7 @@ cd registry/[your-username]/templates/[template-name] Create `main.tf` with your complete Terraform configuration: -```hcl +```terraform terraform { required_providers { coder = { @@ -262,7 +262,7 @@ You can customize this template by: Use registry modules for common features: -```hcl +```terraform # VS Code in browser module "code-server" { count = data.coder_workspace.me.start_count @@ -311,7 +311,7 @@ module "dotfiles" { Provide meaningful customization options: -```hcl +```terraform variable "git_repo_url" { description = "Git repository to clone" type = string @@ -432,7 +432,7 @@ Before submitting your template, verify: ### Docker-based template -```hcl +```terraform # Simple Docker template resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count @@ -446,7 +446,7 @@ resource "docker_container" "workspace" { ### AWS EC2 template -```hcl +```terraform # AWS EC2 template resource "aws_instance" "workspace" { count = data.coder_workspace.me.start_count @@ -463,7 +463,7 @@ resource "aws_instance" "workspace" { ### Kubernetes template -```hcl +```terraform # Kubernetes template resource "kubernetes_pod" "workspace" { count = data.coder_workspace.me.start_count diff --git a/docs/admin/external-auth/index.md b/docs/admin/external-auth/index.md index bad27f2f1e112..d08c5bbb83577 100644 --- a/docs/admin/external-auth/index.md +++ b/docs/admin/external-auth/index.md @@ -24,7 +24,7 @@ If you have experience with a provider that is not listed here, please After you create an OAuth application, set environment variables to configure the Coder server to use it: -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="" CODER_EXTERNAL_AUTH_0_TYPE= CODER_EXTERNAL_AUTH_0_CLIENT_ID= @@ -47,7 +47,7 @@ configure your callback URL as `https://example.com/external-auth/primary-github Add the following code to any template to add a button to the workspace setup page which will allow you to authenticate with your provider: -```hcl +```terraform data "coder_external_auth" "" { id = "" } @@ -142,7 +142,7 @@ acting as an OAuth client to external identity providers. Coder will usually assume PKCE support is available with "S256" as the code challenge method. Manual configuration is available to override any default behavior. -```text +```dotenv # Enable PKCE with S256 (recommended when supported) CODER_EXTERNAL_AUTH_0_PKCE_METHODS="S256" @@ -156,7 +156,7 @@ CODER_EXTERNAL_AUTH_0_PKCE_METHODS="none" Azure DevOps requires the following environment variables: -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops" CODER_EXTERNAL_AUTH_0_TYPE=azure-devops CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -170,7 +170,7 @@ CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://app.vssps.visualstudio.com/oauth2/token Azure DevOps (via Entra ID) requires the following environment variables: -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops" CODER_EXTERNAL_AUTH_0_TYPE=azure-devops-entra CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -185,7 +185,7 @@ CODER_EXTERNAL_AUTH_0_AUTH_URL="https://login.microsoftonline.com//oa Bitbucket Server requires the following environment variables: -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-bitbucket-server" CODER_EXTERNAL_AUTH_0_TYPE=bitbucket-server CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxx @@ -199,7 +199,7 @@ This callback path includes the value of `CODER_EXTERNAL_AUTH_0_ID`. ### Gitea -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="gitea" CODER_EXTERNAL_AUTH_0_TYPE=gitea CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxxx @@ -219,7 +219,7 @@ or to integrate with an existing GitHub authentication. For a more complete, step-by-step guide, follow the [configure a GitHub OAuth app](#configure-a-github-oauth-app) section instead. -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-github" CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -236,7 +236,7 @@ as `https://example.com/external-auth/primary-github/callback`, where GitHub Enterprise requires the following environment variables: -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-github" CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -255,7 +255,7 @@ as `https://example.com/external-auth/primary-github/callback`, where GitLab self-managed requires the following environment variables: -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-gitlab" CODER_EXTERNAL_AUTH_0_TYPE=gitlab # This value is the "Application ID" @@ -281,7 +281,7 @@ Visit the [JFrog Artifactory](../../admin/integrations/jfrog-artifactory.md) gui Custom authentication and token URLs should be used for self-managed Git provider deployments. -```text +```dotenv CODER_EXTERNAL_AUTH_0_AUTH_URL="https://github.example.com/oauth/authorize" CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/oauth/token" CODER_EXTERNAL_AUTH_0_REVOKE_URL="https://github.example.com/oauth/revoke" @@ -296,7 +296,7 @@ CODER_EXTERNAL_AUTH_0_REGEX=github\.company\.com Optionally, you can request custom scopes: -```text +```dotenv CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key" ``` @@ -358,7 +358,7 @@ Below is an example configuration with multiple providers: > git config --global credential.useHttpPath true > ``` -```text +```dotenv # Provider 1) github.com CODER_EXTERNAL_AUTH_0_ID=primary-github CODER_EXTERNAL_AUTH_0_TYPE=github diff --git a/docs/admin/infrastructure/validated-architectures/index.md b/docs/admin/infrastructure/validated-architectures/index.md index 5027d89f5408c..2e8b75023cd75 100644 --- a/docs/admin/infrastructure/validated-architectures/index.md +++ b/docs/admin/infrastructure/validated-architectures/index.md @@ -163,7 +163,7 @@ compute as users start/stop workspaces at the beginning and end of their day. Set nodeSelectors, affinities, and tolerations in Coder templates to assign workspaces to the given node group: -```hcl +```terraform resource "kubernetes_deployment" "coder" { spec { template { diff --git a/docs/admin/integrations/devcontainers/integration.md b/docs/admin/integrations/devcontainers/integration.md index f5213a70e32cf..1b37c1bc52c12 100644 --- a/docs/admin/integrations/devcontainers/integration.md +++ b/docs/admin/integrations/devcontainers/integration.md @@ -40,7 +40,7 @@ Use the [devcontainers-cli](https://registry.coder.com/modules/devcontainers-cli) module to ensure the `@devcontainers/cli` is installed in your workspace: -```hcl +```terraform module "devcontainers-cli" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/devcontainers-cli/coder" @@ -57,7 +57,7 @@ The resource automatically starts a Dev Container in your workspace, ensuring it's ready when you access the workspace: -```hcl +```terraform resource "coder_devcontainer" "my-repository" { count = data.coder_workspace.me.start_count agent_id = coder_agent.dev.id @@ -83,7 +83,7 @@ default behavior. If you need to explicitly disable Dev Containers, set the `CODER_AGENT_DEVCONTAINERS_ENABLE` environment variable to `false`: -```hcl +```terraform resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = "codercom/oss-dogfood:latest" @@ -153,7 +153,7 @@ and [`coder_env`](https://registry.terraform.io/providers/coder/coder/latest/doc resources to a `coder_devcontainer` by referencing its `subagent_id` attribute as the `agent_id`: -```hcl +```terraform resource "coder_devcontainer" "my-repository" { count = data.coder_workspace.me.start_count agent_id = coder_agent.dev.id @@ -227,7 +227,7 @@ For the full reference, see Here's a simplified template example that uses Dev Containers with manual configuration: -```hcl +```terraform terraform { required_providers { coder = { source = "coder/coder" } @@ -277,7 +277,7 @@ resource "coder_env" "env" { By default, discovered containers appear in the dashboard but developers must manually start them. To have them start automatically, enable autostart: -```hcl +```terraform resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = "codercom/oss-dogfood:latest" diff --git a/docs/admin/integrations/multiple-kube-clusters.md b/docs/admin/integrations/multiple-kube-clusters.md index d2b9a42ef4821..88c0480b05cfd 100644 --- a/docs/admin/integrations/multiple-kube-clusters.md +++ b/docs/admin/integrations/multiple-kube-clusters.md @@ -62,7 +62,7 @@ From there, add [template parameters](../templates/extending-templates/parameters.md) to allow developers to pick their desired cluster. -```hcl +```terraform # main.tf data "coder_parameter" "kube_context" { @@ -159,7 +159,7 @@ rolebinding.rbac.authorization.k8s.io/coder-v2 created You can start from our [example template](../../../examples/templates/kubernetes). -```hcl +```terraform variable "host" { description = "Cluster host address" sensitive = true diff --git a/docs/admin/integrations/oauth2-provider.md b/docs/admin/integrations/oauth2-provider.md index 8c1c2b06fc249..d820905fcce61 100644 --- a/docs/admin/integrations/oauth2-provider.md +++ b/docs/admin/integrations/oauth2-provider.md @@ -28,7 +28,7 @@ coder server --experiments oauth2 Or set the environment variable: -```text +```dotenv CODER_EXPERIMENTS=oauth2 ``` diff --git a/docs/admin/integrations/vault.md b/docs/admin/integrations/vault.md index 452a89ecba619..d002912de9ecd 100644 --- a/docs/admin/integrations/vault.md +++ b/docs/admin/integrations/vault.md @@ -23,7 +23,7 @@ GitHub [external authentication](../external-auth/index.md) to get the token and To use this module, add the following code to your Terraform configuration. -```hcl +```terraform module "vault" { source = "registry.coder.com/modules/vault-github/coder" version = "1.0.7" diff --git a/docs/admin/networking/index.md b/docs/admin/networking/index.md index 2801b9f8c8c1a..4403617234b8d 100644 --- a/docs/admin/networking/index.md +++ b/docs/admin/networking/index.md @@ -80,7 +80,7 @@ Template admins can overwrite the site-wide access URL at the template level by leveraging the `url` argument when [defining the Coder provider](https://registry.terraform.io/providers/coder/coder/latest/docs#url-1): -```hcl +```terraform provider "coder" { url = "https://coder.namespace.svc.cluster.local" } diff --git a/docs/admin/networking/port-forwarding.md b/docs/admin/networking/port-forwarding.md index 9ae2034bc4839..8bcaf2f92303e 100644 --- a/docs/admin/networking/port-forwarding.md +++ b/docs/admin/networking/port-forwarding.md @@ -85,7 +85,7 @@ workspace's template. This approach shows a visual application icon in the dashboard. See the following `coder_app` example for a Node React app and note the `subdomain` and `share` settings: -```hcl +```terraform # node app resource "coder_app" "node-react-app" { agent_id = coder_agent.dev.id diff --git a/docs/admin/networking/wildcard-access-url.md b/docs/admin/networking/wildcard-access-url.md index fc9e917331982..73d44157cad16 100644 --- a/docs/admin/networking/wildcard-access-url.md +++ b/docs/admin/networking/wildcard-access-url.md @@ -108,7 +108,7 @@ Each proxy's wildcard domain must have corresponding DNS records: In your Coder templates, enable subdomain applications using the `subdomain` parameter: -```hcl +```terraform resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" diff --git a/docs/admin/security/secrets.md b/docs/admin/security/secrets.md index 3d1a5e1a81013..f2d0e77a96882 100644 --- a/docs/admin/security/secrets.md +++ b/docs/admin/security/secrets.md @@ -65,7 +65,7 @@ which excludes obscure API providers. Dynamic secrets can be implemented in your template code like so: -```hcl +```terraform resource "twilio_iam_api_key" "api_key" { account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" friendly_name = "Test API Key" @@ -96,7 +96,7 @@ can also show them in the Workspace UI with Can be produced with -```hcl +```terraform resource "twilio_iam_api_key" "api_key" { account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" friendly_name = "Test API Key" diff --git a/docs/admin/setup/appearance.md b/docs/admin/setup/appearance.md index e595d25af9b4b..f5d69fa444f91 100644 --- a/docs/admin/setup/appearance.md +++ b/docs/admin/setup/appearance.md @@ -98,7 +98,7 @@ coder: if running as a system service, set an environment variable `CODER_SUPPORT_LINKS` in `/etc/coder.d/coder.env` as follows, -```text +```dotenv CODER_SUPPORT_LINKS='[{"name": "Hello GitHub", "target": "https://github.com/coder/coder", "icon": "bug"}, {"name": "Hello Slack", "target": "https://codercom.slack.com/archives/C014JH42DBJ", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/slack.svg"}, {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/discord.svg", "location": "navbar"}, {"name": "Hello Foobar", "target": "https://discord.gg/coder", "icon": "/emojis/1f3e1.png"}]' ``` diff --git a/docs/admin/templates/extending-templates/agent-metadata.md b/docs/admin/templates/extending-templates/agent-metadata.md index 238d23396847e..4b2f90fde1104 100644 --- a/docs/admin/templates/extending-templates/agent-metadata.md +++ b/docs/admin/templates/extending-templates/agent-metadata.md @@ -22,7 +22,7 @@ usage about the workspace's host. Here's a standard set of metadata snippets for Linux agents: -```hcl +```terraform resource "coder_agent" "main" { os = "linux" ... diff --git a/docs/admin/templates/extending-templates/docker-in-workspaces.md b/docs/admin/templates/extending-templates/docker-in-workspaces.md index b22088b24916f..afd6699f92554 100644 --- a/docs/admin/templates/extending-templates/docker-in-workspaces.md +++ b/docs/admin/templates/extending-templates/docker-in-workspaces.md @@ -23,7 +23,7 @@ inside Coder workspaces. See [Systemd in Docker](#systemd-in-docker). After [installing Sysbox](https://github.com/nestybox/sysbox#installation) on the Coder host, modify your template to use the sysbox-runc runtime: -```hcl +```terraform resource "docker_container" "workspace" { # ... name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}" @@ -52,7 +52,7 @@ After modify your template to use the sysbox-runc RuntimeClass. This requires the Kubernetes Terraform provider version 2.16.0 or greater. -```hcl +```terraform terraform { required_providers { coder = { @@ -169,7 +169,7 @@ $ kubectl create secret docker-registry \ --docker-email= ``` -```hcl +```terraform env { name = "CODER_IMAGE_PULL_SECRET" value_from { @@ -311,7 +311,7 @@ your nodes cannot run Sysbox. ### Use a privileged sidecar container in Docker-based templates -```hcl +```terraform resource "coder_agent" "main" { os = "linux" arch = "amd64" @@ -348,7 +348,7 @@ resource "docker_container" "workspace" { ### Use a privileged sidecar container in Kubernetes-based templates -```hcl +```terraform terraform { required_providers { coder = { @@ -420,7 +420,7 @@ After modify your template to use the sysbox-runc RuntimeClass. This requires the Kubernetes Terraform provider version 2.16.0 or greater. -```hcl +```terraform terraform { required_providers { coder = { diff --git a/docs/admin/templates/extending-templates/dynamic-parameters.md b/docs/admin/templates/extending-templates/dynamic-parameters.md index 07cfd34100c35..b0f0229ca23fa 100644 --- a/docs/admin/templates/extending-templates/dynamic-parameters.md +++ b/docs/admin/templates/extending-templates/dynamic-parameters.md @@ -148,7 +148,7 @@ Users can avoid restrictions like `disabled` if they create a workspace via the This attribute accepts JSON like so: -```hcl +```terraform data "coder_parameter" "styled_parameter" { ... styling = jsonencode({ @@ -182,7 +182,7 @@ Single-select parameters with options can use the `form_type="dropdown"` attribu [Try dropdown lists on the Parameter Playground](https://playground.coder.app/parameters/kgNBpjnz7x) -```hcl +```terraform locals { ides = [ "VS Code", @@ -219,7 +219,7 @@ The large text entry option can be used to enter long strings like AI prompts, s [Try textarea parameters on the Parameter Playground](https://playground.coder.app/parameters/RCAHA1Oi1_) -```hcl +```terraform data "coder_parameter" "text_area" { name = "text_area" @@ -249,7 +249,7 @@ For example, adding multiple IDEs with a single parameter. [Try multi-select parameters on the Parameter Playground](https://playground.coder.app/parameters/XogX54JV_f) -```hcl +```terraform locals { ides = [ "VS Code", "JetBrains IntelliJ", @@ -289,7 +289,7 @@ This is the original styling for list parameters. [Try radio parameters on the Parameter Playground](https://playground.coder.app/parameters/3OMDp5ANZI). -```hcl +```terraform data "coder_parameter" "environment" { name = "environment" display_name = "Environment" @@ -325,7 +325,7 @@ This can be used for a TOS confirmation or to expose advanced options. [Try checkbox parameters on the Parameters Playground](https://playground.coder.app/parameters/ycWuQJk2Py). -```hcl +```terraform data "coder_parameter" "enable_gpu" { name = "enable_gpu" display_name = "Enable GPU" @@ -342,7 +342,7 @@ The `validation` block is used to constrain (or clamp) the minimum and maximum v [Try slider parameters on the Parameters Playground](https://playground.coder.app/parameters/RsBNcWVvfm). -```hcl +```terraform data "coder_parameter" "cpu_cores" { name = "cpu_cores" display_name = "CPU Cores" @@ -366,7 +366,7 @@ Note that this does not secure information on the backend and is purely cosmetic Note: This text may not be properly hidden in the Playground. The `mask_input` styling attribute is supported in v2.24.0 and later. -```hcl +```terraform data "coder_parameter" "private_api_key" { name = "private_api_key" display_name = "Your super secret API key" @@ -405,7 +405,7 @@ Use Terraform conditionals and the `count` block to allow a checkbox to expose o [Try conditional parameters on the Parameter Playground](https://playground.coder.app/parameters/xmG5MKEGNM). -```hcl +```terraform data "coder_parameter" "show_cpu_cores" { name = "show_cpu_cores" display_name = "Toggles next parameter" @@ -440,7 +440,7 @@ This allows you to suggest an option dynamically without strict enforcement. [Try dynamic defaults in the Parameter Playground](https://playground.coder.app/parameters/DEi-Bi6DVe). -```hcl +```terraform locals { ides = [ "VS Code", @@ -505,7 +505,7 @@ A parameter's validation block can leverage inputs from other parameters. [Try dynamic validation in the Parameter Playground](https://playground.coder.app/parameters/sdbzXxagJ4). -```hcl +```terraform data "coder_parameter" "git_repo" { name = "git_repo" display_name = "Git repo" @@ -557,7 +557,7 @@ Note that parameters must be indexed when using the `count` attribute. [Try daisy-chaining parameters in the Parameter Playground](https://playground.coder.app/parameters/jLUUhoDLIa). -```hcl +```terraform locals { ides = [ @@ -659,7 +659,7 @@ data source. [Try out admin-only options in the Playground](https://playground.coder.app/parameters/5Gn9W3hYs7). -```hcl +```terraform locals { roles = [for r in data.coder_workspace_owner.me.rbac_roles: r.name] @@ -701,7 +701,7 @@ This way developers can't accidentally induce low-latency with world-spanning co [Try user-aware regions in the parameter playground](https://playground.coder.app/parameters/tBD-mbZRGm) -```hcl +```terraform locals { eu_regions = [ @@ -752,7 +752,7 @@ Some users associate groups with namespaces, such as Kubernetes, then allow user [Try groups as options in the Parameter Playground](https://playground.coder.app/parameters/lKbU53nYjl). -```hcl +```terraform locals { groups = data.coder_workspace_owner.me.groups } diff --git a/docs/admin/templates/extending-templates/environment-variables.md b/docs/admin/templates/extending-templates/environment-variables.md index a79739511d1da..c8682ab4f9051 100644 --- a/docs/admin/templates/extending-templates/environment-variables.md +++ b/docs/admin/templates/extending-templates/environment-variables.md @@ -8,7 +8,7 @@ development environments. ## Basic usage -```hcl +```terraform resource "coder_agent" "dev" { os = "linux" arch = "amd64" @@ -43,7 +43,7 @@ the convention for `PATH`-style variables on Unix systems. Multiple `coder_env` resources can each add directories to `PATH`: -```hcl +```terraform resource "coder_env" "path_tools" { agent_id = coder_agent.dev.id name = "PATH" @@ -66,7 +66,7 @@ This produces `PATH` with the value Use `error` to catch accidental duplicate definitions: -```hcl +```terraform resource "coder_env" "editor" { agent_id = coder_agent.dev.id name = "EDITOR" @@ -96,7 +96,7 @@ after `coder_env` resources are merged, so `merge_strategy = "error"` does not trigger when the conflict is with the agent's `env` block — only when two `coder_env` resources define the same key: -```hcl +```terraform resource "coder_agent" "dev" { os = "linux" arch = "amd64" diff --git a/docs/admin/templates/extending-templates/external-auth.md b/docs/admin/templates/extending-templates/external-auth.md index 209bb8596c2f1..386195ff14b08 100644 --- a/docs/admin/templates/extending-templates/external-auth.md +++ b/docs/admin/templates/extending-templates/external-auth.md @@ -67,7 +67,7 @@ If the token is required to be inserted into the workspace, for example template. This token will not auto-refresh. The following example will authenticate via GitHub and auto-clone a repo into the `~/coder` directory. -```hcl +```terraform data "coder_external_auth" "github" { # Matches the ID of the external auth provider in Coder. id = "github" diff --git a/docs/admin/templates/extending-templates/index.md b/docs/admin/templates/extending-templates/index.md index 28488b27d1842..7dbaaa617b6a4 100644 --- a/docs/admin/templates/extending-templates/index.md +++ b/docs/admin/templates/extending-templates/index.md @@ -18,7 +18,7 @@ The associated agent will facilitate port forwarding, and IDEs. The agent may also display real-time [workspace metadata](./agent-metadata.md) like resource usage. -```hcl +```terraform resource "coder_agent" "dev" { os = "linux" arch = "amd64" @@ -95,7 +95,7 @@ You can use these examples to add new Coder apps: ## code-server -```hcl +```terraform resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -109,7 +109,7 @@ resource "coder_app" "code-server" { ## Filebrowser -```hcl +```terraform resource "coder_app" "filebrowser" { agent_id = coder_agent.main.id display_name = "file browser" @@ -123,7 +123,7 @@ resource "coder_app" "filebrowser" { ## Zed -```hcl +```terraform resource "coder_app" "zed" { agent_id = coder_agent.main.id slug = "slug" @@ -168,7 +168,7 @@ on a scheduled basis. It provides more control than the deprecated ### Basic example -```hcl +```terraform resource "coder_script" "install_dependencies" { agent_id = coder_agent.main.id display_name = "Install Dependencies" @@ -209,7 +209,7 @@ internally. For example: You can also reference external script files: -```hcl +```terraform resource "coder_script" "init_docker" { agent_id = coder_agent.main.id display_name = "Initialize Docker" diff --git a/docs/admin/templates/extending-templates/jetbrains-preinstall.md b/docs/admin/templates/extending-templates/jetbrains-preinstall.md index 8043726cf1e64..d950cb7ed14d4 100644 --- a/docs/admin/templates/extending-templates/jetbrains-preinstall.md +++ b/docs/admin/templates/extending-templates/jetbrains-preinstall.md @@ -43,7 +43,7 @@ Add the following command to your template's `startup_script`: If you are using our [jetbrains-gateway](https://registry.coder.com/modules/coder/jetbrains-gateway) module, you can configure it by adding the following snippet to your template: -```hcl +```terraform module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" diff --git a/docs/admin/templates/extending-templates/modules.md b/docs/admin/templates/extending-templates/modules.md index b377a9cd321cb..00b417331b42c 100644 --- a/docs/admin/templates/extending-templates/modules.md +++ b/docs/admin/templates/extending-templates/modules.md @@ -8,7 +8,7 @@ You can store these modules externally from your Coder deployment, like in a git repository or a Terraform registry. This example shows how to reference a module from your template: -```hcl +```terraform data "coder_workspace" "me" {} module "coder-base" { diff --git a/docs/admin/templates/extending-templates/parameters.md b/docs/admin/templates/extending-templates/parameters.md index e9dbdf74fd79a..5f435cdaf0eea 100644 --- a/docs/admin/templates/extending-templates/parameters.md +++ b/docs/admin/templates/extending-templates/parameters.md @@ -14,7 +14,7 @@ parameters like instance size, geographical location, repository URL, etc. This example lets a developer choose a Docker host for the workspace: -```hcl +```terraform data "coder_parameter" "docker_host" { name = "Region" description = "Which region would you like to deploy to?" @@ -44,7 +44,7 @@ data "coder_parameter" "docker_host" { From there, a template can refer to a parameter's value: -```hcl +```terraform provider "docker" { host = data.coder_parameter.docker_host.value } @@ -64,7 +64,7 @@ JSON array and the Terraform [jsonencode](https://developer.hashicorp.com/terraform/language/functions/jsonencode) function. For example: -```hcl +```terraform data "coder_parameter" "security_groups" { name = "Security groups" icon = "/icon/aws.png" @@ -109,7 +109,7 @@ data "coder_parameter" "security_groups" { A `string` parameter can provide a set of options to limit the user's choices: -```hcl +```terraform data "coder_parameter" "docker_host" { name = "Region" description = "Which region would you like to deploy to?" @@ -171,7 +171,7 @@ Example: A parameter is _required_ if it doesn't have the `default` property. The user **must** provide a value to this parameter before creating a workspace: -```hcl +```terraform data "coder_parameter" "account_name" { name = "Account name" description = "Cloud account name" @@ -182,7 +182,7 @@ data "coder_parameter" "account_name" { If a parameter contains the `default` property, Coder will use this value if the user does not specify any: -```hcl +```terraform data "coder_parameter" "base_image" { name = "Base image" description = "Base machine image to download" @@ -193,7 +193,7 @@ data "coder_parameter" "base_image" { Admins can also set the `default` property to an empty value so that the parameter field can remain empty: -```hcl +```terraform data "coder_parameter" "dotfiles_url" { name = "dotfiles URL" description = "Git repository with dotfiles" @@ -215,7 +215,7 @@ resources like volumes, regions, and so on. Example: -```hcl +```terraform data "coder_parameter" "region" { name = "Region" description = "Region where the workspace is hosted" @@ -238,7 +238,7 @@ but do not persist after the workspace is stopped. Since these parameters are ephemeral in nature, subsequent builds proceed in the standard manner: -```hcl +```terraform data "coder_parameter" "force_rebuild" { name = "force_rebuild" type = "bool" @@ -262,7 +262,7 @@ You can also specify its monotonicity as `increasing` or `decreasing` to verify the current and new values. Use the `monotonic` attribute for resources that can't be shrunk or grown without implications, like disk volume size. -```hcl +```terraform data "coder_parameter" "instances" { name = "Instances" type = "number" @@ -279,7 +279,7 @@ It is possible to override the default `error` message for a `number` parameter, along with its associated `min` and/or `max` properties. The following message placeholders are available `{min}`, `{max}`, and `{value}`. -```hcl +```terraform data "coder_parameter" "instances" { name = "Instances" type = "number" @@ -303,7 +303,7 @@ data "coder_parameter" "instances" { You can validate a `string` parameter to match a regular expression. The `regex` property requires a corresponding `error` property. -```hcl +```terraform data "coder_parameter" "project_id" { name = "Project ID" description = "Alpha-numeric project ID" @@ -344,7 +344,7 @@ For a complete list of all available fields, see the
Expand for an example -```hcl +```terraform data "coder_workspace_preset" "goland-gpu" { name = "GoLand with GPU" description = "Development workspace with GPU acceleration for GoLand IDE" diff --git a/docs/admin/templates/extending-templates/prebuilt-workspaces.md b/docs/admin/templates/extending-templates/prebuilt-workspaces.md index 9be4e5fbe9c8a..21d722c246d53 100644 --- a/docs/admin/templates/extending-templates/prebuilt-workspaces.md +++ b/docs/admin/templates/extending-templates/prebuilt-workspaces.md @@ -123,7 +123,7 @@ This allows you to reduce resource costs during off-hours while maintaining avai Configure scheduling by adding a `scheduling` block within your `prebuilds` configuration: -```hcl +```terraform data "coder_workspace_preset" "goland" { name = "GoLand: Large" parameters { @@ -187,7 +187,7 @@ Cron expressions follow the format: `* HOUR DOM MONTH DAY-OF-WEEK` **Example schedules:** -```hcl +```terraform # Business hours only (8AM-6:59PM, Mon-Fri) schedule { cron = "* 8-18 * * 1-5" @@ -367,7 +367,7 @@ For example, when these values are used in immutable fields like the AWS instanc To prevent this, add a `lifecycle` block with `ignore_changes`: -```hcl +```terraform resource "docker_container" "workspace" { lifecycle { ignore_changes = [env, image] # include all fields which caused drift diff --git a/docs/admin/templates/extending-templates/process-priority.md b/docs/admin/templates/extending-templates/process-priority.md index 65d18d3519260..54d5a7af1c086 100644 --- a/docs/admin/templates/extending-templates/process-priority.md +++ b/docs/admin/templates/extending-templates/process-priority.md @@ -62,7 +62,7 @@ workloads. The following Kubernetes template snippet enables process priority management on the workspace container: -```hcl +```terraform resource "kubernetes_deployment" "workspace" { # ... other configuration diff --git a/docs/admin/templates/extending-templates/resource-metadata.md b/docs/admin/templates/extending-templates/resource-metadata.md index c98a8e6ed2e95..e825131e5174e 100644 --- a/docs/admin/templates/extending-templates/resource-metadata.md +++ b/docs/admin/templates/extending-templates/resource-metadata.md @@ -24,7 +24,7 @@ You can also present automatically updating, dynamic values with Expose the disk size, deployment name, and persistent directory in a Kubernetes template with: -```hcl +```terraform resource "kubernetes_persistent_volume_claim" "root" { ... } @@ -63,7 +63,7 @@ Some resources don't need to be exposed in the dashboard's UI. This helps keep the workspace view clean for developers. To hide a resource, use the `hide` attribute: -```hcl +```terraform resource "coder_metadata" "hide_serviceaccount" { count = data.coder_workspace.me.start_count resource_id = kubernetes_service_account.user_data.id @@ -80,7 +80,7 @@ resource "coder_metadata" "hide_serviceaccount" { To use custom icons for your resource metadata, use the `icon` attribute. It must be a valid path or URL. -```hcl +```terraform resource "coder_metadata" "resource_with_icon" { count = data.coder_workspace.me.start_count resource_id = kubernetes_service_account.user_data.id diff --git a/docs/admin/templates/extending-templates/resource-monitoring.md b/docs/admin/templates/extending-templates/resource-monitoring.md index 78ce1b61278e0..8e279ea95c156 100644 --- a/docs/admin/templates/extending-templates/resource-monitoring.md +++ b/docs/admin/templates/extending-templates/resource-monitoring.md @@ -23,7 +23,7 @@ Add the following example to the template's `main.tf`. Change the `90`, `80`, and `95` to a threshold that's more appropriate for your deployment: -```hcl +```terraform resource "coder_agent" "main" { arch = data.coder_provisioner.dev.arch os = data.coder_provisioner.dev.os diff --git a/docs/admin/templates/extending-templates/resource-ordering.md b/docs/admin/templates/extending-templates/resource-ordering.md index 00bf778b8b232..27a8f94d42ebd 100644 --- a/docs/admin/templates/extending-templates/resource-ordering.md +++ b/docs/admin/templates/extending-templates/resource-ordering.md @@ -16,7 +16,7 @@ The `order` property of `coder_parameter` resource allows specifying the order of parameters in UI forms. In the below example, `project_id` will appear _before_ `account_id`: -```hcl +```terraform data "coder_parameter" "project_id" { name = "project_id" display_name = "Project ID" @@ -37,7 +37,7 @@ data "coder_parameter" "account_id" { Agent resources within the UI left pane are sorted based on the `order` property, followed by `name`, ensuring a consistent and intuitive arrangement. -```hcl +```terraform resource "coder_agent" "primary" { ... @@ -59,7 +59,7 @@ The `coder_agent` exposes metadata to present operational metrics in the UI. Metrics defined with Terraform `metadata` blocks can be ordered using additional `order` property; otherwise, they are sorted by `key`. -```hcl +```terraform resource "coder_agent" "main" { ... @@ -107,7 +107,7 @@ workspace view. Only template defined applications can be arranged. _VS Code_ or _Terminal_ buttons are static. -```hcl +```terraform resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -135,7 +135,7 @@ The options for Coder parameters maintain the same order as in the file structure. This simplifies management and ensures consistency between configuration files and UI presentation. -```hcl +```terraform data "coder_parameter" "database_region" { name = "database_region" display_name = "Database Region" @@ -166,7 +166,7 @@ In cases where multiple item properties exist, the order is inherited from the file, facilitating seamless integration between a Coder template and UI presentation. -```hcl +```terraform resource "coder_metadata" "attached_volumes" { resource_id = docker_image.main.id diff --git a/docs/admin/templates/extending-templates/resource-persistence.md b/docs/admin/templates/extending-templates/resource-persistence.md index 03beef3c00e4a..13305c043fb9e 100644 --- a/docs/admin/templates/extending-templates/resource-persistence.md +++ b/docs/admin/templates/extending-templates/resource-persistence.md @@ -24,7 +24,7 @@ meta-argument. In this example, Coder will provision or tear down the `docker_container` resource: -```hcl +```terraform data "coder_workspace" "me" { } @@ -39,7 +39,7 @@ resource "docker_container" "workspace" { Take this example resource: -```hcl +```terraform data "coder_workspace" "me" { } @@ -59,7 +59,7 @@ To prevent this, use immutable IDs: You should also avoid using `coder_workspace.me.name` if your deployment allows workspace renaming via `CODER_ALLOW_WORKSPACE_RENAMES` or `--allow-workspace-renames`. -```hcl +```terraform data "coder_workspace" "me" { } @@ -80,7 +80,7 @@ You can prevent Terraform from recreating a resource under any circumstance by setting the [`ignore_changes = all` directive in the `lifecycle` block](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes). -```hcl +```terraform data "coder_workspace" "me" { } diff --git a/docs/admin/templates/extending-templates/variables.md b/docs/admin/templates/extending-templates/variables.md index f20693197fdab..d29d2897936fc 100644 --- a/docs/admin/templates/extending-templates/variables.md +++ b/docs/admin/templates/extending-templates/variables.md @@ -6,7 +6,7 @@ construction of customizable templates. Unlike parameters, which are primarily for workspace customization, template variables remain under the control of the template author, ensuring workspace users cannot modify them. -```hcl +```terraform variable "CLOUD_API_KEY" { type = string description = "API key for the service" diff --git a/docs/admin/templates/extending-templates/web-ides.md b/docs/admin/templates/extending-templates/web-ides.md index 58acbbb1d7cf9..c273095295629 100644 --- a/docs/admin/templates/extending-templates/web-ides.md +++ b/docs/admin/templates/extending-templates/web-ides.md @@ -5,7 +5,7 @@ In Coder, web IDEs are defined as resources in the template. With our generic model, any web application can be used as a Coder application. For example: -```hcl +```terraform # Add button to open Portainer in the workspace dashboard # Note: Portainer must be already running in the workspace resource "coder_app" "portainer" { @@ -35,7 +35,7 @@ cd your-template/ vim main.tf ``` -```hcl +```terraform resource "coder_agent" "main" { arch = "amd64" os = "linux" @@ -75,7 +75,7 @@ RUN code-server --install-extension eamodio.gitlens You'll also need to specify a `coder_app` resource related to the agent. This is how code-server is displayed on the workspace page. -```hcl +```terraform resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -156,7 +156,7 @@ To use Jupyter Notebook in your workspace, you can install it by using the [Jupyter Notebook module](https://registry.coder.com/modules/jupyter-notebook) from the Coder registry: -```hcl +```terraform module "jupyter-notebook" { source = "registry.coder.com/modules/jupyter-notebook/coder" version = "1.0.19" @@ -171,7 +171,7 @@ module "jupyter-notebook" { Configure your agent and `coder_app` like so to use Jupyter. Notice the `subdomain=true` configuration: -```hcl +```terraform data "coder_workspace" "me" {} resource "coder_agent" "coder" { @@ -203,7 +203,7 @@ resource "coder_app" "jupyter" { Or Alternatively, you can use the JupyterLab module from the Coder registry: -```hcl +```terraform module "jupyter" { source = "registry.coder.com/modules/jupyter-lab/coder" version = "1.0.0" @@ -225,7 +225,7 @@ value substitution to recreate the path structure. Configure your agent and `coder_app` like so to use RStudio. Notice the `subdomain=true` configuration: -```hcl +```terraform resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -272,7 +272,7 @@ community template example. Configure your agent and `coder_app` like so to use Airflow. Notice the `subdomain=true` configuration: -```hcl +```terraform resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -305,7 +305,7 @@ resource "coder_app" "airflow" { or use the [Airflow module](https://registry.coder.com/modules/apache-airflow) from the Coder registry: -```hcl +```terraform module "airflow" { source = "registry.coder.com/modules/airflow/coder" version = "1.0.13" @@ -323,7 +323,7 @@ manipulate files in a web browser. Show and manipulate the contents of the `/home/coder` directory in a browser. -```hcl +```terraform resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -358,7 +358,7 @@ Or alternatively, you can use the [`filebrowser`](https://registry.coder.com/modules/filebrowser) module from the Coder registry: -```hcl +```terraform module "filebrowser" { source = "registry.coder.com/modules/filebrowser/coder" version = "1.0.8" diff --git a/docs/admin/templates/extending-templates/workspace-tags.md b/docs/admin/templates/extending-templates/workspace-tags.md index 80fdae13da628..47960c362c421 100644 --- a/docs/admin/templates/extending-templates/workspace-tags.md +++ b/docs/admin/templates/extending-templates/workspace-tags.md @@ -14,7 +14,7 @@ can enable dynamic tag selection and modify static template tags. Here is a sample `coder_workspace_tags` data resource with a few workspace tags specified: -```hcl +```terraform data "coder_workspace_tags" "custom_workspace_tags" { tags = { "az" = var.az diff --git a/docs/admin/templates/managing-templates/change-management.md b/docs/admin/templates/managing-templates/change-management.md index 6b00b49cd4506..e985d21253150 100644 --- a/docs/admin/templates/managing-templates/change-management.md +++ b/docs/admin/templates/managing-templates/change-management.md @@ -16,7 +16,7 @@ pipelines. To run the provider in a CI/CD pipeline, and to prevent drift, you'll need to store the Terraform state [remotely](https://developer.hashicorp.com/terraform/language/backend). -```hcl +```terraform terraform { required_providers { coderd = { diff --git a/docs/admin/templates/managing-templates/dependencies.md b/docs/admin/templates/managing-templates/dependencies.md index 7be5b19a3297c..80d80da679364 100644 --- a/docs/admin/templates/managing-templates/dependencies.md +++ b/docs/admin/templates/managing-templates/dependencies.md @@ -26,7 +26,7 @@ If you add a Terraform provider to `required_providers` without specifying a version requirement, Terraform will always fetch the latest version on each invocation: -```hcl +```terraform terraform { required_providers { coder = { @@ -47,7 +47,7 @@ To prevent this, add a [version constraint](https://developer.hashicorp.com/terraform/language/expressions/version-constraints) to each provider in the `required_providers` block: -```hcl +```terraform terraform { required_providers { coder = { @@ -69,7 +69,7 @@ provider will be limited to all versions matching `1.0.x`. The above also applies to Terraform modules. In the below example, the module `razzledazzle` is locked to version `1.2.3`. -```hcl +```terraform module "razzledazzle" { source = "registry.example.com/modules/razzle/dazzle" version = "1.2.3" diff --git a/docs/admin/templates/open-in-coder.md b/docs/admin/templates/open-in-coder.md index b2ca526b06a1e..c0f03b76a8be0 100644 --- a/docs/admin/templates/open-in-coder.md +++ b/docs/admin/templates/open-in-coder.md @@ -25,7 +25,7 @@ The id in the template's `coder_external_auth` data source must match the If you want the template to clone a specific git repo: -```hcl +```terraform # Require external authentication to use this template data "coder_external_auth" "github" { id = "primary-github" @@ -56,7 +56,7 @@ resource "coder_agent" "dev" { If you want the template to support any repository via [parameters](./extending-templates/parameters.md) -```hcl +```terraform # Require external authentication to use this template data "coder_external_auth" "github" { id = "primary-github" diff --git a/docs/admin/templates/startup-coordination/example.md b/docs/admin/templates/startup-coordination/example.md index c56aae66c409e..c9af9974278d7 100644 --- a/docs/admin/templates/startup-coordination/example.md +++ b/docs/admin/templates/startup-coordination/example.md @@ -81,7 +81,7 @@ We've omitted some details (such as persistent storage) for brevity, but these a ### Before -```hcl +```terraform data "coder_provisioner" "me" {} data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} @@ -139,7 +139,7 @@ Based on the above, we can improve both the startup time and reliability of the Here is the updated version of the template: -```hcl +```terraform data "coder_provisioner" "me" {} data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} diff --git a/docs/admin/templates/startup-coordination/usage.md b/docs/admin/templates/startup-coordination/usage.md index 694ed694c55c8..14d257127991f 100644 --- a/docs/admin/templates/startup-coordination/usage.md +++ b/docs/admin/templates/startup-coordination/usage.md @@ -173,7 +173,7 @@ ensure that your unit does not conflict with others. Add comments explaining why dependencies exist: -```hcl +```terraform resource "coder_script" "ide_setup" { # Depends on git-clone because we need .vscode/extensions.json # Depends on env-setup because we need $NODE_PATH configured diff --git a/docs/admin/users/idp-sync.md b/docs/admin/users/idp-sync.md index 87c93b37564ee..e204ed0d6c09e 100644 --- a/docs/admin/users/idp-sync.md +++ b/docs/admin/users/idp-sync.md @@ -454,7 +454,7 @@ If you enable this, your OIDC provider might be sending over many unnecessary groups. Use filtering options on the OIDC provider to limit the groups sent over to prevent creating excess groups. -```text +```dotenv # as an environment variable CODER_OIDC_GROUP_AUTO_CREATE=true ``` @@ -471,7 +471,7 @@ want to filter out groups that do not match a certain pattern. For example, if you want to only allow groups that start with `my-group-` to be created, you can set the following environment variable. -```text +```dotenv # as an environment variable CODER_OIDC_GROUP_REGEX_FILTER="^my-group-.*$" ``` diff --git a/docs/admin/users/oidc-auth/google.md b/docs/admin/users/oidc-auth/google.md index e1e99e321981f..95f3c7ac2c250 100644 --- a/docs/admin/users/oidc-auth/google.md +++ b/docs/admin/users/oidc-auth/google.md @@ -19,7 +19,7 @@ This guide shows how to configure Coder to authenticate users with Google using Set the following environment variables on your Coder deployment and restart Coder: -```text +```dotenv CODER_OIDC_ISSUER_URL=https://accounts.google.com CODER_OIDC_CLIENT_ID= CODER_OIDC_CLIENT_SECRET= @@ -39,7 +39,7 @@ CODER_OIDC_ICON_URL=/icon/google.svg Google uses auth URL parameters to issue refresh tokens. Configure: -```text +```dotenv # Keep standard scopes CODER_OIDC_SCOPES=openid,profile,email # Add Google-specific auth URL params diff --git a/docs/admin/users/oidc-auth/index.md b/docs/admin/users/oidc-auth/index.md index 6180b9f95af4b..d62a4d06ea937 100644 --- a/docs/admin/users/oidc-auth/index.md +++ b/docs/admin/users/oidc-auth/index.md @@ -13,7 +13,7 @@ Your OIDC provider will ask you for the following parameter: Set the following environment variables on your Coder deployment and restart Coder: -```text +```dotenv CODER_OIDC_ISSUER_URL="https://issuer.corp.com" CODER_OIDC_EMAIL_DOMAIN="your-domain-1,your-domain-2" CODER_OIDC_CLIENT_ID="533...des" @@ -57,7 +57,7 @@ Coder requires all OIDC email addresses to be verified by default. If the provider, Coder will validate that its value is `true`. If needed, you can disable this behavior with the following setting: -```text +```dotenv CODER_OIDC_IGNORE_EMAIL_VERIFIED=true ``` @@ -84,7 +84,7 @@ If your upstream identity provider uses a different claim, you can set If you'd like to change the OpenID Connect button text and/or icon, you can configure them like so: -```text +```dotenv CODER_OIDC_SIGN_IN_TEXT="Sign in with Gitea" CODER_OIDC_ICON_URL=https://gitea.io/images/gitea.png ``` @@ -130,7 +130,7 @@ The general steps to configure persistent user sessions are: To remove email and password login, set the following environment variable on your Coder deployment: -```text +```dotenv CODER_DISABLE_PASSWORD_AUTH=true ``` @@ -157,7 +157,7 @@ authentication. Upon deactivation, users are [Configure](../../setup/index.md) your SCIM application with an auth key and supply it the Coder server. -```text +```dotenv CODER_SCIM_AUTH_HEADER="your-api-key" ``` @@ -166,7 +166,7 @@ CODER_SCIM_AUTH_HEADER="your-api-key" If your OpenID Connect provider requires client TLS certificates for authentication, you can configure them like so: -```text +```dotenv CODER_TLS_CLIENT_CERT_FILE=/path/to/cert.pem CODER_TLS_CLIENT_KEY_FILE=/path/to/key.pem ``` diff --git a/docs/admin/users/oidc-auth/microsoft.md b/docs/admin/users/oidc-auth/microsoft.md index f91ddd784c37d..2fae3fbc4643a 100644 --- a/docs/admin/users/oidc-auth/microsoft.md +++ b/docs/admin/users/oidc-auth/microsoft.md @@ -24,7 +24,7 @@ This guide shows how to configure Coder to authenticate users with Microsoft Ent Set the following environment variables on your Coder deployment and restart Coder: -```text +```dotenv CODER_OIDC_ISSUER_URL=https://login.microsoftonline.com/{tenant-id}/v2.0 # Replace {tenant-id} with your Azure tenant ID CODER_OIDC_CLIENT_ID= CODER_OIDC_CLIENT_SECRET= @@ -42,7 +42,7 @@ CODER_OIDC_ICON_URL=/icon/microsoft.svg ## Enable refresh tokens (recommended) -```text +```dotenv # Keep standard scopes CODER_OIDC_SCOPES=openid,profile,email,offline_access ``` diff --git a/docs/admin/users/oidc-auth/refresh-tokens.md b/docs/admin/users/oidc-auth/refresh-tokens.md index a64e4c464409d..369b30788024b 100644 --- a/docs/admin/users/oidc-auth/refresh-tokens.md +++ b/docs/admin/users/oidc-auth/refresh-tokens.md @@ -60,7 +60,7 @@ Without this, users will be logged out when their access token expires. In your [Coder configuration](../../../reference/cli/server.md#--oidc-auth-url-params): -```text +```dotenv CODER_OIDC_SCOPES=openid,profile,email CODER_OIDC_AUTH_URL_PARAMS='{"access_type": "offline", "prompt": "consent"}' ``` @@ -76,7 +76,7 @@ including the ability to refresh access tokens without requiring the user to rea Add the `offline_access` scope to enable refresh tokens in your [Coder configuration](../../../reference/cli/server.md#--oidc-auth-url-params): -```text +```dotenv CODER_OIDC_SCOPES=openid,profile,email,offline_access CODER_OIDC_AUTH_URL_PARAMS='{"access_type":"offline"}' ``` diff --git a/docs/admin/users/quotas.md b/docs/admin/users/quotas.md index dd2c8a62bd51d..95d10a893c14e 100644 --- a/docs/admin/users/quotas.md +++ b/docs/admin/users/quotas.md @@ -29,7 +29,7 @@ quota than an online workspace. A common use case is separating costs for a persistent volume and ephemeral compute: -```hcl +```terraform resource "docker_volume" "home_volume" { name = "coder-${data.coder_workspace_owner.me.name}-${data.coder_workspace.me.name}-root" } diff --git a/docs/ai-coder/agent-firewall/index.md b/docs/ai-coder/agent-firewall/index.md index 63396f2c16bf9..dc53cabd9aa6d 100644 --- a/docs/ai-coder/agent-firewall/index.md +++ b/docs/ai-coder/agent-firewall/index.md @@ -45,7 +45,7 @@ maintain allow lists and share detailed policies with teammates. In your Terraform module, install Agent Firewall with minimal configuration: -```hcl +```terraform module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" @@ -55,7 +55,7 @@ module "agent-firewall" { To use a custom policy, pass it inline via `agent_firewall_config`, below is an example of minimal configuration for Claude Code module: -```hcl +```terraform module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" @@ -93,7 +93,7 @@ launches Agent Firewall manually inside the workspace picks up the same configuration without extra flags. This is especially convenient for managing extensive allow lists in version control. -```hcl +```terraform module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" diff --git a/docs/ai-coder/agent-firewall/nsjail/ecs.md b/docs/ai-coder/agent-firewall/nsjail/ecs.md index 257136f37db79..8e49226d9110d 100644 --- a/docs/ai-coder/agent-firewall/nsjail/ecs.md +++ b/docs/ai-coder/agent-firewall/nsjail/ecs.md @@ -26,7 +26,7 @@ with `NET_ADMIN`) so that Agent Firewall can create namespaces and run nsjail. **Task definition (Terraform) — `linuxParameters`:** -```hcl +```terraform container_definitions = jsonencode([{ name = "coder-agent" image = "your-coder-agent-image" diff --git a/docs/ai-coder/agent-firewall/nsjail/k8s.md b/docs/ai-coder/agent-firewall/nsjail/k8s.md index 0dd2eee0fcffe..c4dbc851c7a0f 100644 --- a/docs/ai-coder/agent-firewall/nsjail/k8s.md +++ b/docs/ai-coder/agent-firewall/nsjail/k8s.md @@ -108,7 +108,7 @@ sysctl -w user.max_user_namespaces=65536 If `sysctl -w` is not allowed, configure it via Bottlerocket bootstrap settings when creating the node group (e.g., in Terraform): -```hcl +```terraform bootstrap_extra_args = <<-EOT [settings.kernel.sysctl] "user.max_user_namespaces" = "65536" diff --git a/docs/ai-coder/agent-firewall/version.md b/docs/ai-coder/agent-firewall/version.md index 2ea492eb616a1..cec7ddda17496 100644 --- a/docs/ai-coder/agent-firewall/version.md +++ b/docs/ai-coder/agent-firewall/version.md @@ -36,7 +36,7 @@ this case, you need to: Example configuration: -```hcl +```terraform module "claude-code" { source = "dev.registry.coder.com/coder/claude-code/coder" version = "4.7.0" @@ -52,7 +52,7 @@ If you're using Claude Code module before v4.7.0, the module expects to use Agent Firewall directly. You need to explicitly set `boundary_version` in your Terraform configuration: -```hcl +```terraform module "claude-code" { source = "dev.registry.coder.com/coder/claude-code/coder" version = "4.6.0" diff --git a/docs/ai-coder/agents/platform-controls/git-providers.md b/docs/ai-coder/agents/platform-controls/git-providers.md index 8d4b6a2eeb260..df4160d7713da 100644 --- a/docs/ai-coder/agents/platform-controls/git-providers.md +++ b/docs/ai-coder/agents/platform-controls/git-providers.md @@ -13,7 +13,7 @@ For public `github.com`, no additional configuration is needed. For self-hosted GitHub Enterprise, add `API_BASE_URL` to your [existing configuration](../../../admin/external-auth/index.md#github-enterprise): -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-github" CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -45,7 +45,7 @@ The default GitLab scopes (`read_user`) are sufficient for basic authentication. To use merge request features (diffs, status checks) with Coder Agents, configure: -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-gitlab" CODER_EXTERNAL_AUTH_0_TYPE=gitlab CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx @@ -62,7 +62,7 @@ pushing commits and creating merge requests. For self-hosted GitLab, set `AUTH_URL` and `TOKEN_URL` to your instance. Coder derives `API_BASE_URL` automatically from `AUTH_URL`: -```text +```dotenv CODER_EXTERNAL_AUTH_0_ID="primary-gitlab" CODER_EXTERNAL_AUTH_0_TYPE=gitlab CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx diff --git a/docs/ai-coder/agents/platform-controls/template-optimization.md b/docs/ai-coder/agents/platform-controls/template-optimization.md index 0f77b6fa108c9..da79087caa8e4 100644 --- a/docs/ai-coder/agents/platform-controls/template-optimization.md +++ b/docs/ai-coder/agents/platform-controls/template-optimization.md @@ -236,7 +236,7 @@ The agent reads `display_name` and `description` fields to understand what a parameter controls. Treat these the same way you treat template descriptions — be specific and use natural language. -```hcl +```terraform data "coder_parameter" "region" { name = "region" display_name = "Deployment Region" @@ -288,7 +288,7 @@ For guidance on building and maintaining workspace images, see If the template targets a specific repository, pre-clone it and set the working directory so the agent starts in the right place: -```hcl +```terraform resource "coder_agent" "main" { os = "linux" arch = "amd64" diff --git a/docs/ai-coder/ai-gateway/clients/claude-code.md b/docs/ai-coder/ai-gateway/clients/claude-code.md index 667f04b715d7b..e2ca35467adbc 100644 --- a/docs/ai-coder/ai-gateway/clients/claude-code.md +++ b/docs/ai-coder/ai-gateway/clients/claude-code.md @@ -53,7 +53,7 @@ account. Template admins can pre-configure Claude Code for a seamless experience. Admins can automatically inject the user's Coder session token and the AI Gateway base URL into the workspace environment. -```hcl +```terraform module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" version = "4.7.3" @@ -67,7 +67,7 @@ module "claude-code" { [Coder Tasks](../../tasks.md) provides a framework for agents to complete background development operations autonomously. Claude Code can be configured in your Tasks automatically: -```hcl +```terraform resource "coder_ai_task" "task" { count = data.coder_workspace.me.start_count app_id = module.claude-code.task_app_id diff --git a/docs/ai-coder/ai-gateway/clients/codex.md b/docs/ai-coder/ai-gateway/clients/codex.md index df59eee7e4e17..186ced1d6f379 100644 --- a/docs/ai-coder/ai-gateway/clients/codex.md +++ b/docs/ai-coder/ai-gateway/clients/codex.md @@ -96,7 +96,7 @@ If configuring within a Coder workspace, you can use the For the centralized API key flow, set `enable_ai_gateway`: -```hcl +```terraform module "codex" { source = "registry.coder.com/coder-labs/codex/coder" version = "~> 5.0" @@ -111,7 +111,7 @@ through `base_config_toml` and inject the Coder API token with a `coder_env` resource. Users authenticate by running `codex login` with their ChatGPT account: -```hcl +```terraform resource "coder_env" "coder_api_token" { agent_id = coder_agent.main.id name = "CODER_API_TOKEN" diff --git a/docs/ai-coder/ai-gateway/clients/index.md b/docs/ai-coder/ai-gateway/clients/index.md index 300c2b3132bb2..9d3fe219f6f1d 100644 --- a/docs/ai-coder/ai-gateway/clients/index.md +++ b/docs/ai-coder/ai-gateway/clients/index.md @@ -68,7 +68,7 @@ While users can manually configure these tools with a long-lived API key, templa In this example, Claude Code respects these environment variables and will route all requests via AI Gateway. -```hcl +```terraform data "coder_workspace_owner" "me" {} data "coder_workspace" "me" {} diff --git a/docs/ai-coder/ai-gateway/clients/mux.md b/docs/ai-coder/ai-gateway/clients/mux.md index 8d6f49a6fc736..90c1258179253 100644 --- a/docs/ai-coder/ai-gateway/clients/mux.md +++ b/docs/ai-coder/ai-gateway/clients/mux.md @@ -59,7 +59,7 @@ export ANTHROPIC_BASE_URL="https://coder.example.com/api/v2/ai-gateway/anthropic If you want to run Mux inside a Coder workspace (for example, as a Coder app), you can install it with the [Mux module](https://registry.coder.com/modules/coder/mux) and pre-configure AI Gateway via environment variables on the agent: -```hcl +```terraform data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} diff --git a/docs/ai-coder/ai-gateway/mcp.md b/docs/ai-coder/ai-gateway/mcp.md index 0ffa362d07132..cc002ed24d54b 100644 --- a/docs/ai-coder/ai-gateway/mcp.md +++ b/docs/ai-coder/ai-gateway/mcp.md @@ -38,7 +38,7 @@ See the diagram in [Implementation Details](./reference.md#implementation-detail You can also control which tools are injected by using an allow and/or a deny regular expression on the tool names: -```text +```dotenv CODER_EXTERNAL_AUTH_0_MCP_TOOL_ALLOW_REGEX=(.+_gist.*) CODER_EXTERNAL_AUTH_0_MCP_TOOL_DENY_REGEX=(create_gist) ``` diff --git a/docs/ai-coder/custom-agents.md b/docs/ai-coder/custom-agents.md index ab3a262618d94..aefd551762e80 100644 --- a/docs/ai-coder/custom-agents.md +++ b/docs/ai-coder/custom-agents.md @@ -47,7 +47,7 @@ persistence on the agentapi module. Set `enable_state_persistence = true` so that AgentAPI saves and restores conversation history across pause and resume cycles: -```hcl +```terraform module "agentapi" { source = "registry.coder.com/coder/agentapi/coder" version = ">= 2.2.0" diff --git a/docs/ai-coder/github-to-tasks.md b/docs/ai-coder/github-to-tasks.md index 18208c7c9f80c..4d99b6986da08 100644 --- a/docs/ai-coder/github-to-tasks.md +++ b/docs/ai-coder/github-to-tasks.md @@ -110,7 +110,7 @@ You can also choose to modify the other [input parameters](https://github.com/co If your prompt uses the GitHub CLI `gh`, your template must pass the user's GitHub token to the agent. Add this to your template's Terraform: -```hcl +```terraform data "coder_external_auth" "github" { id = "github" # Must match your CODER_EXTERNAL_AUTH_0_ID } diff --git a/docs/ai-coder/tasks-core-principles.md b/docs/ai-coder/tasks-core-principles.md index 771680cb8f04f..c9d091f7046fc 100644 --- a/docs/ai-coder/tasks-core-principles.md +++ b/docs/ai-coder/tasks-core-principles.md @@ -66,7 +66,7 @@ The following code snippet can be dropped into any existing template in Coder v2 > [!NOTE] > This requires at least version 2.13.0 of the `coder/coder` Terraform provider. -```hcl +```terraform data "coder_parameter" "setup_script" { name = "setup_script" display_name = "Setup Script" diff --git a/docs/ai-coder/tasks-lifecycle.md b/docs/ai-coder/tasks-lifecycle.md index a4243c7759cac..bb37b2fd4bb71 100644 --- a/docs/ai-coder/tasks-lifecycle.md +++ b/docs/ai-coder/tasks-lifecycle.md @@ -108,7 +108,7 @@ version that includes this support. For Claude Code, update the module version in your template: -```hcl +```terraform module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" version = ">= 4.8.0" # Minimum version with pause/resume support @@ -160,7 +160,7 @@ modules performing cleanup. **Docker**: Add to your `docker_container` resource: -```hcl +```terraform resource "docker_container" "workspace" { # Both attributes are needed for graceful shutdown. destroy_grace_seconds = 300 # 5 minutes @@ -172,7 +172,7 @@ resource "docker_container" "workspace" { **Kubernetes**: Add to your `kubernetes_pod` resource: -```hcl +```terraform resource "kubernetes_pod" "main" { timeouts { delete = "6m" # Must exceed the grace period below. diff --git a/docs/ai-coder/tasks-migration.md b/docs/ai-coder/tasks-migration.md index b833e6e6ff95b..468e808701e90 100644 --- a/docs/ai-coder/tasks-migration.md +++ b/docs/ai-coder/tasks-migration.md @@ -72,7 +72,7 @@ resource "coder_ai_task" "task" { Below is a minimal illustrative example of a Coder Tasks template pre-2.28.0. **Note that this is NOT a full template.** -```hcl +```terraform terraform { required_providers { coder = { @@ -128,7 +128,7 @@ In v2.28 and above, the following changes were made: Example (**not** a full template): -```hcl +```terraform terraform { required_providers { coder = { diff --git a/docs/ai-coder/tasks.md b/docs/ai-coder/tasks.md index 93a1350e5b3bf..e10ef7fc6577e 100644 --- a/docs/ai-coder/tasks.md +++ b/docs/ai-coder/tasks.md @@ -63,7 +63,7 @@ A template becomes a Task-capable template if it defines a `coder_ai_task` resou > [!NOTE] > The `coder_ai_task` resource is not defined within the [Claude Code Module](https://registry.coder.com/modules/coder/claude-code?tab=readme). You need to define it yourself. -```hcl +```terraform terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/add-a-language.md b/docs/get-started/customize-your-template/add-a-language.md index 38e1774a48824..3562c178349e8 100644 --- a/docs/get-started/customize-your-template/add-a-language.md +++ b/docs/get-started/customize-your-template/add-a-language.md @@ -22,7 +22,7 @@ A parameter is a question Coder asks when someone creates a workspace. Each parameter comes from a `coder_parameter` [data source](https://developer.hashicorp.com/terraform/language/data-sources) in the template. The **Programming Languages** parameter is a multi-select list, and each language the reader can choose is an `option` block: -```hcl +```terraform data "coder_parameter" "languages" { name = "languages" display_name = "Programming Languages" @@ -54,7 +54,7 @@ Adding an `option` adds a choice to that list. In `main.tf`, find the `data "coder_parameter" "languages"` block. Add a Ruby `option` after the last existing option, before the parameter's closing brace: -```hcl +```terraform option { name = "Ruby" value = "ruby" @@ -203,7 +203,7 @@ The shipped presets cover combinations like Go and Python, but none selects Ruby In `main.tf`, find the `# --- Presets ---` section and add a Ruby preset next to the existing ones: -```hcl +```terraform data "coder_workspace_preset" "ruby_dev" { name = "Ruby Development" icon = "/icon/ruby.svg" @@ -292,7 +292,7 @@ Your template files after this guide's changes, starting from the Quickstart tem ### main.tf -```hcl +```terraform terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/authenticate-to-github.md b/docs/get-started/customize-your-template/authenticate-to-github.md index 3cf4d2d521065..cdeef7901110e 100644 --- a/docs/get-started/customize-your-template/authenticate-to-github.md +++ b/docs/get-started/customize-your-template/authenticate-to-github.md @@ -36,7 +36,7 @@ The `id` points at a provider configured on the Coder deployment, and the local Add this `coder_external_auth` block to `main.tf`: -```hcl +```terraform data "coder_external_auth" "github" { id = "github" } @@ -140,7 +140,7 @@ Both are data sources, and neither creates infrastructure. Your `main.tf` after this guide's changes, starting from the Quickstart template: -```hcl +```terraform terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/index.md b/docs/get-started/customize-your-template/index.md index ab5fba8d8c8f3..1fe055141e621 100644 --- a/docs/get-started/customize-your-template/index.md +++ b/docs/get-started/customize-your-template/index.md @@ -29,7 +29,7 @@ It consists of one or more Terraform files (`*.tf`), and it can include template Every Coder template declares the `coder` provider inside a `required_providers` block: -```hcl +```terraform terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/install-command-line-tools.md b/docs/get-started/customize-your-template/install-command-line-tools.md index 4a121c7879517..0989270aac22c 100644 --- a/docs/get-started/customize-your-template/install-command-line-tools.md +++ b/docs/get-started/customize-your-template/install-command-line-tools.md @@ -186,7 +186,7 @@ The volume backs `/home/linuxbrew`, the prefix where Homebrew installs, so Homeb In `main.tf`, add a volume for Homebrew's directory next to the existing `home_volume`: -```hcl +```terraform resource "docker_volume" "homebrew_volume" { name = "coder-${data.coder_workspace.me.id}-homebrew" lifecycle { @@ -197,7 +197,7 @@ resource "docker_volume" "homebrew_volume" { Then mount it in the `docker_container "workspace"` resource, alongside the block that mounts `/home/coder`: -```hcl +```terraform volumes { container_path = "/home/linuxbrew" volume_name = docker_volume.homebrew_volume.name @@ -267,7 +267,7 @@ It installs prebuilt binaries into `/home/coder`, which already persists, so the In `main.tf`, add a script next to the existing `install_languages` resource: -```hcl +```terraform resource "coder_script" "install_tools" { agent_id = coder_agent.main.id display_name = "Install Tools" @@ -335,7 +335,7 @@ This approach relies on the `/home/linuxbrew` volume you added in Step 4, so Hom Use this `install_tools` script in place of the mise version: -```hcl +```terraform resource "coder_script" "install_tools" { agent_id = coder_agent.main.id display_name = "Install Tools" @@ -395,7 +395,7 @@ Refer to [Resource persistence](../../admin/templates/extending-templates/resour Your `main.tf` after this guide's changes, starting from the Quickstart template: -```hcl +```terraform terraform { required_providers { coder = { diff --git a/docs/install/airgap.md b/docs/install/airgap.md index bbd681c71922e..bcce996000a00 100644 --- a/docs/install/airgap.md +++ b/docs/install/airgap.md @@ -118,7 +118,7 @@ ENV TF_CLI_CONFIG_FILE=/home/coder/.terraformrc > [example templates](../../examples/templates) > you intend to use. -```hcl +```terraform # filesystem-mirror-example.tfrc provider_installation { filesystem_mirror { @@ -127,7 +127,7 @@ provider_installation { } ``` -```hcl +```terraform # network-mirror-example.tfrc provider_installation { network_mirror { diff --git a/docs/install/registry-mirror-artifactory.md b/docs/install/registry-mirror-artifactory.md index dcb369b79b6e8..fe68f156cb672 100644 --- a/docs/install/registry-mirror-artifactory.md +++ b/docs/install/registry-mirror-artifactory.md @@ -51,7 +51,7 @@ Create or update your Terraform CLI configuration file to use Artifactory. On Linux/macOS, create `~/.terraformrc`. On Windows, create `%APPDATA%\terraform.rc`. -```hcl +```terraform host "" { services = { "modules.v1" = "https:///artifactory/api/terraform/coder-registry/v1/modules/" @@ -79,7 +79,7 @@ Replace: Update your Coder templates to use Artifactory instead of the public registry: -```hcl +```terraform # Before: Direct from Coder registry module "code-server" { source = "registry.coder.com/coder/code-server/coder" @@ -170,7 +170,7 @@ The Artifactory mirror supports all namespaces from the Coder registry: All modules use the same source format: -```hcl +```terraform source = "///coder" ``` diff --git a/docs/tutorials/cloning-git-repositories.md b/docs/tutorials/cloning-git-repositories.md index f3667abf64ec5..5d6cdd84c1a10 100644 --- a/docs/tutorials/cloning-git-repositories.md +++ b/docs/tutorials/cloning-git-repositories.md @@ -29,7 +29,7 @@ With the authentication in place, it is time to set up the template to use the [Coder Registry](https://registry.coder.com/) by adding it to our template's Terraform configuration. -```hcl +```terraform module "git-clone" { source = "registry.coder.com/modules/git-clone/coder" version = "1.0.12" @@ -47,7 +47,7 @@ You can also use customize the Git URL and make it dynamic for use cases where a template supports multiple projects. -```hcl +```terraform data "coder_parameter" "git_repo" { name = "git_repo" display_name = "Git repository" diff --git a/docs/tutorials/faqs.md b/docs/tutorials/faqs.md index b938760984108..e71b2cb6886ea 100644 --- a/docs/tutorials/faqs.md +++ b/docs/tutorials/faqs.md @@ -107,7 +107,7 @@ default (shows all), add this block inside the [`coder_agent`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent) of a template and configure as needed: -```hcl +```terraform display_apps { vscode = false vscode_insiders = false @@ -143,7 +143,7 @@ In the template, set option to `authenticated` and when a workspace is built with this template, the pretty globe shows up next to path-based `code-server`: -```hcl +```terraform resource "coder_app" "code-server" { ... share = "authenticated" @@ -292,7 +292,7 @@ One way is to reference a Terraform module from a GitHub repo to avoid duplication and then just extend it or pass template-specific parameters/resources: -```hcl +```terraform # template1/main.tf module "central-coder-module" { source = "github.com/org/central-coder-module" @@ -303,7 +303,7 @@ resource "ebs_volume" "custom_template1_only_resource" { } ``` -```hcl +```terraform # template2/main.tf module "central-coder-module" { source = "github.com/org/central-coder-module" @@ -350,7 +350,7 @@ duplicate name errors. This code produces a hashed value that will be difficult to replicate. -```hcl +```terraform locals { concatenated_string = "${data.coder_workspace.me.name}+${data.coder_workspace_owner.me.name}" hashed_string = md5(local.concatenated_string) @@ -538,7 +538,7 @@ To achieve this, template admins can use the environment variable This variable allows the system to check if the executed application is on the block list, which includes `scp`, `rsync`, `ftp`, and `nc`. -```hcl +```terraform resource "docker_container" "workspace" { ... env = [ diff --git a/docs/tutorials/gcp-to-aws.md b/docs/tutorials/gcp-to-aws.md index bd196d3679f62..652468d9b6938 100644 --- a/docs/tutorials/gcp-to-aws.md +++ b/docs/tutorials/gcp-to-aws.md @@ -169,7 +169,7 @@ coder: Navigate to your EC2 workspace template in Coder, and configure the AWS provider using the block below: -```hcl +```terraform provider "aws" { assume_role_with_web_identity { # enter role ARN here - copy from AWS console diff --git a/docs/tutorials/image-pull-secret.md b/docs/tutorials/image-pull-secret.md index 52673d09297e9..e3e29aebbd39f 100644 --- a/docs/tutorials/image-pull-secret.md +++ b/docs/tutorials/image-pull-secret.md @@ -70,7 +70,7 @@ template. In the example below, we define the secret via the `image_pull_secrets` argument. Note that this argument is nested at the same level as the `container` argument: -```hcl +```terraform resource "kubernetes_pod" "dev" { metadata { # this must be the same namespace where workspaces will be deployed diff --git a/docs/tutorials/template-from-scratch.md b/docs/tutorials/template-from-scratch.md index e319fb55448ac..b62beaaee29e3 100644 --- a/docs/tutorials/template-from-scratch.md +++ b/docs/tutorials/template-from-scratch.md @@ -79,7 +79,7 @@ Edit the Terraform `main.tf` file to provision the workspace's resources. Start by setting up the providers. At a minimum, we need the `coder` provider. For this template, we also need the `docker` provider: -```hcl +```terraform terraform { required_providers { coder = { @@ -137,7 +137,7 @@ needs `curl` access to the Coder server. Add this snippet after the last closing `}` in `main.tf` to create the agent: -```hcl +```terraform resource "coder_agent" "main" { arch = data.coder_provisioner.me.arch os = "linux" @@ -220,7 +220,7 @@ We installed code-server in the `startup_script` argument. To add code-server to the workspace, make it available in the workspace with a `coder_app` resource. See [web IDEs](../user-guides/workspace-access/web-ides.md) for more examples: -```hcl +```terraform resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -241,7 +241,7 @@ resource "coder_app" "code-server" { You can also use a `coder_app` resource to link to external apps, such as links to wikis or cloud consoles: -```hcl +```terraform resource "coder_app" "coder-server-doc" { agent_id = coder_agent.main.id icon = "/emojis/1f4dd.png" @@ -271,7 +271,7 @@ Later, we use the Terraform [count](https://developer.hashicorp.com/terraform/language/meta-arguments/count) meta-argument to make sure that our Docker container is ephemeral. -```hcl +```terraform resource "docker_volume" "home_volume" { name = "coder-${data.coder_workspace.me.id}-home" # Protect the volume from being deleted due to changes in attributes. @@ -289,7 +289,7 @@ For details, see To set up our Docker container, our template has a `docker_image` resource that uses `build/Dockerfile`, which we created earlier: -```hcl +```terraform resource "docker_image" "main" { name = "coder-${data.coder_workspace.me.id}" build { @@ -307,7 +307,7 @@ resource "docker_image" "main" { Our `docker_container` resource uses `coder_workspace` `start_count` to start and stop the Docker container: -```hcl +```terraform resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = docker_image.main.name diff --git a/docs/user-guides/workspace-access/antigravity.md b/docs/user-guides/workspace-access/antigravity.md index 27d6cb3fc35fe..ae4872e92c1c1 100644 --- a/docs/user-guides/workspace-access/antigravity.md +++ b/docs/user-guides/workspace-access/antigravity.md @@ -57,7 +57,7 @@ Your Coder administrator can add Antigravity as a one-click workspace app using the [Antigravity module](https://registry.coder.com/modules/coder/antigravity) from the Coder registry: -```hcl +```terraform module "antigravity" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/antigravity/coder" diff --git a/docs/user-guides/workspace-access/port-forwarding.md b/docs/user-guides/workspace-access/port-forwarding.md index ef64990c9b76a..04d40a86852bf 100644 --- a/docs/user-guides/workspace-access/port-forwarding.md +++ b/docs/user-guides/workspace-access/port-forwarding.md @@ -75,7 +75,7 @@ workspace's template. This approach shows a visual application icon in the dashboard. See the following `coder_app` example for a Node React app and note the `subdomain` and `share` settings: -```hcl +```terraform # node app resource "coder_app" "node-react-app" { agent_id = coder_agent.dev.id diff --git a/docs/user-guides/workspace-access/remote-desktops.md b/docs/user-guides/workspace-access/remote-desktops.md index 35fee4b4de39b..bc972cddd6cc2 100644 --- a/docs/user-guides/workspace-access/remote-desktops.md +++ b/docs/user-guides/workspace-access/remote-desktops.md @@ -38,7 +38,7 @@ coder://coder.example.com/v0/open/ws/myworkspace/agent/main/rdp?username=Adminis To include a Coder Desktop button on the workspace dashboard page, add a `coder_app` resource to the template: -```hcl +```terraform locals { server_name = regex("https?:\\/\\/([^\\/]+)", data.coder_workspace.me.access_url)[0] } From 54d50ff46a783a89c82c29956f0cb92b002b6100 Mon Sep 17 00:00:00 2001 From: Nick Vigilante Date: Fri, 10 Jul 2026 19:41:29 +0000 Subject: [PATCH 3/6] fix(docs): use tf as canonical fence tag, catch missed indented fences - Revert the canonical Terraform/HCL fence tag from Usage: terraform [global options] [args] The available commands for execution are listed below. The primary workflow commands are given first, followed by less common or more advanced commands. Main commands: init Prepare your working directory for other commands validate Check whether the configuration is valid plan Show changes required by the current configuration apply Create or update infrastructure destroy Destroy previously-created infrastructure All other commands: console Try Terraform expressions at an interactive command prompt fmt Reformat your configuration in the standard style force-unlock Release a stuck lock on the current workspace get Install or upgrade remote Terraform modules graph Generate a Graphviz graph of the steps in an operation import Associate existing infrastructure with a Terraform resource login Obtain and save credentials for a remote host logout Remove locally-stored credentials for a remote host metadata Metadata related commands modules Show all declared modules in a working directory output Show output values from your root module providers Show the providers required for this configuration query Search and list remote infrastructure with Terraform refresh Update the state to match remote systems show Show the current state or a saved plan stacks Manage HCP Terraform stack operations state Advanced state management taint Mark a resource instance as not fully functional test Execute integration tests for Terraform modules untaint Remove the 'tainted' state from a resource instance version Show the current Terraform version workspace Workspace management Global options (use these before the subcommand, if any): -chdir=DIR Switch to a different working directory before executing the given subcommand. -help Show this help output or the help for a specified subcommand. -version An alias for the "version" subcommand. to : both resolve to the same, correct grammar (Shiki's terraform grammar bundles tf/tfvars as aliases; GitHub's starry-night renderer matches tf via its HCL grammar's file extensions), so there's no functional difference, and tf is shorter to type. - Normalize indented fence tags (nested inside numbered/bulleted lists) that the original column-0-only sed pass never touched: hcl/terraform -> tf, env -> dotenv, output/none/url -> text, Dockerfile -> dockerfile, across ~20 additional files. - Document that caddyfile (2 fences in reverse-proxy-caddy.md) is, like promql, a grammar Shiki doesn't bundle and stays as-is pending a custom grammar registration. --- docs/.style/style-guide/formatting.md | 8 ++--- docs/about/contributing/modules.md | 4 +-- docs/about/contributing/templates.md | 12 +++---- docs/admin/external-auth/index.md | 4 +-- .../validated-architectures/index.md | 2 +- .../integrations/devcontainers/integration.md | 12 +++---- docs/admin/integrations/jfrog-artifactory.md | 2 +- .../integrations/multiple-kube-clusters.md | 4 +-- docs/admin/integrations/oauth2-provider.md | 4 +-- docs/admin/integrations/vault.md | 2 +- docs/admin/networking/index.md | 2 +- docs/admin/networking/port-forwarding.md | 2 +- docs/admin/networking/wildcard-access-url.md | 2 +- docs/admin/security/secrets.md | 4 +-- .../extending-templates/agent-metadata.md | 2 +- .../docker-in-workspaces.md | 12 +++---- .../extending-templates/dynamic-parameters.md | 32 +++++++++---------- .../environment-variables.md | 8 ++--- .../extending-templates/external-auth.md | 2 +- .../templates/extending-templates/icons.md | 2 +- .../templates/extending-templates/index.md | 12 +++---- .../jetbrains-preinstall.md | 2 +- .../templates/extending-templates/modules.md | 2 +- .../extending-templates/parameters.md | 26 +++++++-------- .../prebuilt-workspaces.md | 10 +++--- .../extending-templates/process-logging.md | 8 ++--- .../extending-templates/process-priority.md | 4 +-- .../extending-templates/resource-metadata.md | 6 ++-- .../resource-monitoring.md | 2 +- .../extending-templates/resource-ordering.md | 12 +++---- .../resource-persistence.md | 8 ++--- .../extending-templates/variables.md | 2 +- .../templates/extending-templates/web-ides.md | 22 ++++++------- .../extending-templates/workspace-tags.md | 2 +- .../managing-templates/change-management.md | 2 +- .../managing-templates/dependencies.md | 6 ++-- docs/admin/templates/open-in-coder.md | 4 +-- .../templates/startup-coordination/example.md | 4 +-- .../templates/startup-coordination/usage.md | 2 +- docs/admin/users/idp-sync.md | 2 +- docs/admin/users/oidc-auth/index.md | 4 +-- docs/admin/users/oidc-auth/refresh-tokens.md | 4 +-- docs/admin/users/quotas.md | 2 +- docs/ai-coder/agent-firewall/index.md | 6 ++-- docs/ai-coder/agent-firewall/nsjail/ecs.md | 2 +- docs/ai-coder/agent-firewall/nsjail/k8s.md | 2 +- docs/ai-coder/agent-firewall/version.md | 4 +-- .../template-optimization.md | 4 +-- .../ai-gateway/clients/claude-code.md | 4 +-- docs/ai-coder/ai-gateway/clients/codex.md | 4 +-- docs/ai-coder/ai-gateway/clients/index.md | 2 +- docs/ai-coder/ai-gateway/clients/mux.md | 2 +- docs/ai-coder/custom-agents.md | 2 +- docs/ai-coder/github-to-tasks.md | 2 +- docs/ai-coder/tasks-core-principles.md | 2 +- docs/ai-coder/tasks-lifecycle.md | 6 ++-- docs/ai-coder/tasks-migration.md | 4 +-- docs/ai-coder/tasks.md | 2 +- .../customize-your-template/add-a-language.md | 8 ++--- .../authenticate-to-github.md | 4 +-- .../customize-your-template/index.md | 2 +- .../install-command-line-tools.md | 10 +++--- docs/install/airgap.md | 4 +-- docs/install/registry-mirror-artifactory.md | 6 ++-- docs/tutorials/cloning-git-repositories.md | 4 +-- docs/tutorials/faqs.md | 12 +++---- docs/tutorials/gcp-to-aws.md | 2 +- docs/tutorials/image-pull-secret.md | 2 +- docs/tutorials/reverse-proxy-apache.md | 2 +- docs/tutorials/reverse-proxy-nginx.md | 2 +- docs/tutorials/template-from-scratch.md | 16 +++++----- docs/user-guides/shared-workspaces.md | 2 +- .../workspace-access/antigravity.md | 2 +- .../workspace-access/jetbrains/gateway.md | 6 ++-- .../workspace-access/port-forwarding.md | 2 +- .../workspace-access/remote-desktops.md | 2 +- docs/user-guides/workspace-access/vscode.md | 2 +- 77 files changed, 204 insertions(+), 204 deletions(-) diff --git a/docs/.style/style-guide/formatting.md b/docs/.style/style-guide/formatting.md index de8361806edf6..21a5ea965958e 100644 --- a/docs/.style/style-guide/formatting.md +++ b/docs/.style/style-guide/formatting.md @@ -139,9 +139,9 @@ Use the most specific language tag available: - `powershell` for Windows command-line blocks. PowerShell is the default Windows shell in the Coder docs. `pwsh` is not a valid tag; use `powershell`. -- `terraform` for Terraform and HCL. - `tf` and `hcl` are not the canonical tag; use `terraform`. - Shiki ships `terraform` and `hcl` as two distinct grammars; `terraform` is the more specific one and matches what nearly every Coder docs code block actually is. +- `tf` for Terraform and HCL. + `terraform` and `hcl` are not the canonical tag; use `tf`. + Shiki ships `terraform` and `hcl` as two distinct grammars; `tf` is an alias of the more specific `terraform` grammar (not `hcl`), and matches what nearly every Coder docs code block actually is. - `yaml` for YAML. - `go` for Go. - `json` for JSON. @@ -165,7 +165,7 @@ The docs site highlights code with [Speed-Highlight](https://github.com/speed-hi The fence label still drives highlighting on GitHub and in most editors, and `markdownlint` rule `MD040` requires one, so always declare the most specific language. A future docs renderer may adopt [Shiki](https://shiki.style), which fails the build on a fence label it doesn't recognize as a language or alias, so use only tags Shiki supports. For content with no sensible language tag, fall back to `text`. -A fence label needing a grammar Shiki doesn't bundle (for example `promql`) stays as-is; register it as a custom grammar when the site adopts Shiki, rather than degrading it to `text`. +A fence label needing a grammar Shiki doesn't bundle (for example `promql` or `caddyfile`) stays as-is; register it as a custom grammar when the site adopts Shiki, rather than degrading it to `text`. **Do**: diff --git a/docs/about/contributing/modules.md b/docs/about/contributing/modules.md index 7543a21c9a5ad..6eb064c11bcb8 100644 --- a/docs/about/contributing/modules.md +++ b/docs/about/contributing/modules.md @@ -104,7 +104,7 @@ This creates: Edit `main.tf` to build your module's features. Here's an example based on the `git-clone` module structure: -```terraform +```tf terraform { required_providers { coder = { @@ -212,7 +212,7 @@ This module clones a Git repository into your Coder workspace and ensures Git is ## Usage -```terraform +```tf module "git_clone" { source = "registry.coder.com/[your-username]/git-clone/coder" version = "~> 1.0" diff --git a/docs/about/contributing/templates.md b/docs/about/contributing/templates.md index d0c18f078a21f..6c9802e88bdb3 100644 --- a/docs/about/contributing/templates.md +++ b/docs/about/contributing/templates.md @@ -103,7 +103,7 @@ cd registry/[your-username]/templates/[template-name] Create `main.tf` with your complete Terraform configuration: -```terraform +```tf terraform { required_providers { coder = { @@ -262,7 +262,7 @@ You can customize this template by: Use registry modules for common features: -```terraform +```tf # VS Code in browser module "code-server" { count = data.coder_workspace.me.start_count @@ -311,7 +311,7 @@ module "dotfiles" { Provide meaningful customization options: -```terraform +```tf variable "git_repo_url" { description = "Git repository to clone" type = string @@ -432,7 +432,7 @@ Before submitting your template, verify: ### Docker-based template -```terraform +```tf # Simple Docker template resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count @@ -446,7 +446,7 @@ resource "docker_container" "workspace" { ### AWS EC2 template -```terraform +```tf # AWS EC2 template resource "aws_instance" "workspace" { count = data.coder_workspace.me.start_count @@ -463,7 +463,7 @@ resource "aws_instance" "workspace" { ### Kubernetes template -```terraform +```tf # Kubernetes template resource "kubernetes_pod" "workspace" { count = data.coder_workspace.me.start_count diff --git a/docs/admin/external-auth/index.md b/docs/admin/external-auth/index.md index d08c5bbb83577..666ba5cfc1e3f 100644 --- a/docs/admin/external-auth/index.md +++ b/docs/admin/external-auth/index.md @@ -47,7 +47,7 @@ configure your callback URL as `https://example.com/external-auth/primary-github Add the following code to any template to add a button to the workspace setup page which will allow you to authenticate with your provider: -```terraform +```tf data "coder_external_auth" "" { id = "" } @@ -343,7 +343,7 @@ CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key" before linking. To surface an **Install GitHub App** link in the Coder UI, set the following environment variable: - ```env + ```dotenv CODER_EXTERNAL_AUTH_0_APP_INSTALL_URL=https://github.com/apps//installations/new ``` diff --git a/docs/admin/infrastructure/validated-architectures/index.md b/docs/admin/infrastructure/validated-architectures/index.md index 2e8b75023cd75..9fa4968bf856f 100644 --- a/docs/admin/infrastructure/validated-architectures/index.md +++ b/docs/admin/infrastructure/validated-architectures/index.md @@ -163,7 +163,7 @@ compute as users start/stop workspaces at the beginning and end of their day. Set nodeSelectors, affinities, and tolerations in Coder templates to assign workspaces to the given node group: -```terraform +```tf resource "kubernetes_deployment" "coder" { spec { template { diff --git a/docs/admin/integrations/devcontainers/integration.md b/docs/admin/integrations/devcontainers/integration.md index 1b37c1bc52c12..6c40fdee42868 100644 --- a/docs/admin/integrations/devcontainers/integration.md +++ b/docs/admin/integrations/devcontainers/integration.md @@ -40,7 +40,7 @@ Use the [devcontainers-cli](https://registry.coder.com/modules/devcontainers-cli) module to ensure the `@devcontainers/cli` is installed in your workspace: -```terraform +```tf module "devcontainers-cli" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/devcontainers-cli/coder" @@ -57,7 +57,7 @@ The resource automatically starts a Dev Container in your workspace, ensuring it's ready when you access the workspace: -```terraform +```tf resource "coder_devcontainer" "my-repository" { count = data.coder_workspace.me.start_count agent_id = coder_agent.dev.id @@ -83,7 +83,7 @@ default behavior. If you need to explicitly disable Dev Containers, set the `CODER_AGENT_DEVCONTAINERS_ENABLE` environment variable to `false`: -```terraform +```tf resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = "codercom/oss-dogfood:latest" @@ -153,7 +153,7 @@ and [`coder_env`](https://registry.terraform.io/providers/coder/coder/latest/doc resources to a `coder_devcontainer` by referencing its `subagent_id` attribute as the `agent_id`: -```terraform +```tf resource "coder_devcontainer" "my-repository" { count = data.coder_workspace.me.start_count agent_id = coder_agent.dev.id @@ -227,7 +227,7 @@ For the full reference, see Here's a simplified template example that uses Dev Containers with manual configuration: -```terraform +```tf terraform { required_providers { coder = { source = "coder/coder" } @@ -277,7 +277,7 @@ resource "coder_env" "env" { By default, discovered containers appear in the dashboard but developers must manually start them. To have them start automatically, enable autostart: -```terraform +```tf resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = "codercom/oss-dogfood:latest" diff --git a/docs/admin/integrations/jfrog-artifactory.md b/docs/admin/integrations/jfrog-artifactory.md index 5dccd8d55e9f0..9450c97649348 100644 --- a/docs/admin/integrations/jfrog-artifactory.md +++ b/docs/admin/integrations/jfrog-artifactory.md @@ -56,7 +56,7 @@ To set this up, follow these steps: 1. Add a new [external authentication](../external-auth/index.md) to Coder by setting these environment variables in a manner consistent with your Coder deployment. Replace `JFROG_URL` with your JFrog Artifactory base URL: - ```env + ```dotenv # JFrog Artifactory External Auth CODER_EXTERNAL_AUTH_1_ID="jfrog" CODER_EXTERNAL_AUTH_1_TYPE="jfrog" diff --git a/docs/admin/integrations/multiple-kube-clusters.md b/docs/admin/integrations/multiple-kube-clusters.md index 88c0480b05cfd..32d5ced73bbfc 100644 --- a/docs/admin/integrations/multiple-kube-clusters.md +++ b/docs/admin/integrations/multiple-kube-clusters.md @@ -62,7 +62,7 @@ From there, add [template parameters](../templates/extending-templates/parameters.md) to allow developers to pick their desired cluster. -```terraform +```tf # main.tf data "coder_parameter" "kube_context" { @@ -159,7 +159,7 @@ rolebinding.rbac.authorization.k8s.io/coder-v2 created You can start from our [example template](../../../examples/templates/kubernetes). -```terraform +```tf variable "host" { description = "Cluster host address" sensitive = true diff --git a/docs/admin/integrations/oauth2-provider.md b/docs/admin/integrations/oauth2-provider.md index d820905fcce61..9a8ff0c75880d 100644 --- a/docs/admin/integrations/oauth2-provider.md +++ b/docs/admin/integrations/oauth2-provider.md @@ -86,7 +86,7 @@ If client authentication fails, the token endpoint returns **HTTP 401** with an 1. **Authorization Request**: Redirect users to Coder's authorization endpoint: - ```url + ```text https://coder.example.com/oauth2/authorize? client_id=your-client-id& response_type=code& @@ -148,7 +148,7 @@ confidential clients must include PKCE parameters: 2. Include PKCE parameters in the authorization request: - ```url + ```text https://coder.example.com/oauth2/authorize? client_id=your-client-id& response_type=code& diff --git a/docs/admin/integrations/vault.md b/docs/admin/integrations/vault.md index d002912de9ecd..012932a557b2f 100644 --- a/docs/admin/integrations/vault.md +++ b/docs/admin/integrations/vault.md @@ -23,7 +23,7 @@ GitHub [external authentication](../external-auth/index.md) to get the token and To use this module, add the following code to your Terraform configuration. -```terraform +```tf module "vault" { source = "registry.coder.com/modules/vault-github/coder" version = "1.0.7" diff --git a/docs/admin/networking/index.md b/docs/admin/networking/index.md index 4403617234b8d..05f86d7f8680d 100644 --- a/docs/admin/networking/index.md +++ b/docs/admin/networking/index.md @@ -80,7 +80,7 @@ Template admins can overwrite the site-wide access URL at the template level by leveraging the `url` argument when [defining the Coder provider](https://registry.terraform.io/providers/coder/coder/latest/docs#url-1): -```terraform +```tf provider "coder" { url = "https://coder.namespace.svc.cluster.local" } diff --git a/docs/admin/networking/port-forwarding.md b/docs/admin/networking/port-forwarding.md index 8bcaf2f92303e..f5678403adb94 100644 --- a/docs/admin/networking/port-forwarding.md +++ b/docs/admin/networking/port-forwarding.md @@ -85,7 +85,7 @@ workspace's template. This approach shows a visual application icon in the dashboard. See the following `coder_app` example for a Node React app and note the `subdomain` and `share` settings: -```terraform +```tf # node app resource "coder_app" "node-react-app" { agent_id = coder_agent.dev.id diff --git a/docs/admin/networking/wildcard-access-url.md b/docs/admin/networking/wildcard-access-url.md index 73d44157cad16..0f1d50fb2d442 100644 --- a/docs/admin/networking/wildcard-access-url.md +++ b/docs/admin/networking/wildcard-access-url.md @@ -108,7 +108,7 @@ Each proxy's wildcard domain must have corresponding DNS records: In your Coder templates, enable subdomain applications using the `subdomain` parameter: -```terraform +```tf resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" diff --git a/docs/admin/security/secrets.md b/docs/admin/security/secrets.md index f2d0e77a96882..b7d9285fff92d 100644 --- a/docs/admin/security/secrets.md +++ b/docs/admin/security/secrets.md @@ -65,7 +65,7 @@ which excludes obscure API providers. Dynamic secrets can be implemented in your template code like so: -```terraform +```tf resource "twilio_iam_api_key" "api_key" { account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" friendly_name = "Test API Key" @@ -96,7 +96,7 @@ can also show them in the Workspace UI with Can be produced with -```terraform +```tf resource "twilio_iam_api_key" "api_key" { account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" friendly_name = "Test API Key" diff --git a/docs/admin/templates/extending-templates/agent-metadata.md b/docs/admin/templates/extending-templates/agent-metadata.md index 4b2f90fde1104..92d43702ca0bf 100644 --- a/docs/admin/templates/extending-templates/agent-metadata.md +++ b/docs/admin/templates/extending-templates/agent-metadata.md @@ -22,7 +22,7 @@ usage about the workspace's host. Here's a standard set of metadata snippets for Linux agents: -```terraform +```tf resource "coder_agent" "main" { os = "linux" ... diff --git a/docs/admin/templates/extending-templates/docker-in-workspaces.md b/docs/admin/templates/extending-templates/docker-in-workspaces.md index afd6699f92554..b679689155537 100644 --- a/docs/admin/templates/extending-templates/docker-in-workspaces.md +++ b/docs/admin/templates/extending-templates/docker-in-workspaces.md @@ -23,7 +23,7 @@ inside Coder workspaces. See [Systemd in Docker](#systemd-in-docker). After [installing Sysbox](https://github.com/nestybox/sysbox#installation) on the Coder host, modify your template to use the sysbox-runc runtime: -```terraform +```tf resource "docker_container" "workspace" { # ... name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}" @@ -52,7 +52,7 @@ After modify your template to use the sysbox-runc RuntimeClass. This requires the Kubernetes Terraform provider version 2.16.0 or greater. -```terraform +```tf terraform { required_providers { coder = { @@ -169,7 +169,7 @@ $ kubectl create secret docker-registry \ --docker-email= ``` -```terraform +```tf env { name = "CODER_IMAGE_PULL_SECRET" value_from { @@ -311,7 +311,7 @@ your nodes cannot run Sysbox. ### Use a privileged sidecar container in Docker-based templates -```terraform +```tf resource "coder_agent" "main" { os = "linux" arch = "amd64" @@ -348,7 +348,7 @@ resource "docker_container" "workspace" { ### Use a privileged sidecar container in Kubernetes-based templates -```terraform +```tf terraform { required_providers { coder = { @@ -420,7 +420,7 @@ After modify your template to use the sysbox-runc RuntimeClass. This requires the Kubernetes Terraform provider version 2.16.0 or greater. -```terraform +```tf terraform { required_providers { coder = { diff --git a/docs/admin/templates/extending-templates/dynamic-parameters.md b/docs/admin/templates/extending-templates/dynamic-parameters.md index b0f0229ca23fa..f2b2d7b5d2dd6 100644 --- a/docs/admin/templates/extending-templates/dynamic-parameters.md +++ b/docs/admin/templates/extending-templates/dynamic-parameters.md @@ -46,7 +46,7 @@ In Coder v2.25.0 and later, Dynamic Parameters are automatically enabled for new 1. Update your template to use version >=2.4.0 of the Coder provider with the following Terraform block. - ```terraform + ```tf terraform { required_providers { coder = { @@ -148,7 +148,7 @@ Users can avoid restrictions like `disabled` if they create a workspace via the This attribute accepts JSON like so: -```terraform +```tf data "coder_parameter" "styled_parameter" { ... styling = jsonencode({ @@ -182,7 +182,7 @@ Single-select parameters with options can use the `form_type="dropdown"` attribu [Try dropdown lists on the Parameter Playground](https://playground.coder.app/parameters/kgNBpjnz7x) -```terraform +```tf locals { ides = [ "VS Code", @@ -219,7 +219,7 @@ The large text entry option can be used to enter long strings like AI prompts, s [Try textarea parameters on the Parameter Playground](https://playground.coder.app/parameters/RCAHA1Oi1_) -```terraform +```tf data "coder_parameter" "text_area" { name = "text_area" @@ -249,7 +249,7 @@ For example, adding multiple IDEs with a single parameter. [Try multi-select parameters on the Parameter Playground](https://playground.coder.app/parameters/XogX54JV_f) -```terraform +```tf locals { ides = [ "VS Code", "JetBrains IntelliJ", @@ -289,7 +289,7 @@ This is the original styling for list parameters. [Try radio parameters on the Parameter Playground](https://playground.coder.app/parameters/3OMDp5ANZI). -```terraform +```tf data "coder_parameter" "environment" { name = "environment" display_name = "Environment" @@ -325,7 +325,7 @@ This can be used for a TOS confirmation or to expose advanced options. [Try checkbox parameters on the Parameters Playground](https://playground.coder.app/parameters/ycWuQJk2Py). -```terraform +```tf data "coder_parameter" "enable_gpu" { name = "enable_gpu" display_name = "Enable GPU" @@ -342,7 +342,7 @@ The `validation` block is used to constrain (or clamp) the minimum and maximum v [Try slider parameters on the Parameters Playground](https://playground.coder.app/parameters/RsBNcWVvfm). -```terraform +```tf data "coder_parameter" "cpu_cores" { name = "cpu_cores" display_name = "CPU Cores" @@ -366,7 +366,7 @@ Note that this does not secure information on the backend and is purely cosmetic Note: This text may not be properly hidden in the Playground. The `mask_input` styling attribute is supported in v2.24.0 and later. -```terraform +```tf data "coder_parameter" "private_api_key" { name = "private_api_key" display_name = "Your super secret API key" @@ -405,7 +405,7 @@ Use Terraform conditionals and the `count` block to allow a checkbox to expose o [Try conditional parameters on the Parameter Playground](https://playground.coder.app/parameters/xmG5MKEGNM). -```terraform +```tf data "coder_parameter" "show_cpu_cores" { name = "show_cpu_cores" display_name = "Toggles next parameter" @@ -440,7 +440,7 @@ This allows you to suggest an option dynamically without strict enforcement. [Try dynamic defaults in the Parameter Playground](https://playground.coder.app/parameters/DEi-Bi6DVe). -```terraform +```tf locals { ides = [ "VS Code", @@ -505,7 +505,7 @@ A parameter's validation block can leverage inputs from other parameters. [Try dynamic validation in the Parameter Playground](https://playground.coder.app/parameters/sdbzXxagJ4). -```terraform +```tf data "coder_parameter" "git_repo" { name = "git_repo" display_name = "Git repo" @@ -557,7 +557,7 @@ Note that parameters must be indexed when using the `count` attribute. [Try daisy-chaining parameters in the Parameter Playground](https://playground.coder.app/parameters/jLUUhoDLIa). -```terraform +```tf locals { ides = [ @@ -659,7 +659,7 @@ data source. [Try out admin-only options in the Playground](https://playground.coder.app/parameters/5Gn9W3hYs7). -```terraform +```tf locals { roles = [for r in data.coder_workspace_owner.me.rbac_roles: r.name] @@ -701,7 +701,7 @@ This way developers can't accidentally induce low-latency with world-spanning co [Try user-aware regions in the parameter playground](https://playground.coder.app/parameters/tBD-mbZRGm) -```terraform +```tf locals { eu_regions = [ @@ -752,7 +752,7 @@ Some users associate groups with namespaces, such as Kubernetes, then allow user [Try groups as options in the Parameter Playground](https://playground.coder.app/parameters/lKbU53nYjl). -```terraform +```tf locals { groups = data.coder_workspace_owner.me.groups } diff --git a/docs/admin/templates/extending-templates/environment-variables.md b/docs/admin/templates/extending-templates/environment-variables.md index c8682ab4f9051..27082154f1382 100644 --- a/docs/admin/templates/extending-templates/environment-variables.md +++ b/docs/admin/templates/extending-templates/environment-variables.md @@ -8,7 +8,7 @@ development environments. ## Basic usage -```terraform +```tf resource "coder_agent" "dev" { os = "linux" arch = "amd64" @@ -43,7 +43,7 @@ the convention for `PATH`-style variables on Unix systems. Multiple `coder_env` resources can each add directories to `PATH`: -```terraform +```tf resource "coder_env" "path_tools" { agent_id = coder_agent.dev.id name = "PATH" @@ -66,7 +66,7 @@ This produces `PATH` with the value Use `error` to catch accidental duplicate definitions: -```terraform +```tf resource "coder_env" "editor" { agent_id = coder_agent.dev.id name = "EDITOR" @@ -96,7 +96,7 @@ after `coder_env` resources are merged, so `merge_strategy = "error"` does not trigger when the conflict is with the agent's `env` block — only when two `coder_env` resources define the same key: -```terraform +```tf resource "coder_agent" "dev" { os = "linux" arch = "amd64" diff --git a/docs/admin/templates/extending-templates/external-auth.md b/docs/admin/templates/extending-templates/external-auth.md index 386195ff14b08..62e05af10d191 100644 --- a/docs/admin/templates/extending-templates/external-auth.md +++ b/docs/admin/templates/extending-templates/external-auth.md @@ -67,7 +67,7 @@ If the token is required to be inserted into the workspace, for example template. This token will not auto-refresh. The following example will authenticate via GitHub and auto-clone a repo into the `~/coder` directory. -```terraform +```tf data "coder_external_auth" "github" { # Matches the ID of the external auth provider in Coder. id = "github" diff --git a/docs/admin/templates/extending-templates/icons.md b/docs/admin/templates/extending-templates/icons.md index 7de8e4a071846..57d55d88dc289 100644 --- a/docs/admin/templates/extending-templates/icons.md +++ b/docs/admin/templates/extending-templates/icons.md @@ -39,7 +39,7 @@ come bundled with your Coder deployment. `CODER_EXTERNAL_AUTH_X_ICON` environment variable, where `X` is the number of the provider. - ```env + ```dotenv CODER_EXTERNAL_AUTH_0_ICON=/icon/github.svg CODER_EXTERNAL_AUTH_1_ICON=/icon/google.svg ``` diff --git a/docs/admin/templates/extending-templates/index.md b/docs/admin/templates/extending-templates/index.md index 7dbaaa617b6a4..dbbca837a9fa0 100644 --- a/docs/admin/templates/extending-templates/index.md +++ b/docs/admin/templates/extending-templates/index.md @@ -18,7 +18,7 @@ The associated agent will facilitate port forwarding, and IDEs. The agent may also display real-time [workspace metadata](./agent-metadata.md) like resource usage. -```terraform +```tf resource "coder_agent" "dev" { os = "linux" arch = "amd64" @@ -95,7 +95,7 @@ You can use these examples to add new Coder apps: ## code-server -```terraform +```tf resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -109,7 +109,7 @@ resource "coder_app" "code-server" { ## Filebrowser -```terraform +```tf resource "coder_app" "filebrowser" { agent_id = coder_agent.main.id display_name = "file browser" @@ -123,7 +123,7 @@ resource "coder_app" "filebrowser" { ## Zed -```terraform +```tf resource "coder_app" "zed" { agent_id = coder_agent.main.id slug = "slug" @@ -168,7 +168,7 @@ on a scheduled basis. It provides more control than the deprecated ### Basic example -```terraform +```tf resource "coder_script" "install_dependencies" { agent_id = coder_agent.main.id display_name = "Install Dependencies" @@ -209,7 +209,7 @@ internally. For example: You can also reference external script files: -```terraform +```tf resource "coder_script" "init_docker" { agent_id = coder_agent.main.id display_name = "Initialize Docker" diff --git a/docs/admin/templates/extending-templates/jetbrains-preinstall.md b/docs/admin/templates/extending-templates/jetbrains-preinstall.md index d950cb7ed14d4..0bb11ef9e6a1b 100644 --- a/docs/admin/templates/extending-templates/jetbrains-preinstall.md +++ b/docs/admin/templates/extending-templates/jetbrains-preinstall.md @@ -43,7 +43,7 @@ Add the following command to your template's `startup_script`: If you are using our [jetbrains-gateway](https://registry.coder.com/modules/coder/jetbrains-gateway) module, you can configure it by adding the following snippet to your template: -```terraform +```tf module "jetbrains_gateway" { count = data.coder_workspace.me.start_count source = "registry.coder.com/modules/jetbrains-gateway/coder" diff --git a/docs/admin/templates/extending-templates/modules.md b/docs/admin/templates/extending-templates/modules.md index 00b417331b42c..cc2bdca55a901 100644 --- a/docs/admin/templates/extending-templates/modules.md +++ b/docs/admin/templates/extending-templates/modules.md @@ -8,7 +8,7 @@ You can store these modules externally from your Coder deployment, like in a git repository or a Terraform registry. This example shows how to reference a module from your template: -```terraform +```tf data "coder_workspace" "me" {} module "coder-base" { diff --git a/docs/admin/templates/extending-templates/parameters.md b/docs/admin/templates/extending-templates/parameters.md index 5f435cdaf0eea..3eb7957a73160 100644 --- a/docs/admin/templates/extending-templates/parameters.md +++ b/docs/admin/templates/extending-templates/parameters.md @@ -14,7 +14,7 @@ parameters like instance size, geographical location, repository URL, etc. This example lets a developer choose a Docker host for the workspace: -```terraform +```tf data "coder_parameter" "docker_host" { name = "Region" description = "Which region would you like to deploy to?" @@ -44,7 +44,7 @@ data "coder_parameter" "docker_host" { From there, a template can refer to a parameter's value: -```terraform +```tf provider "docker" { host = data.coder_parameter.docker_host.value } @@ -64,7 +64,7 @@ JSON array and the Terraform [jsonencode](https://developer.hashicorp.com/terraform/language/functions/jsonencode) function. For example: -```terraform +```tf data "coder_parameter" "security_groups" { name = "Security groups" icon = "/icon/aws.png" @@ -109,7 +109,7 @@ data "coder_parameter" "security_groups" { A `string` parameter can provide a set of options to limit the user's choices: -```terraform +```tf data "coder_parameter" "docker_host" { name = "Region" description = "Which region would you like to deploy to?" @@ -171,7 +171,7 @@ Example: A parameter is _required_ if it doesn't have the `default` property. The user **must** provide a value to this parameter before creating a workspace: -```terraform +```tf data "coder_parameter" "account_name" { name = "Account name" description = "Cloud account name" @@ -182,7 +182,7 @@ data "coder_parameter" "account_name" { If a parameter contains the `default` property, Coder will use this value if the user does not specify any: -```terraform +```tf data "coder_parameter" "base_image" { name = "Base image" description = "Base machine image to download" @@ -193,7 +193,7 @@ data "coder_parameter" "base_image" { Admins can also set the `default` property to an empty value so that the parameter field can remain empty: -```terraform +```tf data "coder_parameter" "dotfiles_url" { name = "dotfiles URL" description = "Git repository with dotfiles" @@ -215,7 +215,7 @@ resources like volumes, regions, and so on. Example: -```terraform +```tf data "coder_parameter" "region" { name = "Region" description = "Region where the workspace is hosted" @@ -238,7 +238,7 @@ but do not persist after the workspace is stopped. Since these parameters are ephemeral in nature, subsequent builds proceed in the standard manner: -```terraform +```tf data "coder_parameter" "force_rebuild" { name = "force_rebuild" type = "bool" @@ -262,7 +262,7 @@ You can also specify its monotonicity as `increasing` or `decreasing` to verify the current and new values. Use the `monotonic` attribute for resources that can't be shrunk or grown without implications, like disk volume size. -```terraform +```tf data "coder_parameter" "instances" { name = "Instances" type = "number" @@ -279,7 +279,7 @@ It is possible to override the default `error` message for a `number` parameter, along with its associated `min` and/or `max` properties. The following message placeholders are available `{min}`, `{max}`, and `{value}`. -```terraform +```tf data "coder_parameter" "instances" { name = "Instances" type = "number" @@ -303,7 +303,7 @@ data "coder_parameter" "instances" { You can validate a `string` parameter to match a regular expression. The `regex` property requires a corresponding `error` property. -```terraform +```tf data "coder_parameter" "project_id" { name = "Project ID" description = "Alpha-numeric project ID" @@ -344,7 +344,7 @@ For a complete list of all available fields, see the
Expand for an example -```terraform +```tf data "coder_workspace_preset" "goland-gpu" { name = "GoLand with GPU" description = "Development workspace with GPU acceleration for GoLand IDE" diff --git a/docs/admin/templates/extending-templates/prebuilt-workspaces.md b/docs/admin/templates/extending-templates/prebuilt-workspaces.md index 21d722c246d53..e35f1033d2552 100644 --- a/docs/admin/templates/extending-templates/prebuilt-workspaces.md +++ b/docs/admin/templates/extending-templates/prebuilt-workspaces.md @@ -39,7 +39,7 @@ In your template, add a `prebuilds` block within a `coder_workspace_preset` defi instances your Coder deployment should maintain, and optionally configure a `expiration_policy` block to set a TTL (Time To Live) for unclaimed prebuilt workspaces to ensure stale resources are automatically cleaned up. - ```hcl + ```tf data "coder_workspace_preset" "goland" { name = "GoLand: Large" parameters = { @@ -123,7 +123,7 @@ This allows you to reduce resource costs during off-hours while maintaining avai Configure scheduling by adding a `scheduling` block within your `prebuilds` configuration: -```terraform +```tf data "coder_workspace_preset" "goland" { name = "GoLand: Large" parameters { @@ -187,7 +187,7 @@ Cron expressions follow the format: `* HOUR DOM MONTH DAY-OF-WEEK` **Example schedules:** -```terraform +```tf # Business hours only (8AM-6:59PM, Mon-Fri) schedule { cron = "* 8-18 * * 1-5" @@ -367,7 +367,7 @@ For example, when these values are used in immutable fields like the AWS instanc To prevent this, add a `lifecycle` block with `ignore_changes`: -```terraform +```tf resource "docker_container" "workspace" { lifecycle { ignore_changes = [env, image] # include all fields which caused drift @@ -414,7 +414,7 @@ This keeps other provisioners available to handle user-initiated jobs. 1. Update the template to conditionally add the prebuild tag for prebuild jobs. - ```hcl + ```tf data "coder_workspace_tags" "prebuilds" { count = data.coder_workspace_owner.me.name == "prebuilds" ? 1 : 0 tags = { diff --git a/docs/admin/templates/extending-templates/process-logging.md b/docs/admin/templates/extending-templates/process-logging.md index 4db1635d9ae56..8653d13f5b687 100644 --- a/docs/admin/templates/extending-templates/process-logging.md +++ b/docs/admin/templates/extending-templates/process-logging.md @@ -82,7 +82,7 @@ would like to add workspace process logging to, follow these steps: in the exectrace repo. --> - ```hcl + ```tf locals { # This is the init script for the main workspace container that runs before the # agent starts to configure workspace process logging. @@ -142,7 +142,7 @@ would like to add workspace process logging to, follow these steps: in the exectrace repo. --> - ```hcl + ```tf resource "kubernetes_pod" "main" { ... spec { @@ -176,7 +176,7 @@ would like to add workspace process logging to, follow these steps: in the exectrace repo. --> - ```hcl + ```tf resource "kubernetes_pod" "main" { ... spec { @@ -224,7 +224,7 @@ would like to add workspace process logging to, follow these steps: in the exectrace repo. --> - ```hcl + ```tf resource "kubernetes_pod" "main" { ... spec { diff --git a/docs/admin/templates/extending-templates/process-priority.md b/docs/admin/templates/extending-templates/process-priority.md index 54d5a7af1c086..b3d7c3500dc09 100644 --- a/docs/admin/templates/extending-templates/process-priority.md +++ b/docs/admin/templates/extending-templates/process-priority.md @@ -11,7 +11,7 @@ so the agent itself stays alive under resource pressure. the nice value below its current value. In Kubernetes, add it to the container's security context: - ```hcl + ```tf container { security_context { capabilities { @@ -62,7 +62,7 @@ workloads. The following Kubernetes template snippet enables process priority management on the workspace container: -```terraform +```tf resource "kubernetes_deployment" "workspace" { # ... other configuration diff --git a/docs/admin/templates/extending-templates/resource-metadata.md b/docs/admin/templates/extending-templates/resource-metadata.md index e825131e5174e..21f29c10594d4 100644 --- a/docs/admin/templates/extending-templates/resource-metadata.md +++ b/docs/admin/templates/extending-templates/resource-metadata.md @@ -24,7 +24,7 @@ You can also present automatically updating, dynamic values with Expose the disk size, deployment name, and persistent directory in a Kubernetes template with: -```terraform +```tf resource "kubernetes_persistent_volume_claim" "root" { ... } @@ -63,7 +63,7 @@ Some resources don't need to be exposed in the dashboard's UI. This helps keep the workspace view clean for developers. To hide a resource, use the `hide` attribute: -```terraform +```tf resource "coder_metadata" "hide_serviceaccount" { count = data.coder_workspace.me.start_count resource_id = kubernetes_service_account.user_data.id @@ -80,7 +80,7 @@ resource "coder_metadata" "hide_serviceaccount" { To use custom icons for your resource metadata, use the `icon` attribute. It must be a valid path or URL. -```terraform +```tf resource "coder_metadata" "resource_with_icon" { count = data.coder_workspace.me.start_count resource_id = kubernetes_service_account.user_data.id diff --git a/docs/admin/templates/extending-templates/resource-monitoring.md b/docs/admin/templates/extending-templates/resource-monitoring.md index 8e279ea95c156..441b88f9644b8 100644 --- a/docs/admin/templates/extending-templates/resource-monitoring.md +++ b/docs/admin/templates/extending-templates/resource-monitoring.md @@ -23,7 +23,7 @@ Add the following example to the template's `main.tf`. Change the `90`, `80`, and `95` to a threshold that's more appropriate for your deployment: -```terraform +```tf resource "coder_agent" "main" { arch = data.coder_provisioner.dev.arch os = data.coder_provisioner.dev.os diff --git a/docs/admin/templates/extending-templates/resource-ordering.md b/docs/admin/templates/extending-templates/resource-ordering.md index 27a8f94d42ebd..c26c88f4d5a10 100644 --- a/docs/admin/templates/extending-templates/resource-ordering.md +++ b/docs/admin/templates/extending-templates/resource-ordering.md @@ -16,7 +16,7 @@ The `order` property of `coder_parameter` resource allows specifying the order of parameters in UI forms. In the below example, `project_id` will appear _before_ `account_id`: -```terraform +```tf data "coder_parameter" "project_id" { name = "project_id" display_name = "Project ID" @@ -37,7 +37,7 @@ data "coder_parameter" "account_id" { Agent resources within the UI left pane are sorted based on the `order` property, followed by `name`, ensuring a consistent and intuitive arrangement. -```terraform +```tf resource "coder_agent" "primary" { ... @@ -59,7 +59,7 @@ The `coder_agent` exposes metadata to present operational metrics in the UI. Metrics defined with Terraform `metadata` blocks can be ordered using additional `order` property; otherwise, they are sorted by `key`. -```terraform +```tf resource "coder_agent" "main" { ... @@ -107,7 +107,7 @@ workspace view. Only template defined applications can be arranged. _VS Code_ or _Terminal_ buttons are static. -```terraform +```tf resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -135,7 +135,7 @@ The options for Coder parameters maintain the same order as in the file structure. This simplifies management and ensures consistency between configuration files and UI presentation. -```terraform +```tf data "coder_parameter" "database_region" { name = "database_region" display_name = "Database Region" @@ -166,7 +166,7 @@ In cases where multiple item properties exist, the order is inherited from the file, facilitating seamless integration between a Coder template and UI presentation. -```terraform +```tf resource "coder_metadata" "attached_volumes" { resource_id = docker_image.main.id diff --git a/docs/admin/templates/extending-templates/resource-persistence.md b/docs/admin/templates/extending-templates/resource-persistence.md index 13305c043fb9e..a0ccbeea6069f 100644 --- a/docs/admin/templates/extending-templates/resource-persistence.md +++ b/docs/admin/templates/extending-templates/resource-persistence.md @@ -24,7 +24,7 @@ meta-argument. In this example, Coder will provision or tear down the `docker_container` resource: -```terraform +```tf data "coder_workspace" "me" { } @@ -39,7 +39,7 @@ resource "docker_container" "workspace" { Take this example resource: -```terraform +```tf data "coder_workspace" "me" { } @@ -59,7 +59,7 @@ To prevent this, use immutable IDs: You should also avoid using `coder_workspace.me.name` if your deployment allows workspace renaming via `CODER_ALLOW_WORKSPACE_RENAMES` or `--allow-workspace-renames`. -```terraform +```tf data "coder_workspace" "me" { } @@ -80,7 +80,7 @@ You can prevent Terraform from recreating a resource under any circumstance by setting the [`ignore_changes = all` directive in the `lifecycle` block](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes). -```terraform +```tf data "coder_workspace" "me" { } diff --git a/docs/admin/templates/extending-templates/variables.md b/docs/admin/templates/extending-templates/variables.md index d29d2897936fc..3c1d02f0baf63 100644 --- a/docs/admin/templates/extending-templates/variables.md +++ b/docs/admin/templates/extending-templates/variables.md @@ -6,7 +6,7 @@ construction of customizable templates. Unlike parameters, which are primarily for workspace customization, template variables remain under the control of the template author, ensuring workspace users cannot modify them. -```terraform +```tf variable "CLOUD_API_KEY" { type = string description = "API key for the service" diff --git a/docs/admin/templates/extending-templates/web-ides.md b/docs/admin/templates/extending-templates/web-ides.md index c273095295629..30aba957bd7e9 100644 --- a/docs/admin/templates/extending-templates/web-ides.md +++ b/docs/admin/templates/extending-templates/web-ides.md @@ -5,7 +5,7 @@ In Coder, web IDEs are defined as resources in the template. With our generic model, any web application can be used as a Coder application. For example: -```terraform +```tf # Add button to open Portainer in the workspace dashboard # Note: Portainer must be already running in the workspace resource "coder_app" "portainer" { @@ -35,7 +35,7 @@ cd your-template/ vim main.tf ``` -```terraform +```tf resource "coder_agent" "main" { arch = "amd64" os = "linux" @@ -75,7 +75,7 @@ RUN code-server --install-extension eamodio.gitlens You'll also need to specify a `coder_app` resource related to the agent. This is how code-server is displayed on the workspace page. -```terraform +```tf resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -156,7 +156,7 @@ To use Jupyter Notebook in your workspace, you can install it by using the [Jupyter Notebook module](https://registry.coder.com/modules/jupyter-notebook) from the Coder registry: -```terraform +```tf module "jupyter-notebook" { source = "registry.coder.com/modules/jupyter-notebook/coder" version = "1.0.19" @@ -171,7 +171,7 @@ module "jupyter-notebook" { Configure your agent and `coder_app` like so to use Jupyter. Notice the `subdomain=true` configuration: -```terraform +```tf data "coder_workspace" "me" {} resource "coder_agent" "coder" { @@ -203,7 +203,7 @@ resource "coder_app" "jupyter" { Or Alternatively, you can use the JupyterLab module from the Coder registry: -```terraform +```tf module "jupyter" { source = "registry.coder.com/modules/jupyter-lab/coder" version = "1.0.0" @@ -225,7 +225,7 @@ value substitution to recreate the path structure. Configure your agent and `coder_app` like so to use RStudio. Notice the `subdomain=true` configuration: -```terraform +```tf resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -272,7 +272,7 @@ community template example. Configure your agent and `coder_app` like so to use Airflow. Notice the `subdomain=true` configuration: -```terraform +```tf resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -305,7 +305,7 @@ resource "coder_app" "airflow" { or use the [Airflow module](https://registry.coder.com/modules/apache-airflow) from the Coder registry: -```terraform +```tf module "airflow" { source = "registry.coder.com/modules/airflow/coder" version = "1.0.13" @@ -323,7 +323,7 @@ manipulate files in a web browser. Show and manipulate the contents of the `/home/coder` directory in a browser. -```terraform +```tf resource "coder_agent" "coder" { os = "linux" arch = "amd64" @@ -358,7 +358,7 @@ Or alternatively, you can use the [`filebrowser`](https://registry.coder.com/modules/filebrowser) module from the Coder registry: -```terraform +```tf module "filebrowser" { source = "registry.coder.com/modules/filebrowser/coder" version = "1.0.8" diff --git a/docs/admin/templates/extending-templates/workspace-tags.md b/docs/admin/templates/extending-templates/workspace-tags.md index 47960c362c421..f2c5ac874cbe1 100644 --- a/docs/admin/templates/extending-templates/workspace-tags.md +++ b/docs/admin/templates/extending-templates/workspace-tags.md @@ -14,7 +14,7 @@ can enable dynamic tag selection and modify static template tags. Here is a sample `coder_workspace_tags` data resource with a few workspace tags specified: -```terraform +```tf data "coder_workspace_tags" "custom_workspace_tags" { tags = { "az" = var.az diff --git a/docs/admin/templates/managing-templates/change-management.md b/docs/admin/templates/managing-templates/change-management.md index e985d21253150..d7aec85ed0515 100644 --- a/docs/admin/templates/managing-templates/change-management.md +++ b/docs/admin/templates/managing-templates/change-management.md @@ -16,7 +16,7 @@ pipelines. To run the provider in a CI/CD pipeline, and to prevent drift, you'll need to store the Terraform state [remotely](https://developer.hashicorp.com/terraform/language/backend). -```terraform +```tf terraform { required_providers { coderd = { diff --git a/docs/admin/templates/managing-templates/dependencies.md b/docs/admin/templates/managing-templates/dependencies.md index 80d80da679364..5f1338c5b2a80 100644 --- a/docs/admin/templates/managing-templates/dependencies.md +++ b/docs/admin/templates/managing-templates/dependencies.md @@ -26,7 +26,7 @@ If you add a Terraform provider to `required_providers` without specifying a version requirement, Terraform will always fetch the latest version on each invocation: -```terraform +```tf terraform { required_providers { coder = { @@ -47,7 +47,7 @@ To prevent this, add a [version constraint](https://developer.hashicorp.com/terraform/language/expressions/version-constraints) to each provider in the `required_providers` block: -```terraform +```tf terraform { required_providers { coder = { @@ -69,7 +69,7 @@ provider will be limited to all versions matching `1.0.x`. The above also applies to Terraform modules. In the below example, the module `razzledazzle` is locked to version `1.2.3`. -```terraform +```tf module "razzledazzle" { source = "registry.example.com/modules/razzle/dazzle" version = "1.2.3" diff --git a/docs/admin/templates/open-in-coder.md b/docs/admin/templates/open-in-coder.md index c0f03b76a8be0..3f8bd1cce58fe 100644 --- a/docs/admin/templates/open-in-coder.md +++ b/docs/admin/templates/open-in-coder.md @@ -25,7 +25,7 @@ The id in the template's `coder_external_auth` data source must match the If you want the template to clone a specific git repo: -```terraform +```tf # Require external authentication to use this template data "coder_external_auth" "github" { id = "primary-github" @@ -56,7 +56,7 @@ resource "coder_agent" "dev" { If you want the template to support any repository via [parameters](./extending-templates/parameters.md) -```terraform +```tf # Require external authentication to use this template data "coder_external_auth" "github" { id = "primary-github" diff --git a/docs/admin/templates/startup-coordination/example.md b/docs/admin/templates/startup-coordination/example.md index c9af9974278d7..612ab61366113 100644 --- a/docs/admin/templates/startup-coordination/example.md +++ b/docs/admin/templates/startup-coordination/example.md @@ -81,7 +81,7 @@ We've omitted some details (such as persistent storage) for brevity, but these a ### Before -```terraform +```tf data "coder_provisioner" "me" {} data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} @@ -139,7 +139,7 @@ Based on the above, we can improve both the startup time and reliability of the Here is the updated version of the template: -```terraform +```tf data "coder_provisioner" "me" {} data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} diff --git a/docs/admin/templates/startup-coordination/usage.md b/docs/admin/templates/startup-coordination/usage.md index 14d257127991f..bdb40a5d82252 100644 --- a/docs/admin/templates/startup-coordination/usage.md +++ b/docs/admin/templates/startup-coordination/usage.md @@ -173,7 +173,7 @@ ensure that your unit does not conflict with others. Add comments explaining why dependencies exist: -```terraform +```tf resource "coder_script" "ide_setup" { # Depends on git-clone because we need .vscode/extensions.json # Depends on env-setup because we need $NODE_PATH configured diff --git a/docs/admin/users/idp-sync.md b/docs/admin/users/idp-sync.md index e204ed0d6c09e..ad08d05eed045 100644 --- a/docs/admin/users/idp-sync.md +++ b/docs/admin/users/idp-sync.md @@ -301,7 +301,7 @@ Visit the Coder UI to confirm these changes: 1. Set the following in your Coder server [configuration](../setup/index.md). - ```env + ```dotenv # Depending on your identity provider configuration, you may need to explicitly request a "roles" scope CODER_OIDC_SCOPES=openid,profile,email,offline_access,roles diff --git a/docs/admin/users/oidc-auth/index.md b/docs/admin/users/oidc-auth/index.md index d62a4d06ea937..17271e333439d 100644 --- a/docs/admin/users/oidc-auth/index.md +++ b/docs/admin/users/oidc-auth/index.md @@ -107,13 +107,13 @@ The general steps to configure persistent user sessions are: For most providers, add the `offline_access` scope: - ```env + ```dotenv CODER_OIDC_SCOPES=openid,profile,email,offline_access ``` For Google, add auth URL parameters (`CODER_OIDC_AUTH_URL_PARAMS`) too: - ```env + ```dotenv CODER_OIDC_SCOPES=openid,profile,email CODER_OIDC_AUTH_URL_PARAMS='{"access_type": "offline", "prompt": "consent"}' ``` diff --git a/docs/admin/users/oidc-auth/refresh-tokens.md b/docs/admin/users/oidc-auth/refresh-tokens.md index 369b30788024b..af5e02cb8fa95 100644 --- a/docs/admin/users/oidc-auth/refresh-tokens.md +++ b/docs/admin/users/oidc-auth/refresh-tokens.md @@ -35,7 +35,7 @@ Go to the Azure Portal > **Azure Active Directory** > **App registrations** > Yo 1. In your [Coder configuration](../../../reference/cli/server.md#--oidc-auth-url-params), request the same scopes: - ```env + ```dotenv CODER_OIDC_SCOPES=openid,profile,email,offline_access ``` @@ -99,7 +99,7 @@ CODER_OIDC_AUTH_URL_PARAMS='{"access_type":"offline"}' 1. In your [Coder configuration](../../../reference/cli/server.md#--oidc-scopes), add the `offline_access` scope: - ```env + ```dotenv CODER_OIDC_SCOPES=openid,profile,email,offline_access ``` diff --git a/docs/admin/users/quotas.md b/docs/admin/users/quotas.md index 95d10a893c14e..d6493689ada7b 100644 --- a/docs/admin/users/quotas.md +++ b/docs/admin/users/quotas.md @@ -29,7 +29,7 @@ quota than an online workspace. A common use case is separating costs for a persistent volume and ephemeral compute: -```terraform +```tf resource "docker_volume" "home_volume" { name = "coder-${data.coder_workspace_owner.me.name}-${data.coder_workspace.me.name}-root" } diff --git a/docs/ai-coder/agent-firewall/index.md b/docs/ai-coder/agent-firewall/index.md index dc53cabd9aa6d..ca410dceaada3 100644 --- a/docs/ai-coder/agent-firewall/index.md +++ b/docs/ai-coder/agent-firewall/index.md @@ -45,7 +45,7 @@ maintain allow lists and share detailed policies with teammates. In your Terraform module, install Agent Firewall with minimal configuration: -```terraform +```tf module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" @@ -55,7 +55,7 @@ module "agent-firewall" { To use a custom policy, pass it inline via `agent_firewall_config`, below is an example of minimal configuration for Claude Code module: -```terraform +```tf module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" @@ -93,7 +93,7 @@ launches Agent Firewall manually inside the workspace picks up the same configuration without extra flags. This is especially convenient for managing extensive allow lists in version control. -```terraform +```tf module "agent-firewall" { source = "registry.coder.com/coder/agent-firewall/coder" version = "0.0.1" diff --git a/docs/ai-coder/agent-firewall/nsjail/ecs.md b/docs/ai-coder/agent-firewall/nsjail/ecs.md index 8e49226d9110d..357b58310f12e 100644 --- a/docs/ai-coder/agent-firewall/nsjail/ecs.md +++ b/docs/ai-coder/agent-firewall/nsjail/ecs.md @@ -26,7 +26,7 @@ with `NET_ADMIN`) so that Agent Firewall can create namespaces and run nsjail. **Task definition (Terraform) — `linuxParameters`:** -```terraform +```tf container_definitions = jsonencode([{ name = "coder-agent" image = "your-coder-agent-image" diff --git a/docs/ai-coder/agent-firewall/nsjail/k8s.md b/docs/ai-coder/agent-firewall/nsjail/k8s.md index c4dbc851c7a0f..1de0e1d37bee4 100644 --- a/docs/ai-coder/agent-firewall/nsjail/k8s.md +++ b/docs/ai-coder/agent-firewall/nsjail/k8s.md @@ -108,7 +108,7 @@ sysctl -w user.max_user_namespaces=65536 If `sysctl -w` is not allowed, configure it via Bottlerocket bootstrap settings when creating the node group (e.g., in Terraform): -```terraform +```tf bootstrap_extra_args = <<-EOT [settings.kernel.sysctl] "user.max_user_namespaces" = "65536" diff --git a/docs/ai-coder/agent-firewall/version.md b/docs/ai-coder/agent-firewall/version.md index cec7ddda17496..28de4d238c7ab 100644 --- a/docs/ai-coder/agent-firewall/version.md +++ b/docs/ai-coder/agent-firewall/version.md @@ -36,7 +36,7 @@ this case, you need to: Example configuration: -```terraform +```tf module "claude-code" { source = "dev.registry.coder.com/coder/claude-code/coder" version = "4.7.0" @@ -52,7 +52,7 @@ If you're using Claude Code module before v4.7.0, the module expects to use Agent Firewall directly. You need to explicitly set `boundary_version` in your Terraform configuration: -```terraform +```tf module "claude-code" { source = "dev.registry.coder.com/coder/claude-code/coder" version = "4.6.0" diff --git a/docs/ai-coder/agents/platform-controls/template-optimization.md b/docs/ai-coder/agents/platform-controls/template-optimization.md index da79087caa8e4..c730254059b2b 100644 --- a/docs/ai-coder/agents/platform-controls/template-optimization.md +++ b/docs/ai-coder/agents/platform-controls/template-optimization.md @@ -236,7 +236,7 @@ The agent reads `display_name` and `description` fields to understand what a parameter controls. Treat these the same way you treat template descriptions — be specific and use natural language. -```terraform +```tf data "coder_parameter" "region" { name = "region" display_name = "Deployment Region" @@ -288,7 +288,7 @@ For guidance on building and maintaining workspace images, see If the template targets a specific repository, pre-clone it and set the working directory so the agent starts in the right place: -```terraform +```tf resource "coder_agent" "main" { os = "linux" arch = "amd64" diff --git a/docs/ai-coder/ai-gateway/clients/claude-code.md b/docs/ai-coder/ai-gateway/clients/claude-code.md index e2ca35467adbc..d110090d25923 100644 --- a/docs/ai-coder/ai-gateway/clients/claude-code.md +++ b/docs/ai-coder/ai-gateway/clients/claude-code.md @@ -53,7 +53,7 @@ account. Template admins can pre-configure Claude Code for a seamless experience. Admins can automatically inject the user's Coder session token and the AI Gateway base URL into the workspace environment. -```terraform +```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" version = "4.7.3" @@ -67,7 +67,7 @@ module "claude-code" { [Coder Tasks](../../tasks.md) provides a framework for agents to complete background development operations autonomously. Claude Code can be configured in your Tasks automatically: -```terraform +```tf resource "coder_ai_task" "task" { count = data.coder_workspace.me.start_count app_id = module.claude-code.task_app_id diff --git a/docs/ai-coder/ai-gateway/clients/codex.md b/docs/ai-coder/ai-gateway/clients/codex.md index 186ced1d6f379..5ce4a21cdb272 100644 --- a/docs/ai-coder/ai-gateway/clients/codex.md +++ b/docs/ai-coder/ai-gateway/clients/codex.md @@ -96,7 +96,7 @@ If configuring within a Coder workspace, you can use the For the centralized API key flow, set `enable_ai_gateway`: -```terraform +```tf module "codex" { source = "registry.coder.com/coder-labs/codex/coder" version = "~> 5.0" @@ -111,7 +111,7 @@ through `base_config_toml` and inject the Coder API token with a `coder_env` resource. Users authenticate by running `codex login` with their ChatGPT account: -```terraform +```tf resource "coder_env" "coder_api_token" { agent_id = coder_agent.main.id name = "CODER_API_TOKEN" diff --git a/docs/ai-coder/ai-gateway/clients/index.md b/docs/ai-coder/ai-gateway/clients/index.md index 9d3fe219f6f1d..e3e5513721ce2 100644 --- a/docs/ai-coder/ai-gateway/clients/index.md +++ b/docs/ai-coder/ai-gateway/clients/index.md @@ -68,7 +68,7 @@ While users can manually configure these tools with a long-lived API key, templa In this example, Claude Code respects these environment variables and will route all requests via AI Gateway. -```terraform +```tf data "coder_workspace_owner" "me" {} data "coder_workspace" "me" {} diff --git a/docs/ai-coder/ai-gateway/clients/mux.md b/docs/ai-coder/ai-gateway/clients/mux.md index 90c1258179253..a7da16fdb5787 100644 --- a/docs/ai-coder/ai-gateway/clients/mux.md +++ b/docs/ai-coder/ai-gateway/clients/mux.md @@ -59,7 +59,7 @@ export ANTHROPIC_BASE_URL="https://coder.example.com/api/v2/ai-gateway/anthropic If you want to run Mux inside a Coder workspace (for example, as a Coder app), you can install it with the [Mux module](https://registry.coder.com/modules/coder/mux) and pre-configure AI Gateway via environment variables on the agent: -```terraform +```tf data "coder_workspace" "me" {} data "coder_workspace_owner" "me" {} diff --git a/docs/ai-coder/custom-agents.md b/docs/ai-coder/custom-agents.md index aefd551762e80..5145ed203b1fc 100644 --- a/docs/ai-coder/custom-agents.md +++ b/docs/ai-coder/custom-agents.md @@ -47,7 +47,7 @@ persistence on the agentapi module. Set `enable_state_persistence = true` so that AgentAPI saves and restores conversation history across pause and resume cycles: -```terraform +```tf module "agentapi" { source = "registry.coder.com/coder/agentapi/coder" version = ">= 2.2.0" diff --git a/docs/ai-coder/github-to-tasks.md b/docs/ai-coder/github-to-tasks.md index 4d99b6986da08..d48c10e78f9dd 100644 --- a/docs/ai-coder/github-to-tasks.md +++ b/docs/ai-coder/github-to-tasks.md @@ -110,7 +110,7 @@ You can also choose to modify the other [input parameters](https://github.com/co If your prompt uses the GitHub CLI `gh`, your template must pass the user's GitHub token to the agent. Add this to your template's Terraform: -```terraform +```tf data "coder_external_auth" "github" { id = "github" # Must match your CODER_EXTERNAL_AUTH_0_ID } diff --git a/docs/ai-coder/tasks-core-principles.md b/docs/ai-coder/tasks-core-principles.md index c9d091f7046fc..404799cf05d04 100644 --- a/docs/ai-coder/tasks-core-principles.md +++ b/docs/ai-coder/tasks-core-principles.md @@ -66,7 +66,7 @@ The following code snippet can be dropped into any existing template in Coder v2 > [!NOTE] > This requires at least version 2.13.0 of the `coder/coder` Terraform provider. -```terraform +```tf data "coder_parameter" "setup_script" { name = "setup_script" display_name = "Setup Script" diff --git a/docs/ai-coder/tasks-lifecycle.md b/docs/ai-coder/tasks-lifecycle.md index bb37b2fd4bb71..60108903b4784 100644 --- a/docs/ai-coder/tasks-lifecycle.md +++ b/docs/ai-coder/tasks-lifecycle.md @@ -108,7 +108,7 @@ version that includes this support. For Claude Code, update the module version in your template: -```terraform +```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" version = ">= 4.8.0" # Minimum version with pause/resume support @@ -160,7 +160,7 @@ modules performing cleanup. **Docker**: Add to your `docker_container` resource: -```terraform +```tf resource "docker_container" "workspace" { # Both attributes are needed for graceful shutdown. destroy_grace_seconds = 300 # 5 minutes @@ -172,7 +172,7 @@ resource "docker_container" "workspace" { **Kubernetes**: Add to your `kubernetes_pod` resource: -```terraform +```tf resource "kubernetes_pod" "main" { timeouts { delete = "6m" # Must exceed the grace period below. diff --git a/docs/ai-coder/tasks-migration.md b/docs/ai-coder/tasks-migration.md index 468e808701e90..7fe2a01e266da 100644 --- a/docs/ai-coder/tasks-migration.md +++ b/docs/ai-coder/tasks-migration.md @@ -72,7 +72,7 @@ resource "coder_ai_task" "task" { Below is a minimal illustrative example of a Coder Tasks template pre-2.28.0. **Note that this is NOT a full template.** -```terraform +```tf terraform { required_providers { coder = { @@ -128,7 +128,7 @@ In v2.28 and above, the following changes were made: Example (**not** a full template): -```terraform +```tf terraform { required_providers { coder = { diff --git a/docs/ai-coder/tasks.md b/docs/ai-coder/tasks.md index e10ef7fc6577e..0e07283877418 100644 --- a/docs/ai-coder/tasks.md +++ b/docs/ai-coder/tasks.md @@ -63,7 +63,7 @@ A template becomes a Task-capable template if it defines a `coder_ai_task` resou > [!NOTE] > The `coder_ai_task` resource is not defined within the [Claude Code Module](https://registry.coder.com/modules/coder/claude-code?tab=readme). You need to define it yourself. -```terraform +```tf terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/add-a-language.md b/docs/get-started/customize-your-template/add-a-language.md index 3562c178349e8..019aaad85a316 100644 --- a/docs/get-started/customize-your-template/add-a-language.md +++ b/docs/get-started/customize-your-template/add-a-language.md @@ -22,7 +22,7 @@ A parameter is a question Coder asks when someone creates a workspace. Each parameter comes from a `coder_parameter` [data source](https://developer.hashicorp.com/terraform/language/data-sources) in the template. The **Programming Languages** parameter is a multi-select list, and each language the reader can choose is an `option` block: -```terraform +```tf data "coder_parameter" "languages" { name = "languages" display_name = "Programming Languages" @@ -54,7 +54,7 @@ Adding an `option` adds a choice to that list. In `main.tf`, find the `data "coder_parameter" "languages"` block. Add a Ruby `option` after the last existing option, before the parameter's closing brace: -```terraform +```tf option { name = "Ruby" value = "ruby" @@ -203,7 +203,7 @@ The shipped presets cover combinations like Go and Python, but none selects Ruby In `main.tf`, find the `# --- Presets ---` section and add a Ruby preset next to the existing ones: -```terraform +```tf data "coder_workspace_preset" "ruby_dev" { name = "Ruby Development" icon = "/icon/ruby.svg" @@ -292,7 +292,7 @@ Your template files after this guide's changes, starting from the Quickstart tem ### main.tf -```terraform +```tf terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/authenticate-to-github.md b/docs/get-started/customize-your-template/authenticate-to-github.md index cdeef7901110e..d783a0a11616c 100644 --- a/docs/get-started/customize-your-template/authenticate-to-github.md +++ b/docs/get-started/customize-your-template/authenticate-to-github.md @@ -36,7 +36,7 @@ The `id` points at a provider configured on the Coder deployment, and the local Add this `coder_external_auth` block to `main.tf`: -```terraform +```tf data "coder_external_auth" "github" { id = "github" } @@ -140,7 +140,7 @@ Both are data sources, and neither creates infrastructure. Your `main.tf` after this guide's changes, starting from the Quickstart template: -```terraform +```tf terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/index.md b/docs/get-started/customize-your-template/index.md index 1fe055141e621..398e76c6338a1 100644 --- a/docs/get-started/customize-your-template/index.md +++ b/docs/get-started/customize-your-template/index.md @@ -29,7 +29,7 @@ It consists of one or more Terraform files (`*.tf`), and it can include template Every Coder template declares the `coder` provider inside a `required_providers` block: -```terraform +```tf terraform { required_providers { coder = { diff --git a/docs/get-started/customize-your-template/install-command-line-tools.md b/docs/get-started/customize-your-template/install-command-line-tools.md index 0989270aac22c..132e4bb905296 100644 --- a/docs/get-started/customize-your-template/install-command-line-tools.md +++ b/docs/get-started/customize-your-template/install-command-line-tools.md @@ -186,7 +186,7 @@ The volume backs `/home/linuxbrew`, the prefix where Homebrew installs, so Homeb In `main.tf`, add a volume for Homebrew's directory next to the existing `home_volume`: -```terraform +```tf resource "docker_volume" "homebrew_volume" { name = "coder-${data.coder_workspace.me.id}-homebrew" lifecycle { @@ -197,7 +197,7 @@ resource "docker_volume" "homebrew_volume" { Then mount it in the `docker_container "workspace"` resource, alongside the block that mounts `/home/coder`: -```terraform +```tf volumes { container_path = "/home/linuxbrew" volume_name = docker_volume.homebrew_volume.name @@ -267,7 +267,7 @@ It installs prebuilt binaries into `/home/coder`, which already persists, so the In `main.tf`, add a script next to the existing `install_languages` resource: -```terraform +```tf resource "coder_script" "install_tools" { agent_id = coder_agent.main.id display_name = "Install Tools" @@ -335,7 +335,7 @@ This approach relies on the `/home/linuxbrew` volume you added in Step 4, so Hom Use this `install_tools` script in place of the mise version: -```terraform +```tf resource "coder_script" "install_tools" { agent_id = coder_agent.main.id display_name = "Install Tools" @@ -395,7 +395,7 @@ Refer to [Resource persistence](../../admin/templates/extending-templates/resour Your `main.tf` after this guide's changes, starting from the Quickstart template: -```terraform +```tf terraform { required_providers { coder = { diff --git a/docs/install/airgap.md b/docs/install/airgap.md index bcce996000a00..c371de54d9a67 100644 --- a/docs/install/airgap.md +++ b/docs/install/airgap.md @@ -118,7 +118,7 @@ ENV TF_CLI_CONFIG_FILE=/home/coder/.terraformrc > [example templates](../../examples/templates) > you intend to use. -```terraform +```tf # filesystem-mirror-example.tfrc provider_installation { filesystem_mirror { @@ -127,7 +127,7 @@ provider_installation { } ``` -```terraform +```tf # network-mirror-example.tfrc provider_installation { network_mirror { diff --git a/docs/install/registry-mirror-artifactory.md b/docs/install/registry-mirror-artifactory.md index fe68f156cb672..efd6ebc5ae820 100644 --- a/docs/install/registry-mirror-artifactory.md +++ b/docs/install/registry-mirror-artifactory.md @@ -51,7 +51,7 @@ Create or update your Terraform CLI configuration file to use Artifactory. On Linux/macOS, create `~/.terraformrc`. On Windows, create `%APPDATA%\terraform.rc`. -```terraform +```tf host "" { services = { "modules.v1" = "https:///artifactory/api/terraform/coder-registry/v1/modules/" @@ -79,7 +79,7 @@ Replace: Update your Coder templates to use Artifactory instead of the public registry: -```terraform +```tf # Before: Direct from Coder registry module "code-server" { source = "registry.coder.com/coder/code-server/coder" @@ -170,7 +170,7 @@ The Artifactory mirror supports all namespaces from the Coder registry: All modules use the same source format: -```terraform +```tf source = "///coder" ``` diff --git a/docs/tutorials/cloning-git-repositories.md b/docs/tutorials/cloning-git-repositories.md index 5d6cdd84c1a10..b166ef8dd1552 100644 --- a/docs/tutorials/cloning-git-repositories.md +++ b/docs/tutorials/cloning-git-repositories.md @@ -29,7 +29,7 @@ With the authentication in place, it is time to set up the template to use the [Coder Registry](https://registry.coder.com/) by adding it to our template's Terraform configuration. -```terraform +```tf module "git-clone" { source = "registry.coder.com/modules/git-clone/coder" version = "1.0.12" @@ -47,7 +47,7 @@ You can also use customize the Git URL and make it dynamic for use cases where a template supports multiple projects. -```terraform +```tf data "coder_parameter" "git_repo" { name = "git_repo" display_name = "Git repository" diff --git a/docs/tutorials/faqs.md b/docs/tutorials/faqs.md index e71b2cb6886ea..f2a0902eb790f 100644 --- a/docs/tutorials/faqs.md +++ b/docs/tutorials/faqs.md @@ -107,7 +107,7 @@ default (shows all), add this block inside the [`coder_agent`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent) of a template and configure as needed: -```terraform +```tf display_apps { vscode = false vscode_insiders = false @@ -143,7 +143,7 @@ In the template, set option to `authenticated` and when a workspace is built with this template, the pretty globe shows up next to path-based `code-server`: -```terraform +```tf resource "coder_app" "code-server" { ... share = "authenticated" @@ -292,7 +292,7 @@ One way is to reference a Terraform module from a GitHub repo to avoid duplication and then just extend it or pass template-specific parameters/resources: -```terraform +```tf # template1/main.tf module "central-coder-module" { source = "github.com/org/central-coder-module" @@ -303,7 +303,7 @@ resource "ebs_volume" "custom_template1_only_resource" { } ``` -```terraform +```tf # template2/main.tf module "central-coder-module" { source = "github.com/org/central-coder-module" @@ -350,7 +350,7 @@ duplicate name errors. This code produces a hashed value that will be difficult to replicate. -```terraform +```tf locals { concatenated_string = "${data.coder_workspace.me.name}+${data.coder_workspace_owner.me.name}" hashed_string = md5(local.concatenated_string) @@ -538,7 +538,7 @@ To achieve this, template admins can use the environment variable This variable allows the system to check if the executed application is on the block list, which includes `scp`, `rsync`, `ftp`, and `nc`. -```terraform +```tf resource "docker_container" "workspace" { ... env = [ diff --git a/docs/tutorials/gcp-to-aws.md b/docs/tutorials/gcp-to-aws.md index 652468d9b6938..c1e767494ed80 100644 --- a/docs/tutorials/gcp-to-aws.md +++ b/docs/tutorials/gcp-to-aws.md @@ -169,7 +169,7 @@ coder: Navigate to your EC2 workspace template in Coder, and configure the AWS provider using the block below: -```terraform +```tf provider "aws" { assume_role_with_web_identity { # enter role ARN here - copy from AWS console diff --git a/docs/tutorials/image-pull-secret.md b/docs/tutorials/image-pull-secret.md index e3e29aebbd39f..a8802bf2f2c52 100644 --- a/docs/tutorials/image-pull-secret.md +++ b/docs/tutorials/image-pull-secret.md @@ -70,7 +70,7 @@ template. In the example below, we define the secret via the `image_pull_secrets` argument. Note that this argument is nested at the same level as the `container` argument: -```terraform +```tf resource "kubernetes_pod" "dev" { metadata { # this must be the same namespace where workspaces will be deployed diff --git a/docs/tutorials/reverse-proxy-apache.md b/docs/tutorials/reverse-proxy-apache.md index b49ed6db57315..ba3b7c37b28ae 100644 --- a/docs/tutorials/reverse-proxy-apache.md +++ b/docs/tutorials/reverse-proxy-apache.md @@ -5,7 +5,7 @@ 1. Start a Coder deployment and be sure to set the following [configuration values](../admin/setup/index.md): - ```env + ```dotenv CODER_HTTP_ADDRESS=127.0.0.1:3000 CODER_ACCESS_URL=https://coder.example.com CODER_WILDCARD_ACCESS_URL=*coder.example.com diff --git a/docs/tutorials/reverse-proxy-nginx.md b/docs/tutorials/reverse-proxy-nginx.md index afc48cd6ef75c..b2435bf46f086 100644 --- a/docs/tutorials/reverse-proxy-nginx.md +++ b/docs/tutorials/reverse-proxy-nginx.md @@ -5,7 +5,7 @@ 1. Start a Coder deployment and be sure to set the following [configuration values](../admin/setup/index.md): - ```env + ```dotenv CODER_HTTP_ADDRESS=127.0.0.1:3000 CODER_ACCESS_URL=https://coder.example.com CODER_WILDCARD_ACCESS_URL=*.coder.example.com diff --git a/docs/tutorials/template-from-scratch.md b/docs/tutorials/template-from-scratch.md index b62beaaee29e3..da48375e7a9cf 100644 --- a/docs/tutorials/template-from-scratch.md +++ b/docs/tutorials/template-from-scratch.md @@ -79,7 +79,7 @@ Edit the Terraform `main.tf` file to provision the workspace's resources. Start by setting up the providers. At a minimum, we need the `coder` provider. For this template, we also need the `docker` provider: -```terraform +```tf terraform { required_providers { coder = { @@ -137,7 +137,7 @@ needs `curl` access to the Coder server. Add this snippet after the last closing `}` in `main.tf` to create the agent: -```terraform +```tf resource "coder_agent" "main" { arch = data.coder_provisioner.me.arch os = "linux" @@ -220,7 +220,7 @@ We installed code-server in the `startup_script` argument. To add code-server to the workspace, make it available in the workspace with a `coder_app` resource. See [web IDEs](../user-guides/workspace-access/web-ides.md) for more examples: -```terraform +```tf resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -241,7 +241,7 @@ resource "coder_app" "code-server" { You can also use a `coder_app` resource to link to external apps, such as links to wikis or cloud consoles: -```terraform +```tf resource "coder_app" "coder-server-doc" { agent_id = coder_agent.main.id icon = "/emojis/1f4dd.png" @@ -271,7 +271,7 @@ Later, we use the Terraform [count](https://developer.hashicorp.com/terraform/language/meta-arguments/count) meta-argument to make sure that our Docker container is ephemeral. -```terraform +```tf resource "docker_volume" "home_volume" { name = "coder-${data.coder_workspace.me.id}-home" # Protect the volume from being deleted due to changes in attributes. @@ -289,7 +289,7 @@ For details, see To set up our Docker container, our template has a `docker_image` resource that uses `build/Dockerfile`, which we created earlier: -```terraform +```tf resource "docker_image" "main" { name = "coder-${data.coder_workspace.me.id}" build { @@ -307,7 +307,7 @@ resource "docker_image" "main" { Our `docker_container` resource uses `coder_workspace` `start_count` to start and stop the Docker container: -```terraform +```tf resource "docker_container" "workspace" { count = data.coder_workspace.me.start_count image = docker_image.main.name @@ -365,7 +365,7 @@ use the Coder CLI. 1. Paste it into the CLI: - ```output + ```text > Welcome to Coder, marc! You're authenticated. $ ``` diff --git a/docs/user-guides/shared-workspaces.md b/docs/user-guides/shared-workspaces.md index a63872fbec4ea..02a3ae75f4bf8 100644 --- a/docs/user-guides/shared-workspaces.md +++ b/docs/user-guides/shared-workspaces.md @@ -102,7 +102,7 @@ To allow other users to access workspace apps, configure subdomain-based access: 2. Set `subdomain = true` on the workspace app. For example, if you use the [code-server module](https://registry.coder.com/modules/coder/code-server): - ```hcl + ```tf module "code-server" { source = "registry.coder.com/coder/code-server/coder" agent_id = coder_agent.main.id diff --git a/docs/user-guides/workspace-access/antigravity.md b/docs/user-guides/workspace-access/antigravity.md index ae4872e92c1c1..b89b29d10c6c3 100644 --- a/docs/user-guides/workspace-access/antigravity.md +++ b/docs/user-guides/workspace-access/antigravity.md @@ -57,7 +57,7 @@ Your Coder administrator can add Antigravity as a one-click workspace app using the [Antigravity module](https://registry.coder.com/modules/coder/antigravity) from the Coder registry: -```terraform +```tf module "antigravity" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/antigravity/coder" diff --git a/docs/user-guides/workspace-access/jetbrains/gateway.md b/docs/user-guides/workspace-access/jetbrains/gateway.md index 5ef42a37f2621..b4e11211e346c 100644 --- a/docs/user-guides/workspace-access/jetbrains/gateway.md +++ b/docs/user-guides/workspace-access/jetbrains/gateway.md @@ -89,7 +89,7 @@ trust store present on your local machine as well as to the Coder plugin setting #### Linux - ```none + ```text /jbr/lib/security/cacerts ``` @@ -101,7 +101,7 @@ trust store present on your local machine as well as to the Coder plugin setting #### macOS - ```none + ```text /jbr/lib/security/cacerts /Library/Application Support/JetBrains/Toolbox/apps/JetBrainsGateway/ch-0//JetBrains Gateway.app/Contents/jbr/Contents/Home/lib/security/cacerts # Path for Toolbox installation ``` @@ -114,7 +114,7 @@ trust store present on your local machine as well as to the Coder plugin setting #### Windows - ```none + ```text C:\Program Files (x86)\\jre\lib\security\cacerts\%USERPROFILE%\AppData\Local\JetBrains\Toolbox\bin\jre\lib\security\cacerts # Path for Toolbox installation ``` diff --git a/docs/user-guides/workspace-access/port-forwarding.md b/docs/user-guides/workspace-access/port-forwarding.md index 04d40a86852bf..26843bcb936f0 100644 --- a/docs/user-guides/workspace-access/port-forwarding.md +++ b/docs/user-guides/workspace-access/port-forwarding.md @@ -75,7 +75,7 @@ workspace's template. This approach shows a visual application icon in the dashboard. See the following `coder_app` example for a Node React app and note the `subdomain` and `share` settings: -```terraform +```tf # node app resource "coder_app" "node-react-app" { agent_id = coder_agent.dev.id diff --git a/docs/user-guides/workspace-access/remote-desktops.md b/docs/user-guides/workspace-access/remote-desktops.md index bc972cddd6cc2..f07589a53993f 100644 --- a/docs/user-guides/workspace-access/remote-desktops.md +++ b/docs/user-guides/workspace-access/remote-desktops.md @@ -38,7 +38,7 @@ coder://coder.example.com/v0/open/ws/myworkspace/agent/main/rdp?username=Adminis To include a Coder Desktop button on the workspace dashboard page, add a `coder_app` resource to the template: -```terraform +```tf locals { server_name = regex("https?:\\/\\/([^\\/]+)", data.coder_workspace.me.access_url)[0] } diff --git a/docs/user-guides/workspace-access/vscode.md b/docs/user-guides/workspace-access/vscode.md index a467fbc3766ca..87ac27da260db 100644 --- a/docs/user-guides/workspace-access/vscode.md +++ b/docs/user-guides/workspace-access/vscode.md @@ -147,7 +147,7 @@ Web or using the workspace's terminal. 1. In the Dockerfile, add instructions to make a folder and to copy the `vsix` files into the newly created folder. - ```Dockerfile + ```dockerfile FROM codercom/enterprise-base:ubuntu # Run below commands as root user From eb204ebd7895df200ecc3f7f8b7fdff45f932d73 Mon Sep 17 00:00:00 2001 From: Nick Vigilante Date: Fri, 10 Jul 2026 20:12:31 +0000 Subject: [PATCH 4/6] fix(docs): use txt and ps1 as canonical brevity tags - text -> txt for command output / no-highlight blocks. Both are Shiki's built-in plain-text fallback (txt/plain are explicit aliases of text, neither uses a real grammar), and GitHub's starry-night renderer doesn't recognize either as a language, so both already render unhighlighted there today. No functional difference; txt is shorter. - powershell -> ps1. Confirmed via shiki.bundledLanguagesInfo that ps1 is a registered PowerShell alias in Shiki. On GitHub's starry-night, the PowerShell grammar's extensions list includes .ps1 (not bare .ps), and flagToScope() falls back to extension matching when a flag isn't a recognized language name, so ps1 resolves to the same highlighting as powershell there too. ps does not: it's neither a registered name nor a registered extension, so it would silently render unhighlighted on GitHub today. - Updated docs/.style/style-guide/formatting.md accordingly. --- docs/.style/style-guide/formatting.md | 17 +++++++++-------- docs/about/contributing/CONTRIBUTING.md | 2 +- docs/about/contributing/documentation.md | 2 +- docs/about/contributing/modules.md | 2 +- docs/about/contributing/templates.md | 2 +- .../integrations/multiple-kube-clusters.md | 2 +- docs/admin/integrations/oauth2-provider.md | 4 ++-- docs/admin/monitoring/notifications/index.md | 4 ++-- docs/admin/networking/port-forwarding.md | 6 +++--- docs/admin/networking/wildcard-access-url.md | 6 +++--- .../extending-templates/agent-metadata.md | 8 ++++---- .../extending-templates/docker-in-workspaces.md | 2 +- .../extending-templates/dynamic-parameters.md | 2 +- .../extending-templates/process-logging.md | 2 +- .../extending-templates/process-priority.md | 2 +- docs/admin/templates/troubleshooting.md | 2 +- docs/admin/users/idp-sync.md | 6 +++--- docs/ai-coder/agents/extending-agents.md | 2 +- docs/ai-coder/agents/getting-started.md | 2 +- .../platform-controls/chat-debug-retention.md | 2 +- .../agents/platform-controls/chat-retention.md | 2 +- .../ai-coder/agents/tasks-to-chats-migration.md | 2 +- docs/ai-coder/agents/tools/index.md | 2 +- docs/ai-coder/ai-gateway/clients/codex.md | 2 +- .../ai-coder/ai-gateway/rebranding-migration.md | 2 +- .../customize-your-template/add-a-language.md | 2 +- .../install-command-line-tools.md | 8 ++++---- docs/get-started/index.md | 12 ++++++------ docs/install/cli.md | 2 +- docs/install/docker.md | 2 +- docs/install/index.md | 2 +- docs/install/rancher.md | 2 +- docs/install/uninstall.md | 4 ++-- docs/install/upgrade.md | 2 +- docs/start/local-deploy.md | 2 +- docs/tutorials/external-database.md | 2 +- docs/tutorials/faqs.md | 4 ++-- docs/tutorials/template-from-scratch.md | 2 +- docs/user-guides/desktop/index.md | 8 ++++---- .../workspace-access/jetbrains/gateway.md | 8 ++++---- .../workspace-access/remote-desktops.md | 4 ++-- docs/user-guides/workspace-access/vscode.md | 2 +- .../workspace-access/web-terminal.md | 12 ++++++------ docs/user-guides/workspace-access/zed.md | 2 +- 44 files changed, 85 insertions(+), 84 deletions(-) diff --git a/docs/.style/style-guide/formatting.md b/docs/.style/style-guide/formatting.md index 21a5ea965958e..8e86125115d65 100644 --- a/docs/.style/style-guide/formatting.md +++ b/docs/.style/style-guide/formatting.md @@ -136,9 +136,10 @@ Use the most specific language tag available: Use `sh` when the block is input the reader types or a script they save, and the block doesn't also show output. - `console` for an interactive session that shows the typed command and its output together. Prefix each typed line with `$`. -- `powershell` for Windows command-line blocks. +- `ps1` for Windows command-line blocks. PowerShell is the default Windows shell in the Coder docs. - `pwsh` is not a valid tag; use `powershell`. + `pwsh` and `powershell` are not the canonical tag; use `ps1`. + `ps1` is Shiki's PowerShell alias, and it's also GitHub's `.ps1` file extension, which its markdown renderer falls back to when a fence label isn't a recognized language name; `ps` isn't registered either way and won't highlight on GitHub today. - `tf` for Terraform and HCL. `terraform` and `hcl` are not the canonical tag; use `tf`. Shiki ships `terraform` and `hcl` as two distinct grammars; `tf` is an alias of the more specific `terraform` grammar (not `hcl`), and matches what nearly every Coder docs code block actually is. @@ -146,8 +147,8 @@ Use the most specific language tag available: - `go` for Go. - `json` for JSON. - `dotenv` for `.env`-style `KEY=VALUE` blocks. -- `text` for command output shown on its own, and for any block with no syntax to highlight. - `output`, `none`, and `url` are not valid tags; use `text`. +- `txt` for command output shown on its own, and for any block with no syntax to highlight. + `text`, `output`, `none`, and `url` are not the canonical tag; use `txt`. - `dockerfile` for Dockerfiles, lowercase. `Dockerfile` (capitalized) is not a valid tag. @@ -155,7 +156,7 @@ Use the most specific language tag available: Use `sh` so the corpus stays consistent. A command with no output shown is `sh`, not `console`. -To show a command together with its output, either use one `console` block with `$` before the typed line, or split the command into an `sh` block and the output into a `text` block. +To show a command together with its output, either use one `console` block with `$` before the typed line, or split the command into an `sh` block and the output into a `txt` block. The auto-generated Coder CLI reference under `docs/reference/cli/` labels its command-usage blocks `console`. That output is generated. @@ -164,8 +165,8 @@ Do not copy the pattern into hand-written pages. The docs site highlights code with [Speed-Highlight](https://github.com/speed-highlight/core), which detects the language from the code content, not from the fence label. The fence label still drives highlighting on GitHub and in most editors, and `markdownlint` rule `MD040` requires one, so always declare the most specific language. A future docs renderer may adopt [Shiki](https://shiki.style), which fails the build on a fence label it doesn't recognize as a language or alias, so use only tags Shiki supports. -For content with no sensible language tag, fall back to `text`. -A fence label needing a grammar Shiki doesn't bundle (for example `promql` or `caddyfile`) stays as-is; register it as a custom grammar when the site adopts Shiki, rather than degrading it to `text`. +For content with no sensible language tag, fall back to `txt`. +A fence label needing a grammar Shiki doesn't bundle (for example `promql` or `caddyfile`) stays as-is; register it as a custom grammar when the site adopts Shiki, rather than degrading it to `txt`. **Do**: @@ -242,7 +243,7 @@ curl -L https://coder.com/install.sh | sh ### Windows -```powershell +```ps1 winget install Coder.Coder ``` diff --git a/docs/about/contributing/CONTRIBUTING.md b/docs/about/contributing/CONTRIBUTING.md index 2df7097b694dd..893989e3e1178 100644 --- a/docs/about/contributing/CONTRIBUTING.md +++ b/docs/about/contributing/CONTRIBUTING.md @@ -232,7 +232,7 @@ RC tags can be created from `main` or from a release branch. The `create-release-branch` type creates `release/X.Y` and tags the next RC in one step, continuing the RC numbering sequence. -```text +```txt main: --*--*--*--*--*--*--*--*--*-- | rc.0 rc.1 | | +--- create-release-branch ---+ diff --git a/docs/about/contributing/documentation.md b/docs/about/contributing/documentation.md index 7f511d9b58df3..1621fd6c1ccaa 100644 --- a/docs/about/contributing/documentation.md +++ b/docs/about/contributing/documentation.md @@ -76,7 +76,7 @@ Use _code font_ for: Use _code blocks_ for code samples and other blocks of code. Be sure to indicate the language your using to apply the proper syntax highlighting. -```text +```txt This is a codeblock. ``` diff --git a/docs/about/contributing/modules.md b/docs/about/contributing/modules.md index 6eb064c11bcb8..410ef750a1868 100644 --- a/docs/about/contributing/modules.md +++ b/docs/about/contributing/modules.md @@ -39,7 +39,7 @@ Before contributing modules, ensure you have: 3. **Understand the structure**: - ```text + ```txt registry/[namespace]/ ├── modules/ # Your modules ├── .images/ # Namespace avatar and screenshots diff --git a/docs/about/contributing/templates.md b/docs/about/contributing/templates.md index 6c9802e88bdb3..7868961f68efb 100644 --- a/docs/about/contributing/templates.md +++ b/docs/about/contributing/templates.md @@ -44,7 +44,7 @@ Before contributing templates, ensure you have: 3. **Understand the structure**: - ```text + ```txt registry/[namespace]/ ├── templates/ # Your templates ├── .images/ # Namespace avatar and screenshots diff --git a/docs/admin/integrations/multiple-kube-clusters.md b/docs/admin/integrations/multiple-kube-clusters.md index 32d5ced73bbfc..ff60ad7f83eba 100644 --- a/docs/admin/integrations/multiple-kube-clusters.md +++ b/docs/admin/integrations/multiple-kube-clusters.md @@ -147,7 +147,7 @@ EOF The output should be similar to: -```text +```txt serviceaccount/coder-v2 created secret/coder-v2 created role.rbac.authorization.k8s.io/coder-v2 created diff --git a/docs/admin/integrations/oauth2-provider.md b/docs/admin/integrations/oauth2-provider.md index 9a8ff0c75880d..16870527b2a78 100644 --- a/docs/admin/integrations/oauth2-provider.md +++ b/docs/admin/integrations/oauth2-provider.md @@ -86,7 +86,7 @@ If client authentication fails, the token endpoint returns **HTTP 401** with an 1. **Authorization Request**: Redirect users to Coder's authorization endpoint: - ```text + ```txt https://coder.example.com/oauth2/authorize? client_id=your-client-id& response_type=code& @@ -148,7 +148,7 @@ confidential clients must include PKCE parameters: 2. Include PKCE parameters in the authorization request: - ```text + ```txt https://coder.example.com/oauth2/authorize? client_id=your-client-id& response_type=code& diff --git a/docs/admin/monitoring/notifications/index.md b/docs/admin/monitoring/notifications/index.md index e965166802cf3..88d6b2df4088e 100644 --- a/docs/admin/monitoring/notifications/index.md +++ b/docs/admin/monitoring/notifications/index.md @@ -148,7 +148,7 @@ After setting the required fields above: 1. Set the following configuration options: - ```text + ```txt CODER_EMAIL_SMARTHOST=smtp.gmail.com:465 CODER_EMAIL_AUTH_USERNAME=@ CODER_EMAIL_AUTH_PASSWORD="" @@ -167,7 +167,7 @@ After setting the required fields above: 1. Set up an account on Microsoft 365 or outlook.com 1. Set the following configuration options: - ```text + ```txt CODER_EMAIL_SMARTHOST=smtp-mail.outlook.com:587 CODER_EMAIL_TLS_STARTTLS=true CODER_EMAIL_AUTH_USERNAME=@ diff --git a/docs/admin/networking/port-forwarding.md b/docs/admin/networking/port-forwarding.md index f5678403adb94..a20439b1e46b9 100644 --- a/docs/admin/networking/port-forwarding.md +++ b/docs/admin/networking/port-forwarding.md @@ -171,7 +171,7 @@ protocol configuration for each shared port individually. You can access any port on the workspace and can configure the port protocol manually by appending a `s` to the port in the URL. -```text +```txt # Uses HTTP https://33295--agent--workspace--user--apps.example.com/ # Uses HTTPS @@ -194,7 +194,7 @@ must include credentials (set `credentials: "include"` if using `fetch`) or the requests cannot be authenticated and you will see an error resembling the following: -```text +```txt Access to fetch at '' from origin '' has been blocked by CORS @@ -207,7 +207,7 @@ resource. If an opaque response serves your needs, set the request's mode to Below is a list of the cross-origin headers Coder sets with example values: -```text +```txt access-control-allow-credentials: true access-control-allow-methods: PUT access-control-allow-headers: X-Custom-Header diff --git a/docs/admin/networking/wildcard-access-url.md b/docs/admin/networking/wildcard-access-url.md index 0f1d50fb2d442..767d95419d1f6 100644 --- a/docs/admin/networking/wildcard-access-url.md +++ b/docs/admin/networking/wildcard-access-url.md @@ -72,13 +72,13 @@ You'll need to configure DNS to point wildcard subdomains to your Coder server: > browsers consider these "public" domains and will refuse Coder's cookies, > which are vital to the proper operation of this feature. -```text +```txt *.coder.example.com A ``` Or alternatively, using a CNAME record: -```text +```txt *.coder.example.com CNAME coder.example.com ``` @@ -99,7 +99,7 @@ export CODER_WILDCARD_ACCESS_URL="*.london.coder.example.com" Each proxy's wildcard domain must have corresponding DNS records: -```text +```txt *.sydney.coder.example.com A *.london.coder.example.com A ``` diff --git a/docs/admin/templates/extending-templates/agent-metadata.md b/docs/admin/templates/extending-templates/agent-metadata.md index 92d43702ca0bf..1c1dd0e7c2ef1 100644 --- a/docs/admin/templates/extending-templates/agent-metadata.md +++ b/docs/admin/templates/extending-templates/agent-metadata.md @@ -94,7 +94,7 @@ You can also show agent metadata for information about the workspace's host. available in most Linux distributions and provides virtual memory, CPU and IO statistics. Running `top` produces output that looks like: -```text +```txt %Cpu(s): 65.8 us, 4.4 sy, 0.0 ni, 29.3 id, 0.3 wa, 0.0 hi, 0.2 si, 0.0 st MiB Mem : 16009.0 total, 493.7 free, 4624.8 used, 10890.5 buff/cache MiB Swap: 0.0 total, 0.0 free, 0.0 used. 11021.3 avail Mem @@ -104,7 +104,7 @@ MiB Swap: 0.0 total, 0.0 free, 0.0 used. 11021.3 avail Mem available in most Linux distributions and provides virtual memory, CPU and IO statistics. Running `vmstat` produces output that looks like: -```text +```txt procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 19580 4781680 12133692 217646944 0 2 4 32 1 0 1 1 98 0 0 @@ -115,7 +115,7 @@ considerably more parseable than `vmstat` but often not included in base images. It is easily installed by most package managers under the name `dstat`. The output of running `dstat 1 1` looks like: -```text +```txt --total-cpu-usage-- -dsk/total- -net/total- ---paging-- ---system-- usr sys idl wai stl| read writ| recv send| in out | int csw 1 1 98 0 0|3422k 25M| 0 0 | 153k 904k| 123k 174k @@ -127,7 +127,7 @@ Agent metadata can generate a significant write load and overwhelm your Coder database if you're not careful. The approximate writes per second can be calculated using the formula: -```text +```txt (metadata_count * num_running_agents * 2) / metadata_avg_interval ``` diff --git a/docs/admin/templates/extending-templates/docker-in-workspaces.md b/docs/admin/templates/extending-templates/docker-in-workspaces.md index b679689155537..998b7cf6de877 100644 --- a/docs/admin/templates/extending-templates/docker-in-workspaces.md +++ b/docs/admin/templates/extending-templates/docker-in-workspaces.md @@ -265,7 +265,7 @@ Before using Podman, please review the following documentation: Rootless containers rely on Linux user-namespaces. [Bottlerocket](https://github.com/bottlerocket-os/bottlerocket) disables them by default (`user.max_user_namespaces = 0`), so Podman commands will return an error until you raise the limit: -```text +```txt cannot clone: Invalid argument user namespaces are not enabled in /proc/sys/user/max_user_namespaces ``` diff --git a/docs/admin/templates/extending-templates/dynamic-parameters.md b/docs/admin/templates/extending-templates/dynamic-parameters.md index f2b2d7b5d2dd6..4dedeeab316c8 100644 --- a/docs/admin/templates/extending-templates/dynamic-parameters.md +++ b/docs/admin/templates/extending-templates/dynamic-parameters.md @@ -839,7 +839,7 @@ Dynamic Parameters require Terraform modules to be archived and stored in the da You may see warnings in the provisioner logs: -```text +```txt [API] 2026-01-29 22:00:22.691 [warn] provisionerd-nixos-0.executor: some (or all) terraform modules were not archived, template will have reduced function skipped_modules=large:git::https://github.com/coder/large-module.git ``` diff --git a/docs/admin/templates/extending-templates/process-logging.md b/docs/admin/templates/extending-templates/process-logging.md index 8653d13f5b687..859cbf4bdf146 100644 --- a/docs/admin/templates/extending-templates/process-logging.md +++ b/docs/admin/templates/extending-templates/process-logging.md @@ -291,7 +291,7 @@ or workspace. To view your logs, go to the CloudWatch dashboard (which is available on the **Log Insights** tab) and run a query similar to the following: -```text +```txt fields @timestamp, log_processed.fields.cmdline | sort @timestamp asc | filter kubernetes.container_name="exectrace" diff --git a/docs/admin/templates/extending-templates/process-priority.md b/docs/admin/templates/extending-templates/process-priority.md index b3d7c3500dc09..bbc9c5af1b71c 100644 --- a/docs/admin/templates/extending-templates/process-priority.md +++ b/docs/admin/templates/extending-templates/process-priority.md @@ -138,7 +138,7 @@ runs another Coder agent. The agent logs whether process priority management is active at startup. Look for these lines in the agent log: -```text +```txt "process priority management enabled" "process priority management not enabled (linux-only)" ``` diff --git a/docs/admin/templates/troubleshooting.md b/docs/admin/templates/troubleshooting.md index 7e2e9d6f2129b..96a4ae58ae15c 100644 --- a/docs/admin/templates/troubleshooting.md +++ b/docs/admin/templates/troubleshooting.md @@ -204,7 +204,7 @@ This error mostly affects Raspberry Pi OS, but might also affect older Debian-ba 1. Add cgroup entries to `cmdline.txt` in `/boot/firmware` (or `/boot/` on older Pi OS releases): - ```text + ```txt cgroup_memory=1 cgroup_enable=memory ``` diff --git a/docs/admin/users/idp-sync.md b/docs/admin/users/idp-sync.md index ad08d05eed045..847b3f8d34a88 100644 --- a/docs/admin/users/idp-sync.md +++ b/docs/admin/users/idp-sync.md @@ -15,7 +15,7 @@ synchronize Coder groups, roles, and organizations based on claims from your IdP To confirm that your OIDC provider is sending claims, log in with OIDC and visit the following URL with an `Owner` account: -```text +```txt https://[coder.example.com]/api/v2/debug/[your-username]/debug-link ``` @@ -53,7 +53,7 @@ group sync for each organization. 1. Fetch the corresponding group IDs using the following endpoint: - ```text + ```txt https://[coder.example.com]/api/v2/groups ``` @@ -335,7 +335,7 @@ You can initiate an organization sync through the Coder dashboard or CLI: 1. Fetch the corresponding organization IDs using the following endpoint: - ```text + ```txt https://[coder.example.com]/api/v2/organizations ``` diff --git a/docs/ai-coder/agents/extending-agents.md b/docs/ai-coder/agents/extending-agents.md index 6b50cb52109e0..01ce25c3d7d8c 100644 --- a/docs/ai-coder/agents/extending-agents.md +++ b/docs/ai-coder/agents/extending-agents.md @@ -39,7 +39,7 @@ a path-safe convenience for reading supporting files. ### Directory structure -```text +```txt .agents/skills/ ├── deep-review/ │ ├── SKILL.md diff --git a/docs/ai-coder/agents/getting-started.md b/docs/ai-coder/agents/getting-started.md index 6120644519bb5..8089cf079ccba 100644 --- a/docs/ai-coder/agents/getting-started.md +++ b/docs/ai-coder/agents/getting-started.md @@ -269,7 +269,7 @@ curl -X POST https://coder.example.com/api/experimental/chats \ Stream updates in real time by connecting to the WebSocket endpoint: -```text +```txt GET /api/experimental/chats/{chat}/stream ``` diff --git a/docs/ai-coder/agents/platform-controls/chat-debug-retention.md b/docs/ai-coder/agents/platform-controls/chat-debug-retention.md index b715800988d27..d9cbb7bf1842f 100644 --- a/docs/ai-coder/agents/platform-controls/chat-debug-retention.md +++ b/docs/ai-coder/agents/platform-controls/chat-debug-retention.md @@ -27,7 +27,7 @@ is `3650` days. Use the experimental admin API to read or update the value: -```text +```txt GET /api/experimental/chats/config/debug-retention-days PUT /api/experimental/chats/config/debug-retention-days ``` diff --git a/docs/ai-coder/agents/platform-controls/chat-retention.md b/docs/ai-coder/agents/platform-controls/chat-retention.md index d6454104e4743..ebc1aa1c55c34 100644 --- a/docs/ai-coder/agents/platform-controls/chat-retention.md +++ b/docs/ai-coder/agents/platform-controls/chat-retention.md @@ -30,7 +30,7 @@ disable retention entirely. Use the experimental admin API to read or update the value: -```text +```txt GET /api/experimental/chats/config/retention-days PUT /api/experimental/chats/config/retention-days ``` diff --git a/docs/ai-coder/agents/tasks-to-chats-migration.md b/docs/ai-coder/agents/tasks-to-chats-migration.md index 8fb2b86322ccb..ee0959619919b 100644 --- a/docs/ai-coder/agents/tasks-to-chats-migration.md +++ b/docs/ai-coder/agents/tasks-to-chats-migration.md @@ -167,7 +167,7 @@ curl https://coder.example.com/api/v2/tasks/me/my-task/logs \ **Chats API**. You open a one-way WebSocket connection: -```text +```txt GET wss://coder.example.com/api/experimental/chats/{chat}/stream ``` diff --git a/docs/ai-coder/agents/tools/index.md b/docs/ai-coder/agents/tools/index.md index f4eab0cba7e65..bf9ed23dff709 100644 --- a/docs/ai-coder/agents/tools/index.md +++ b/docs/ai-coder/agents/tools/index.md @@ -90,7 +90,7 @@ outranks a lower tier, regardless of usage. Within a relevance tier, or when no query is given, templates are ordered by an affinity score: -```text +```txt affinity = 10 x (active + 0.5 x deleted) x 0.5^(days_since_last_use / 14) + ln(1 + active_developers) ``` diff --git a/docs/ai-coder/ai-gateway/clients/codex.md b/docs/ai-coder/ai-gateway/clients/codex.md index 5ce4a21cdb272..cc92d0f89fd97 100644 --- a/docs/ai-coder/ai-gateway/clients/codex.md +++ b/docs/ai-coder/ai-gateway/clients/codex.md @@ -150,7 +150,7 @@ Responses API. AI Gateway does not support WebSocket transport, so each request attempts a WebSocket connection and retries up to 5 times before falling back to HTTPS. When this happens you will see: -```text +```txt Falling back from WebSockets to HTTPS transport. ``` diff --git a/docs/ai-coder/ai-gateway/rebranding-migration.md b/docs/ai-coder/ai-gateway/rebranding-migration.md index 1404f7bcc390f..2103d025c9cc4 100644 --- a/docs/ai-coder/ai-gateway/rebranding-migration.md +++ b/docs/ai-coder/ai-gateway/rebranding-migration.md @@ -146,7 +146,7 @@ Unlike the scalar settings above, you **cannot mix the two prefixes**. Setting both `CODER_AIBRIDGE_PROVIDER_*` and `CODER_AI_GATEWAY_PROVIDER_*` variables in the same deployment causes startup to fail with: -```text +```txt cannot mix CODER_AIBRIDGE_PROVIDER_* and CODER_AI_GATEWAY_PROVIDER_* environment variables, please consolidate onto CODER_AI_GATEWAY_PROVIDER_* ``` diff --git a/docs/get-started/customize-your-template/add-a-language.md b/docs/get-started/customize-your-template/add-a-language.md index 019aaad85a316..0638f84bd2f7a 100644 --- a/docs/get-started/customize-your-template/add-a-language.md +++ b/docs/get-started/customize-your-template/add-a-language.md @@ -128,7 +128,7 @@ ruby --version The command fails: -```text +```txt ruby: command not found ``` diff --git a/docs/get-started/customize-your-template/install-command-line-tools.md b/docs/get-started/customize-your-template/install-command-line-tools.md index 132e4bb905296..62b3b09badf2b 100644 --- a/docs/get-started/customize-your-template/install-command-line-tools.md +++ b/docs/get-started/customize-your-template/install-command-line-tools.md @@ -132,7 +132,7 @@ coder ssh When you reconnect, your shell prints an error before you run anything: -```text +```txt bash: /home/linuxbrew/.linuxbrew/bin/brew: No such file or directory ``` @@ -146,7 +146,7 @@ Check each tool to see what survived. bat --version ``` -```text +```txt bat 0.26.1 ``` @@ -156,7 +156,7 @@ bat 0.26.1 rg --version ``` -```text +```txt bash: rg: command not found ``` @@ -166,7 +166,7 @@ So is `brew` itself: brew --version ``` -```text +```txt bash: brew: command not found ``` diff --git a/docs/get-started/index.md b/docs/get-started/index.md index f5b3848707c78..eb5e8e35d8191 100644 --- a/docs/get-started/index.md +++ b/docs/get-started/index.md @@ -127,7 +127,7 @@ Windows Subsystem for Linux (WSL2) or Hyper-V layer if it isn't already enabled. or create a `.wslconfig` file in the `%USERPROFILE%` directory with the following contents - ```text + ```txt [wsl2] kernelCommandLine=cgroup_no_v1=all ``` @@ -176,7 +176,7 @@ is installed. [`winget`](https://learn.microsoft.com/en-us/windows/package-manager/winget/#use-winget) package manager to install Coder: - ```powershell + ```ps1 winget install Coder.Coder ``` @@ -339,7 +339,7 @@ Now that you have your own workspace running, you can [customize your template]( When creating a workspace from a Docker template, you may see an error like: -```text +```txt Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ``` @@ -420,7 +420,7 @@ In that case, point Coder at the socket with the `DOCKER_HOST` environment varia ### Can't start Coder server: Address already in use -```text +```txt Encountered an error running "coder server", see "coder server --help" for more information error: configure http(s): listen tcp 127.0.0.1:3000: bind: address already in use ``` @@ -474,13 +474,13 @@ then start the server again. 1. Identify the process using port 3000 in PowerShell: - ```powershell + ```ps1 Get-NetTCPConnection -LocalPort 3000 | Select-Object OwningProcess ``` 1. Stop the process using the PID from the previous command: - ```powershell + ```ps1 Stop-Process -Id ``` diff --git a/docs/install/cli.md b/docs/install/cli.md index 38e7d2ede9f93..a8e5429143c82 100644 --- a/docs/install/cli.md +++ b/docs/install/cli.md @@ -35,7 +35,7 @@ Alternatively, you can use the [`winget`](https://learn.microsoft.com/en-us/windows/package-manager/winget/#use-winget) package manager to install Coder: -```powershell +```ps1 winget install Coder.Coder ``` diff --git a/docs/install/docker.md b/docs/install/docker.md index 7d8f23715f109..999c980a4f6fe 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -105,7 +105,7 @@ Replace `ghcr.io/coder/coder:latest` in the `docker run` command in the If you see an error like: -```text +```txt Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ``` diff --git a/docs/install/index.md b/docs/install/index.md index 8e4c4e950f1f4..e78cea240e135 100644 --- a/docs/install/index.md +++ b/docs/install/index.md @@ -45,7 +45,7 @@ Alternatively, you can use the [`winget`](https://learn.microsoft.com/en-us/windows/package-manager/winget/#use-winget) package manager to install Coder: -```powershell +```ps1 winget install Coder.Coder ``` diff --git a/docs/install/rancher.md b/docs/install/rancher.md index f8144e56327b4..098a5fbac7c63 100644 --- a/docs/install/rancher.md +++ b/docs/install/rancher.md @@ -65,7 +65,7 @@ helm install coder-db bitnami/postgresql \ After installation, the cluster-internal database URL will be: -```text +```txt postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable ``` diff --git a/docs/install/uninstall.md b/docs/install/uninstall.md index c04bd6e9c2723..12f1f96d0a7fa 100644 --- a/docs/install/uninstall.md +++ b/docs/install/uninstall.md @@ -54,7 +54,7 @@ sudo rm /usr/local/bin/coder ## Windows -```powershell +```ps1 winget uninstall Coder.Coder ``` @@ -89,7 +89,7 @@ rm -rf ~/Library/Application\ Support/coderv2 ## Windows -```powershell +```ps1 rmdir %AppData%\coderv2 ``` diff --git a/docs/install/upgrade.md b/docs/install/upgrade.md index 1c93a4be10eb8..2c26614a30fc7 100644 --- a/docs/install/upgrade.md +++ b/docs/install/upgrade.md @@ -72,7 +72,7 @@ Download the latest Windows installer or binary from [GitHub releases](https://github.com/coder/coder/releases/latest), or upgrade from Winget. -```powershell +```ps1 winget install Coder.Coder ``` diff --git a/docs/start/local-deploy.md b/docs/start/local-deploy.md index eb3b2af131853..c478fe3ce1ec0 100644 --- a/docs/start/local-deploy.md +++ b/docs/start/local-deploy.md @@ -37,7 +37,7 @@ You can use the [`winget`](https://learn.microsoft.com/en-us/windows/package-manager/winget/#use-winget) package manager to install Coder: -```powershell +```ps1 winget install Coder.Coder ``` diff --git a/docs/tutorials/external-database.md b/docs/tutorials/external-database.md index a115192a47d63..07a0580f98daa 100644 --- a/docs/tutorials/external-database.md +++ b/docs/tutorials/external-database.md @@ -44,7 +44,7 @@ CREATE SCHEMA myschema; Once the schema is created, you can list all schemas with `\dn`: -```text +```txt List of schemas Name | Owner -----------+---------- diff --git a/docs/tutorials/faqs.md b/docs/tutorials/faqs.md index f2a0902eb790f..848cc6c386842 100644 --- a/docs/tutorials/faqs.md +++ b/docs/tutorials/faqs.md @@ -241,7 +241,7 @@ can start Caddy as a `systemd` service. The Caddyfile configuration will appear like this where `127.0.0.1:3000` is your `CODER_ACCESS_URL`: -```text +```txt coder.example.com { reverse_proxy 127.0.0.1:3000 @@ -269,7 +269,7 @@ the existing Caddy binary in `usr/bin` and restart the Caddy service. The updated Caddyfile configuration will look like this: -```text +```txt *.coder.example.com, coder.example.com { reverse_proxy 127.0.0.1:3000 diff --git a/docs/tutorials/template-from-scratch.md b/docs/tutorials/template-from-scratch.md index da48375e7a9cf..2d85c95f84e9f 100644 --- a/docs/tutorials/template-from-scratch.md +++ b/docs/tutorials/template-from-scratch.md @@ -365,7 +365,7 @@ use the Coder CLI. 1. Paste it into the CLI: - ```text + ```txt > Welcome to Coder, marc! You're authenticated. $ ``` diff --git a/docs/user-guides/desktop/index.md b/docs/user-guides/desktop/index.md index e458883505b42..5bafbd4509464 100644 --- a/docs/user-guides/desktop/index.md +++ b/docs/user-guides/desktop/index.md @@ -140,7 +140,7 @@ Organization administrators can also enforce this setting across managed devices Set the `Updater:Enable` registry value to `0` under `HKEY_LOCAL_MACHINE\SOFTWARE\Coder Desktop\App`: -```powershell +```ps1 New-Item -Path "HKLM:\SOFTWARE\Coder Desktop\App" -Force New-ItemProperty -Path "HKLM:\SOFTWARE\Coder Desktop\App" -Name "Updater:Enable" -Value 0 -PropertyType DWord -Force ``` @@ -202,19 +202,19 @@ Coder Desktop has three components that write logs: the app (UI), the VPN servic 1. App log (daily rolling): - ```powershell + ```ps1 %LOCALAPPDATA%\CoderDesktop\app.log ``` 2. VPN service log (default install path): - ```powershell + ```ps1 C:\Program Files\Coder Desktop\coder-desktop-service.log ``` 3. File sync (Mutagen) daemon log, if you use file sync: - ```powershell + ```ps1 %LOCALAPPDATA%\CoderDesktop\mutagen\daemon.log ``` diff --git a/docs/user-guides/workspace-access/jetbrains/gateway.md b/docs/user-guides/workspace-access/jetbrains/gateway.md index b4e11211e346c..7dbfc37375455 100644 --- a/docs/user-guides/workspace-access/jetbrains/gateway.md +++ b/docs/user-guides/workspace-access/jetbrains/gateway.md @@ -89,7 +89,7 @@ trust store present on your local machine as well as to the Coder plugin setting #### Linux - ```text + ```txt /jbr/lib/security/cacerts ``` @@ -101,7 +101,7 @@ trust store present on your local machine as well as to the Coder plugin setting #### macOS - ```text + ```txt /jbr/lib/security/cacerts /Library/Application Support/JetBrains/Toolbox/apps/JetBrainsGateway/ch-0//JetBrains Gateway.app/Contents/jbr/Contents/Home/lib/security/cacerts # Path for Toolbox installation ``` @@ -114,13 +114,13 @@ trust store present on your local machine as well as to the Coder plugin setting #### Windows - ```text + ```txt C:\Program Files (x86)\\jre\lib\security\cacerts\%USERPROFILE%\AppData\Local\JetBrains\Toolbox\bin\jre\lib\security\cacerts # Path for Toolbox installation ``` Use the `keytool` included in the JetBrains Gateway installation: - ```powershell + ```ps1 & 'C:\Program Files\JetBrains\JetBrains Gateway /jbr/bin/keytool.exe' 'C:\Program Files\JetBrains\JetBrains Gateway /jre/lib/security/cacerts' -import -alias coder -file # command for Toolbox installation diff --git a/docs/user-guides/workspace-access/remote-desktops.md b/docs/user-guides/workspace-access/remote-desktops.md index f07589a53993f..b1e22896b2201 100644 --- a/docs/user-guides/workspace-access/remote-desktops.md +++ b/docs/user-guides/workspace-access/remote-desktops.md @@ -26,13 +26,13 @@ You can also use a URI handler to launch an RDP session directly. The URI format is: -```text +```txt coder:///v0/open/ws//agent//rdp?username=&password= ``` For example: -```text +```txt coder://coder.example.com/v0/open/ws/myworkspace/agent/main/rdp?username=Administrator&password=coderRDP! ``` diff --git a/docs/user-guides/workspace-access/vscode.md b/docs/user-guides/workspace-access/vscode.md index 87ac27da260db..739d7c9351d6e 100644 --- a/docs/user-guides/workspace-access/vscode.md +++ b/docs/user-guides/workspace-access/vscode.md @@ -27,7 +27,7 @@ You can install our extension manually in VS Code using the command palette. Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter. -```text +```txt ext install coder.coder-remote ``` diff --git a/docs/user-guides/workspace-access/web-terminal.md b/docs/user-guides/workspace-access/web-terminal.md index cdfbe75ed1d0f..54fd93a4cce18 100644 --- a/docs/user-guides/workspace-access/web-terminal.md +++ b/docs/user-guides/workspace-access/web-terminal.md @@ -42,13 +42,13 @@ WebSocket connection. You can also bookmark or share direct terminal URLs: -```text +```txt https://coder.example.com/@username/workspace-name/terminal ``` To access a specific agent in a multi-agent workspace: -```text +```txt https://coder.example.com/@username/workspace-name.agent-name/terminal ``` @@ -155,7 +155,7 @@ This makes it seamless to open development servers running in your workspace. You can open a terminal with a specific command by adding a query parameter: -```text +```txt https://coder.example.com/@user/workspace/terminal?command=htop ``` @@ -174,13 +174,13 @@ parameter internally, which resolves the command from the agent's app list. For workspaces with multiple Docker containers, specify which container to connect to: -```text +```txt https://coder.example.com/@user/workspace/terminal?container=sidecar ``` You can also specify the container user: -```text +```txt https://coder.example.com/@user/workspace/terminal?container=app&container_user=node ``` @@ -190,7 +190,7 @@ https://coder.example.com/@user/workspace/terminal?container=app&container_user= Enable debug information to monitor connection latency: -```text +```txt https://coder.example.com/@user/workspace/terminal?debug ``` diff --git a/docs/user-guides/workspace-access/zed.md b/docs/user-guides/workspace-access/zed.md index d2d507363c7c1..4a30355bc29cc 100644 --- a/docs/user-guides/workspace-access/zed.md +++ b/docs/user-guides/workspace-access/zed.md @@ -36,7 +36,7 @@ Use the Coder CLI to log in and configure SSH, then connect to your workspace wi [`winget`](https://learn.microsoft.com/en-us/windows/package-manager/winget/#use-winget) package manager to install Coder: - ```powershell + ```ps1 winget install Coder.Coder ``` From e78b5e830c9fe5d2e980ae4f472bc51f08efcbd0 Mon Sep 17 00:00:00 2001 From: Nick Vigilante Date: Fri, 10 Jul 2026 20:53:46 +0000 Subject: [PATCH 5/6] fix(docs): unify bash/shell to sh, markdown to md, jsonc to json, ts to tsx, yml to yaml - bash, shell -> sh (732 fences). Shiki bundles bash/sh/shell/zsh as aliases of a single shellscript grammar; GitHub's starry-night shell grammar likewise treats all three as names for source.shell. Applies the style guide's existing (but previously unenforced) sh preference across the whole corpus. - markdown -> md (4 fences). Shiki's markdown grammar has md as an explicit alias; GitHub's markdown grammar likewise lists md among its names. - jsonc -> json (1 fence, docs/ai-coder/ai-gateway/clients/mux.md). The block has no comments or trailing commas, so it doesn't need the JSON-with-comments grammar; jsonc stays reserved for blocks that actually use it. - ts -> tsx (2 fences, docs/about/contributing/frontend.md). Verified the actual content tokenizes identically under both grammars (no legacy angle-bracket type-assertion syntax present), and one sibling block in the same file already needs tsx for real JSX, so tsx is safe as the single tag for that file's TypeScript blocks. - yml -> yaml (1 fence). Shiki and GitHub both alias yml to yaml. - Updated docs/.style/style-guide/formatting.md with the new canonical tags, including a note on tsx's legacy-cast-syntax caveat and on jsonc's narrower scope. --- .../accessibility-and-inclusion.md | 8 +- docs/.style/style-guide/audience-and-scope.md | 18 +- .../capitalization-and-punctuation.md | 12 +- docs/.style/style-guide/formatting.md | 25 ++- .../style-guide/numbers-units-and-dates.md | 4 +- docs/.style/style-guide/word-choice.md | 4 +- docs/about/contributing/CONTRIBUTING.md | 10 +- docs/about/contributing/backend.md | 8 +- docs/about/contributing/frontend.md | 6 +- docs/about/contributing/modules.md | 24 +-- docs/about/contributing/templates.md | 22 +- docs/admin/external-auth/index.md | 6 +- docs/admin/infrastructure/scale-utility.md | 8 +- .../envbuilder/add-envbuilder.md | 8 +- docs/admin/integrations/dx-data-cloud.md | 6 +- docs/admin/integrations/kubernetes-logs.md | 2 +- .../integrations/multiple-kube-clusters.md | 14 +- docs/admin/integrations/oauth2-provider.md | 24 +-- docs/admin/integrations/vault.md | 2 +- docs/admin/licensing/index.md | 4 +- docs/admin/monitoring/health-check.md | 6 +- docs/admin/monitoring/notifications/index.md | 4 +- docs/admin/monitoring/notifications/slack.md | 10 +- docs/admin/monitoring/notifications/teams.md | 2 +- docs/admin/networking/index.md | 4 +- docs/admin/networking/wildcard-access-url.md | 8 +- docs/admin/networking/workspace-proxies.md | 18 +- .../provisioners/manage-provisioner-jobs.md | 4 +- docs/admin/security/audit-logs.md | 4 +- docs/admin/security/database-encryption.md | 4 +- docs/admin/setup/appearance.md | 2 +- docs/admin/setup/data-retention.md | 4 +- docs/admin/setup/index.md | 4 +- .../docker-in-workspaces.md | 10 +- .../extending-templates/external-auth.md | 2 +- .../jetbrains-airgapped.md | 8 +- .../jetbrains-preinstall.md | 8 +- .../templates/extending-templates/modules.md | 8 +- .../extending-templates/parameters.md | 2 +- .../prebuilt-workspaces.md | 10 +- .../extending-templates/process-logging.md | 8 +- .../extending-templates/variables.md | 2 +- .../managing-templates/external-workspaces.md | 12 +- .../templates/managing-templates/index.md | 2 +- .../templates/startup-coordination/example.md | 2 +- .../templates/startup-coordination/index.md | 2 +- .../startup-coordination/troubleshooting.md | 20 +- .../templates/startup-coordination/usage.md | 16 +- docs/admin/templates/troubleshooting.md | 8 +- docs/admin/users/github-auth.md | 14 +- docs/admin/users/idp-sync.md | 4 +- docs/admin/users/index.md | 16 +- docs/admin/users/organizations.md | 2 +- docs/ai-coder/agent-firewall/index.md | 2 +- docs/ai-coder/agent-firewall/nsjail/docker.md | 2 +- docs/ai-coder/agent-firewall/nsjail/k8s.md | 2 +- docs/ai-coder/agents/extending-agents.md | 4 +- .../agents/platform-controls/advisor.md | 4 +- .../platform-controls/virtual-desktop.md | 4 +- .../ai-gateway/ai-gateway-proxy/setup.md | 46 ++--- .../ai-gateway/clients/claude-code.md | 6 +- docs/ai-coder/ai-gateway/clients/codex.md | 6 +- docs/ai-coder/ai-gateway/clients/copilot.md | 6 +- docs/ai-coder/ai-gateway/clients/mux.md | 2 +- docs/ai-coder/ai-gateway/mcp.md | 2 +- docs/ai-coder/github-to-tasks.md | 6 +- docs/install/airgap.md | 4 +- docs/install/cloud/azure-vm.md | 12 +- docs/install/cloud/compute-engine.md | 2 +- docs/install/docker.md | 6 +- docs/install/kubernetes.md | 14 +- .../kubernetes-azure-app-gateway.md | 8 +- docs/install/openshift.md | 14 +- docs/install/rancher.md | 4 +- docs/install/releases/feature-stages.md | 4 +- docs/install/releases/index.md | 2 +- docs/install/uninstall.md | 18 +- docs/install/upgrade-best-practices.md | 10 +- docs/install/upgrade.md | 10 +- docs/reference/agent-api/debug.md | 8 +- docs/reference/api/agents.md | 46 ++--- docs/reference/api/aigateway.md | 8 +- docs/reference/api/aiproviders.md | 10 +- docs/reference/api/applications.md | 4 +- docs/reference/api/audit.md | 2 +- docs/reference/api/authentication.md | 2 +- docs/reference/api/authorization.md | 14 +- docs/reference/api/builds.md | 22 +- docs/reference/api/chats.md | 40 ++-- docs/reference/api/debug.md | 10 +- docs/reference/api/enterprise.md | 190 +++++++++--------- docs/reference/api/files.md | 4 +- docs/reference/api/general.md | 20 +- docs/reference/api/git.md | 10 +- docs/reference/api/initscript.md | 2 +- docs/reference/api/insights.md | 10 +- docs/reference/api/members.md | 22 +- docs/reference/api/notifications.md | 26 +-- docs/reference/api/organizations.md | 14 +- docs/reference/api/portsharing.md | 6 +- docs/reference/api/prebuilds.md | 4 +- docs/reference/api/provisioning.md | 2 +- docs/reference/api/secrets.md | 10 +- docs/reference/api/tasks.md | 20 +- docs/reference/api/templatebuilder.md | 8 +- docs/reference/api/templates.md | 76 +++---- docs/reference/api/users.md | 70 +++---- docs/reference/api/workspaceproxies.md | 2 +- docs/reference/api/workspaces.md | 46 ++--- docs/reference/index.md | 8 +- docs/start/local-deploy.md | 2 +- .../best-practices/security-best-practices.md | 2 +- .../best-practices/speed-up-templates.md | 8 +- docs/tutorials/configuring-okta.md | 8 +- docs/tutorials/external-database.md | 6 +- docs/tutorials/faqs.md | 4 +- .../tutorials/persistent-shared-workspaces.md | 24 +-- docs/tutorials/postgres-ssl.md | 8 +- docs/tutorials/reverse-proxy-apache.md | 24 +-- docs/tutorials/reverse-proxy-caddy.md | 8 +- docs/tutorials/reverse-proxy-nginx.md | 26 +-- docs/tutorials/template-from-scratch.md | 2 +- docs/tutorials/testing-templates.md | 4 +- .../desktop/desktop-connect-sync.md | 6 +- docs/user-guides/desktop/index.md | 14 +- .../workspace-access/emacs-tramp.md | 4 +- docs/user-guides/workspace-access/index.md | 6 +- .../workspace-access/jetbrains/fleet.md | 4 +- .../workspace-access/jetbrains/gateway.md | 4 +- .../workspace-access/jetbrains/toolbox.md | 2 +- .../workspace-access/remote-desktops.md | 2 +- docs/user-guides/workspace-access/vscode.md | 2 +- .../workspace-access/web-terminal.md | 4 +- docs/user-guides/workspace-access/zed.md | 6 +- docs/user-guides/workspace-dotfiles.md | 4 +- docs/user-guides/workspace-management.md | 10 +- 136 files changed, 781 insertions(+), 774 deletions(-) diff --git a/docs/.style/style-guide/accessibility-and-inclusion.md b/docs/.style/style-guide/accessibility-and-inclusion.md index acf71a19a603d..761a0ad23c125 100644 --- a/docs/.style/style-guide/accessibility-and-inclusion.md +++ b/docs/.style/style-guide/accessibility-and-inclusion.md @@ -24,7 +24,7 @@ Skipping a level breaks the outline. **Do**: -```markdown +```md # Configure your workspace This page walks through the configuration options exposed on a Coder workspace. @@ -52,7 +52,7 @@ Define them in the template or in the workspace's parameters. **Don't**: -```markdown +```md # Configure your workspace # Configure your environment @@ -129,7 +129,7 @@ Captions follow the image in a `` tag. Aim for one or two sentences that convey the same information a sighted reader would extract from the image. Lead with the subject, not "An image of" or "A screenshot showing". -```markdown +```md ![Template Insights dashboard with weekly active users and connection latency charts](../../images/admin/templates/template-insights.png) The Template Insights dashboard with active-user and connection-latency widgets. @@ -144,7 +144,7 @@ For complex diagrams that can't be summarized in alt text, provide a longer desc Mark images that carry no information beyond visual decoration with empty alt text. Empty alt text tells the screen reader to skip the image rather than announce a meaningless filename. -```markdown +```md ![](../../images/decorative/divider.png) ``` diff --git a/docs/.style/style-guide/audience-and-scope.md b/docs/.style/style-guide/audience-and-scope.md index a51707d7e05f6..5b1828d81ee63 100644 --- a/docs/.style/style-guide/audience-and-scope.md +++ b/docs/.style/style-guide/audience-and-scope.md @@ -29,7 +29,7 @@ Section tags don't save readers from scanning content that doesn't apply to them **Do**: -```markdown +```md # Connect Visual Studio Code to your Coder workspace *Audience: a developer with an existing Coder workspace.* @@ -41,7 +41,7 @@ For Windsurf, refer to [Windsurf](./windsurf.md). **Don't**: -```markdown +```md # Connect to your Coder workspace This page covers Visual Studio Code, Cursor, Windsurf, JetBrains, Vim, the web terminal, and SSH. @@ -66,7 +66,7 @@ A page that helps the reader accomplish two unrelated outcomes hides each outcom **Do**: -```markdown +```md # Configure single sign-on with Okta This page walks through configuring OIDC single sign-on against an Okta tenant. @@ -76,7 +76,7 @@ For Google Workspace, refer to [Configure SSO with Google Workspace](./sso-googl **Don't**: -```markdown +```md # Authentication This page covers OIDC providers (Okta, Azure AD, Google Workspace, generic OIDC), @@ -100,7 +100,7 @@ A hub page is appropriate when: **Do**: -```markdown +```md # Authentication This page is the entry point for configuring authentication in Coder. @@ -114,7 +114,7 @@ Pick the provider that matches your identity source: **Don't**: -```markdown +```md # Authentication This page covers OIDC, SAML, GitHub OAuth, password authentication, and the API token model. @@ -153,7 +153,7 @@ Name the audience by the role the reader recognizes from their own work (`develo **Do**: -```markdown +```md # Connect Visual Studio Code to your Coder workspace This guide is for a developer with an existing Coder workspace. @@ -164,7 +164,7 @@ For Windsurf, refer to [Windsurf](./windsurf.md). **Don't**: -```markdown +```md # Kubernetes Coder runs on Kubernetes. @@ -185,7 +185,7 @@ For pages of that kind, add an `IMPORTANT` callout at the beginning of the page **Do**: -```markdown +```md # Configure single sign-on with Okta This guide is for a Coder deployment administrator diff --git a/docs/.style/style-guide/capitalization-and-punctuation.md b/docs/.style/style-guide/capitalization-and-punctuation.md index 087b7239c0f06..4fa5101a1dfc7 100644 --- a/docs/.style/style-guide/capitalization-and-punctuation.md +++ b/docs/.style/style-guide/capitalization-and-punctuation.md @@ -13,7 +13,7 @@ This rule covers H1 through H6 and matches the way the heading reads aloud. **Do**: -```markdown +```md # Configure your workspace ## Set up SSH access ### Connect through JetBrains Toolbox @@ -21,7 +21,7 @@ This rule covers H1 through H6 and matches the way the heading reads aloud. **Don't**: -```markdown +```md # Configure Your Workspace ## Set Up SSH Access ### Connect Through JetBrains Toolbox @@ -38,7 +38,7 @@ Reserve gerund-leading headings for the rare case where neither alternative read **Do**: -```markdown +```md ## Install Coder ## Installation ## Configure your workspace @@ -47,7 +47,7 @@ Reserve gerund-leading headings for the rare case where neither alternative read **Don't**: -```markdown +```md ## Installing Coder ## Configuring your workspace ``` @@ -80,7 +80,7 @@ The rule has scoped exceptions: **Do**: -```markdown +```md ## What's a workspace ## Quick reference ## What does the `panic!` macro do? @@ -89,7 +89,7 @@ The rule has scoped exceptions: **Don't**: -```markdown +```md ## What's a workspace? ## Quick reference! ## Workspaces are great! diff --git a/docs/.style/style-guide/formatting.md b/docs/.style/style-guide/formatting.md index 8e86125115d65..9d2ce3df79c0f 100644 --- a/docs/.style/style-guide/formatting.md +++ b/docs/.style/style-guide/formatting.md @@ -144,13 +144,20 @@ Use the most specific language tag available: `terraform` and `hcl` are not the canonical tag; use `tf`. Shiki ships `terraform` and `hcl` as two distinct grammars; `tf` is an alias of the more specific `terraform` grammar (not `hcl`), and matches what nearly every Coder docs code block actually is. - `yaml` for YAML. + `yml` is not the canonical tag; use `yaml`. - `go` for Go. - `json` for JSON. + `jsonc` is a distinct Shiki grammar for JSON that permits comments; use it only for blocks that actually contain comments, otherwise use `json`. - `dotenv` for `.env`-style `KEY=VALUE` blocks. - `txt` for command output shown on its own, and for any block with no syntax to highlight. `text`, `output`, `none`, and `url` are not the canonical tag; use `txt`. - `dockerfile` for Dockerfiles, lowercase. `Dockerfile` (capitalized) is not a valid tag. +- `md` for Markdown, including Markdown shown as a fenced example inside another Markdown file. + `markdown` is not the canonical tag; use `md`. +- `tsx` for TypeScript, including plain (non-JSX) TypeScript. + `ts` and `typescript` are not the canonical tag; use `tsx`. + `tsx` mis-tokenizes the legacy angle-bracket type-assertion syntax (`value`), which is invalid in real `.tsx` files anyway; write casts as `value as Type` instead, which is unambiguous under both grammars and is already the idiomatic style. `bash` and `shell` are aliases of `sh`. Use `sh` so the corpus stays consistent. @@ -276,13 +283,13 @@ If one item is a complete sentence, rewrite the rest so every item is a complete **Do**: -```markdown +```md 1. Run `coder login` to authenticate. 2. Create the workspace template. 3. Build the workspace from the template. ``` -```markdown +```md The provisioner supports: - AWS @@ -290,7 +297,7 @@ The provisioner supports: - Google Cloud ``` -```markdown +```md The agent reconnect logic uses the following timeouts: - Initial reconnect: 1 second. @@ -300,13 +307,13 @@ The agent reconnect logic uses the following timeouts: **Don't**: -```markdown +```md 1. The user runs `coder login` to authenticate 2. Creating the workspace template comes next. 3. Then the workspace gets built from the template ``` -```markdown +```md The provisioner supports: - AWS. @@ -322,14 +329,14 @@ When such a list needs a lead-in, end the lead-in with a colon on a clause that **Do**: -```markdown +```md You have two options: - Install the tool with `apt-get` in the template's startup script. - Bake the tool into the workspace image. ``` -```markdown +```md ## Learn more - [Extending templates](./extending-templates.md) @@ -338,7 +345,7 @@ You have two options: **Don't**: -```markdown +```md Install it where it persists across rebuilds: - Add it to the template's startup script with `apt-get`. @@ -393,7 +400,7 @@ Reference the asset with a relative path from the Markdown source. Captions follow the image in a `` tag. -```markdown +```md ![Template Insights dashboard with weekly active users and connection latency charts](../../images/admin/templates/template-insights.png) The Template Insights dashboard with active-user and connection-latency widgets. diff --git a/docs/.style/style-guide/numbers-units-and-dates.md b/docs/.style/style-guide/numbers-units-and-dates.md index e2aae0266521f..8828a79894308 100644 --- a/docs/.style/style-guide/numbers-units-and-dates.md +++ b/docs/.style/style-guide/numbers-units-and-dates.md @@ -45,7 +45,7 @@ The visible result is the same as a regular space, but the line breaker treats t In the Markdown source (what you type): -```markdown +```md The default timeout is 30 seconds. Connection latency under 150 ms shows green. ``` @@ -64,7 +64,7 @@ The number and the unit move to the next line together rather than separating. In the Markdown source: -```markdown +```md The default timeout is 30 seconds. Connection latency under 150ms shows green. ``` diff --git a/docs/.style/style-guide/word-choice.md b/docs/.style/style-guide/word-choice.md index 3dc621927d45b..d54ad2b787ac4 100644 --- a/docs/.style/style-guide/word-choice.md +++ b/docs/.style/style-guide/word-choice.md @@ -200,7 +200,7 @@ Two rationales apply: **Do**: -```markdown +```md ## Learn more - [Configure SSH access](./ssh.md) @@ -209,7 +209,7 @@ Two rationales apply: **Don't**: -```markdown +```md ## Next steps - [Configure SSH access](./ssh.md) diff --git a/docs/about/contributing/CONTRIBUTING.md b/docs/about/contributing/CONTRIBUTING.md index 893989e3e1178..cfca7af52ce4c 100644 --- a/docs/about/contributing/CONTRIBUTING.md +++ b/docs/about/contributing/CONTRIBUTING.md @@ -14,7 +14,7 @@ Learn more [how Nix works](https://nixos.org/guides/how-nix-works). 1. After you've installed Nix, instantiate the development with the `nix-shell` command: - ```shell + ```sh cd ~/code/coder # https://nix.dev/tutorials/declarative-and-reproducible-developer-environments @@ -31,7 +31,7 @@ Learn more [how Nix works](https://nixos.org/guides/how-nix-works). [hooks configured](https://direnv.net/docs/hook.html), you can add `use nix` to `.envrc` to automatically instantiate the development environment: - ```shell + ```sh cd ~/code/coder echo "use nix" >.envrc direnv allow @@ -41,7 +41,7 @@ Learn more [how Nix works](https://nixos.org/guides/how-nix-works). [`direnv`](https://direnv.net/docs/hook.html) will prepare the environment for you: - ```shell + ```sh cd ~/code/coder direnv: loading ~/code/coder/.envrc @@ -358,7 +358,7 @@ If `./scripts/develop.sh` exits with a "database migration conflict" error, it means the database has migrations from another branch that don't exist on the current one. You have two options: -```shell +```sh # Roll back the mismatched migrations (preserves your dev data): ./scripts/develop.sh --db-rollback @@ -373,7 +373,7 @@ On macOS, a [direnv bug](https://github.com/direnv/direnv/issues/1345) can cause `error: creating directory` when you attempt to run, build, or test, add a `mkdir` line to your `.envrc`: -```shell +```sh use nix mkdir -p "$TMPDIR" ``` diff --git a/docs/about/contributing/backend.md b/docs/about/contributing/backend.md index 034f95e8a59e3..ea87a9a66611a 100644 --- a/docs/about/contributing/backend.md +++ b/docs/about/contributing/backend.md @@ -151,7 +151,7 @@ Database migrations are managed with To add new migrations, use the following command: -```shell +```sh ./coderd/database/migrations/create_migration.sh my name /home/coder/src/coder/coderd/database/migrations/000070_my_name.up.sql /home/coder/src/coder/coderd/database/migrations/000070_my_name.down.sql @@ -188,7 +188,7 @@ migration of multiple features or complex configurations. To add a new partial fixture, run the following command: -```shell +```sh ./coderd/database/migrations/create_fixture.sh my fixture /home/coder/src/coder/coderd/database/migrations/testdata/fixtures/000070_my_fixture.up.sql ``` @@ -201,7 +201,7 @@ To create a full dump, run a fully fledged Coder deployment and use it to generate data in the database. Then shut down the deployment and take a snapshot of the database. -```shell +```sh mkdir -p coderd/database/migrations/testdata/full_dumps/v0.12.2 && cd $_ pg_dump "postgres://coder@localhost:..." -a --inserts >000069_dump_v0.12.2.up.sql ``` @@ -212,7 +212,7 @@ emails, OAuth tokens and other secrets. Then commit the dump to the project. To find out what the latest migration for a version of Coder is, use the following command: -```shell +```sh git ls-files v0.12.2 -- coderd/database/migrations/*.up.sql ``` diff --git a/docs/about/contributing/frontend.md b/docs/about/contributing/frontend.md index af2981ed6cd3d..731055af5c962 100644 --- a/docs/about/contributing/frontend.md +++ b/docs/about/contributing/frontend.md @@ -153,7 +153,7 @@ Typically, each API endpoint corresponds to its own `Request` and `Response` types. However, some endpoints require additional parameters for successful execution. Here's an illustrative example:" -```ts +```tsx export const getAgentListeningPorts = async ( agentID: string, ): Promise => { @@ -167,7 +167,7 @@ export const getAgentListeningPorts = async ( Sometimes, a frontend operation can have multiple API calls which can be wrapped as a single function. -```ts +```tsx export const updateWorkspaceVersion = async ( workspace: TypesGen.Workspace, ): Promise => { @@ -274,7 +274,7 @@ You can either run `scripts/remote_playwright.sh` from `coder/coder` on your local machine, or execute the following command if you don't have the repo available: -```bash +```sh bash <(curl -sSL https://raw.githubusercontent.com/coder/coder/main/scripts/remote_playwright.sh) [workspace] ``` diff --git a/docs/about/contributing/modules.md b/docs/about/contributing/modules.md index 410ef750a1868..408c0710a035f 100644 --- a/docs/about/contributing/modules.md +++ b/docs/about/contributing/modules.md @@ -26,14 +26,14 @@ Before contributing modules, ensure you have: 1. **Fork and clone the repository**: - ```bash + ```sh git clone https://github.com/your-username/registry.git cd registry ``` 2. **Install dependencies**: - ```bash + ```sh bun install ``` @@ -52,20 +52,20 @@ Before contributing modules, ensure you have: If you're a new contributor, create your namespace directory: -```bash +```sh mkdir -p registry/[your-username] mkdir -p registry/[your-username]/.images ``` Add your namespace avatar by downloading your GitHub avatar and saving it as `avatar.png`: -```bash +```sh curl -o registry/[your-username]/.images/avatar.png https://github.com/[your-username].png ``` Create your namespace README at `registry/[your-username]/README.md`: -```markdown +```md --- display_name: "Your Name" bio: "Brief description of what you do" @@ -89,7 +89,7 @@ Brief description of who you are and what you do. Use the provided script to generate your module structure: -```bash +```sh ./scripts/new_module.sh [your-username]/[module-name] cd registry/[your-username]/modules/[module-name] ``` @@ -197,7 +197,7 @@ describe("git-clone", async () => { Update `README.md` with complete documentation: -```markdown +```md --- display_name: "Git Clone" description: "Clone a Git repository into your Coder workspace" @@ -256,7 +256,7 @@ Your module README should include: Run tests to ensure your module works correctly: -```bash +```sh # Test your specific module bun test -t 'git-clone' @@ -319,7 +319,7 @@ When you modify a module, update its version following semantic versioning: Use the version bump script to update versions: -```bash +```sh ./.github/scripts/version-bump.sh patch|minor|major ``` @@ -327,20 +327,20 @@ Use the version bump script to update versions: 1. **Create a feature branch**: - ```bash + ```sh git checkout -b feat/modify-git-clone-module ``` 2. **Test thoroughly**: - ```bash + ```sh bun test -t 'git-clone' bun fmt ``` 3. **Commit with clear messages**: - ```bash + ```sh git add . git commit -m "feat(git-clone):add git-clone module" ``` diff --git a/docs/about/contributing/templates.md b/docs/about/contributing/templates.md index 7868961f68efb..c5bff9caff343 100644 --- a/docs/about/contributing/templates.md +++ b/docs/about/contributing/templates.md @@ -31,14 +31,14 @@ Before contributing templates, ensure you have: 1. **Fork and clone the repository**: - ```bash + ```sh git clone https://github.com/your-username/registry.git cd registry ``` 2. **Install dependencies**: - ```bash + ```sh bun install ``` @@ -57,20 +57,20 @@ Before contributing templates, ensure you have: If you're a new contributor, create your namespace directory: -```bash +```sh mkdir -p registry/[your-username] mkdir -p registry/[your-username]/.images ``` Add your namespace avatar by downloading your GitHub avatar and saving it as `avatar.png`: -```bash +```sh curl -o registry/[your-username]/.images/avatar.png https://github.com/[your-username].png ``` Create your namespace README at `registry/[your-username]/README.md`: -```markdown +```md --- display_name: "Your Name" bio: "Brief description of what you do" @@ -94,7 +94,7 @@ Brief description of who you are and what you do. Create a directory for your template: -```bash +```sh mkdir -p registry/[your-username]/templates/[template-name] cd registry/[your-username]/templates/[template-name] ``` @@ -189,7 +189,7 @@ resource "coder_metadata" "workspace_info" { Create `README.md` with comprehensive documentation: -```markdown +```md --- display_name: "Ubuntu Development Environment" description: "Complete Ubuntu workspace with VS Code, Git, and development tools" @@ -337,7 +337,7 @@ variable "workspace_name" { Test your template locally with Coder: -```bash +```sh # Navigate to your template directory cd registry/[your-username]/templates/[template-name] @@ -400,13 +400,13 @@ Before submitting your template, verify: 1. **Create a feature branch**: - ```bash + ```sh git checkout -b feat/add-python-template ``` 2. **Test thoroughly**: - ```bash + ```sh # Test with Coder coder templates push test-python-template -d . coder create test-workspace --template test-python-template @@ -417,7 +417,7 @@ Before submitting your template, verify: 3. **Commit with clear messages**: - ```bash + ```sh git add . git commit -m "Add Python development template with FastAPI setup" ``` diff --git a/docs/admin/external-auth/index.md b/docs/admin/external-auth/index.md index 666ba5cfc1e3f..94adc1e023e82 100644 --- a/docs/admin/external-auth/index.md +++ b/docs/admin/external-auth/index.md @@ -67,7 +67,7 @@ Reference the documentation for your chosen provider for more information on how Use [`external-auth`](../../reference/cli/external-auth.md) in the Coder CLI to access a token within the workspace: -```shell +```sh coder external-auth access-token ``` @@ -101,7 +101,7 @@ Behind the scenes, Coder: To manually access these tokens within a workspace: -```shell +```sh coder external-auth access-token ``` @@ -124,7 +124,7 @@ You must add the SSH key to your Git provider. 1. View your Coder Git SSH key: - ```shell + ```sh coder publickey ``` diff --git a/docs/admin/infrastructure/scale-utility.md b/docs/admin/infrastructure/scale-utility.md index b4e0f913763da..5da9b0f0b1384 100644 --- a/docs/admin/infrastructure/scale-utility.md +++ b/docs/admin/infrastructure/scale-utility.md @@ -53,7 +53,7 @@ environments. The following command will provision a number of Coder workspaces using the specified template and extra parameters: -```shell +```sh coder exp scaletest create-workspaces \ --retry 5 \ --count "${SCALETEST_PARAM_NUM_WORKSPACES}" \ @@ -77,7 +77,7 @@ The command does the following: For more built-in `scaletest` options, use the `--help` flag: -```shell +```sh coder exp scaletest create-workspaces --help ``` @@ -87,7 +87,7 @@ Given an existing set of workspaces created previously with `create-workspaces`, the following command will generate traffic similar to that of Coder's Web Terminal against those workspaces. -```shell +```sh # Produce load at about 1000MB/s (25MB/40ms). coder exp scaletest workspace-traffic \ --template "${SCALETEST_PARAM_GREEDY_AGENT_TEMPLATE}" \ @@ -127,7 +127,7 @@ The `workspace-traffic` supports also other modes - SSH traffic, workspace app: The scaletest utility will attempt to clean up all workspaces it creates. If you wish to clean up all workspaces, you can run the following command: -```shell +```sh coder exp scaletest cleanup \ --cleanup-job-timeout 2h \ --cleanup-timeout 15min diff --git a/docs/admin/integrations/devcontainers/envbuilder/add-envbuilder.md b/docs/admin/integrations/devcontainers/envbuilder/add-envbuilder.md index 07f98a8117d7c..f06263e6a9eef 100644 --- a/docs/admin/integrations/devcontainers/envbuilder/add-envbuilder.md +++ b/docs/admin/integrations/devcontainers/envbuilder/add-envbuilder.md @@ -25,7 +25,7 @@ choose a template from the 1. Use the `template init` command to initialize your choice of image: - ```shell + ```sh coder template init --id kubernetes-devcontainer ``` @@ -34,7 +34,7 @@ choose a template from the 1. `cd` into the directory and push the template to your Coder deployment: - ```shell + ```sh cd kubernetes-devcontainer && coder templates push ``` @@ -52,7 +52,7 @@ choose a template from the - CLI: - ```shell + ```sh coder templates push -d ``` @@ -65,7 +65,7 @@ choose a template from the - To zip the files through the command line: - ```shell + ```sh zip templates.zip Dockerfile main.tf ``` diff --git a/docs/admin/integrations/dx-data-cloud.md b/docs/admin/integrations/dx-data-cloud.md index c74bafe5480cd..ee4f486a6ca41 100644 --- a/docs/admin/integrations/dx-data-cloud.md +++ b/docs/admin/integrations/dx-data-cloud.md @@ -32,7 +32,7 @@ If your organization already uses the Coder-DX integration, you can find a list Use `users list` to export the list of users to a CSV file: -```shell +```sh coder users list > users.csv ``` @@ -42,7 +42,7 @@ Visit the [users list](../../reference/cli/users_list.md) documentation for more Use [get users](../../reference/api/users.md#get-users): -```bash +```sh curl -X GET http://coder-server:8080/api/v2/users \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY' @@ -50,7 +50,7 @@ curl -X GET http://coder-server:8080/api/v2/users \ To export the results to a CSV file, you can use the `jq` tool to process the JSON response: -```bash +```sh curl -X GET http://coder-server:8080/api/v2/users \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY' | \ diff --git a/docs/admin/integrations/kubernetes-logs.md b/docs/admin/integrations/kubernetes-logs.md index 03c942283931f..d4794f8c5879c 100644 --- a/docs/admin/integrations/kubernetes-logs.md +++ b/docs/admin/integrations/kubernetes-logs.md @@ -13,7 +13,7 @@ or deployment, such as: Install the `coder-logstream-kube` helm chart on the cluster where the deployment is running. -```shell +```sh helm repo add coder-logstream-kube https://helm.coder.com/logstream-kube helm install coder-logstream-kube coder-logstream-kube/coder-logstream-kube \ --namespace coder \ diff --git a/docs/admin/integrations/multiple-kube-clusters.md b/docs/admin/integrations/multiple-kube-clusters.md index ff60ad7f83eba..3bbea893f9639 100644 --- a/docs/admin/integrations/multiple-kube-clusters.md +++ b/docs/admin/integrations/multiple-kube-clusters.md @@ -12,7 +12,7 @@ in the Terraform provider. First, create a kubeconfig file with [multiple contexts](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/). -```shell +```sh kubectl config get-contexts CURRENT NAME CLUSTER @@ -27,7 +27,7 @@ If you deployed Coder on Kubernetes, you can attach a kubeconfig as a secret. This assumes Coder is deployed on the `coder` namespace and your kubeconfig file is in ~/.kube/config. -```shell +```sh kubectl create secret generic kubeconfig-secret -n coder --from-file=~/.kube/config ``` @@ -104,7 +104,7 @@ cluster. Change the namespace accordingly. Run this command against your remote cluster to create a ServiceAccount, Role, RoleBinding, and token: -```shell +```sh kubectl apply -n coder-workspaces -f - < ``` @@ -50,7 +50,7 @@ There are two ways to add a license to a Coder deployment: - For a `.jwt` license file: - ```shell + ```sh coder licenses add -f ``` diff --git a/docs/admin/monitoring/health-check.md b/docs/admin/monitoring/health-check.md index ead5e210cafa5..ecd2760b53bb1 100644 --- a/docs/admin/monitoring/health-check.md +++ b/docs/admin/monitoring/health-check.md @@ -61,7 +61,7 @@ This could be due to a number of reasons, including but not limited to: To troubleshoot further, you can log into the machine running Coder and attempt to run the following command: -```shell +```sh curl -v ${CODER_ACCESS_URL}/healthz # Expected output: # * Trying XXX.XXX.XXX.XXX:443 @@ -165,7 +165,7 @@ performance may be impacted for clients closest to the unhealthy DERP server. **Solution:** Ensure that the DERP server is available and reachable over the network, for example: -```shell +```sh curl -v "https://coder.company.com/derp" # Expected output: # * Trying XXX.XXX.XXX.XXX @@ -246,7 +246,7 @@ Access URL. 1. Ensure that Coder's configured Access URL can be reached from the server running Coder, using standard troubleshooting tools like `curl`: - ```shell + ```sh curl -v "https://coder.company.com" ``` diff --git a/docs/admin/monitoring/notifications/index.md b/docs/admin/monitoring/notifications/index.md index 88d6b2df4088e..9ab8ce91231e2 100644 --- a/docs/admin/monitoring/notifications/index.md +++ b/docs/admin/monitoring/notifications/index.md @@ -289,13 +289,13 @@ To send a custom notification, execute [`coder notifications custom <mes - Send yourself a quick update: -```shell +```sh coder templates push -y && coder notifications custom "Template push complete" "Template version uploaded." ``` - Use in a script after a long-running task: -```shell +```sh #!/usr/bin/env bash set -o pipefail diff --git a/docs/admin/monitoring/notifications/slack.md b/docs/admin/monitoring/notifications/slack.md index 394a63d70492b..7509c1fbad2d9 100644 --- a/docs/admin/monitoring/notifications/slack.md +++ b/docs/admin/monitoring/notifications/slack.md @@ -51,13 +51,13 @@ To build the server to receive webhooks and interact with Slack: 1. Initialize your project by running: - ```bash + ```sh npm init -y ``` 2. Install the Bolt library: - ```bash + ```sh npm install @slack/bolt ``` @@ -165,14 +165,14 @@ To build the server to receive webhooks and interact with Slack: 4. Set environment variables to identify the Slack app: - ```bash + ```sh export SLACK_BOT_TOKEN=xoxb-... export SLACK_SIGNING_SECRET=0da4b... ``` 5. Start the web application by running: - ```bash + ```sh node app.js ``` @@ -195,7 +195,7 @@ must respond appropriately. To enable webhook integration in Coder, define the POST webhook endpoint matching the deployed Slack bot: -```bash +```sh export CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT=http://localhost:6000/v1/webhook` ``` diff --git a/docs/admin/monitoring/notifications/teams.md b/docs/admin/monitoring/notifications/teams.md index 477ebcb714603..396ef80df412b 100644 --- a/docs/admin/monitoring/notifications/teams.md +++ b/docs/admin/monitoring/notifications/teams.md @@ -136,7 +136,7 @@ The process of setting up a Teams workflow consists of three key steps: To enable webhook integration in Coder, define the POST webhook endpoint created by your Teams workflow: -```bash +```sh export CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT=https://prod-16.eastus.logic.azure.com:443/workflows/f8fbe3e8211e4b638...` ``` diff --git a/docs/admin/networking/index.md b/docs/admin/networking/index.md index 05f86d7f8680d..d2fd31d4b458d 100644 --- a/docs/admin/networking/index.md +++ b/docs/admin/networking/index.md @@ -126,7 +126,7 @@ for both public and [Air-gapped deployments](../../install/airgap.md). However, Tailscale maintains a global fleet of [DERP relays](https://tailscale.com/kb/1118/custom-derp-servers/#what-are-derp-servers) intended for their product, and has allowed Coder to access and use them. You can launch `coder server` with Tailscale's DERPs like so: -```bash +```sh coder server --derp-config-url https://controlplane.tailscale.com/derpmap/default ``` @@ -159,7 +159,7 @@ After you have custom DERP servers, you can launch Coder with them like so: } ``` -```bash +```sh coder server --derp-config-path derpmap.json ``` diff --git a/docs/admin/networking/wildcard-access-url.md b/docs/admin/networking/wildcard-access-url.md index 767d95419d1f6..9d558a7da020a 100644 --- a/docs/admin/networking/wildcard-access-url.md +++ b/docs/admin/networking/wildcard-access-url.md @@ -24,7 +24,7 @@ The following tools require wildcard access URL: `CODER_WILDCARD_ACCESS_URL` is necessary for [port forwarding](port-forwarding.md#dashboard) via the dashboard or running [coder_apps](../templates/index.md) on an absolute path. Set this to a wildcard subdomain that resolves to Coder (e.g. `*.coder.example.com`). -```bash +```sh export CODER_WILDCARD_ACCESS_URL="*.coder.example.com" coder server ``` @@ -40,7 +40,7 @@ Wildcard access URLs require a TLS certificate that covers the wildcard domain. Configure Coder to handle TLS directly using the wildcard certificate: -```bash +```sh export CODER_TLS_ENABLE=true export CODER_TLS_CERT_FILE=/path/to/wildcard.crt export CODER_TLS_KEY_FILE=/path/to/wildcard.key @@ -86,7 +86,7 @@ Or alternatively, using a CNAME record: If you're using [workspace proxies](workspace-proxies.md) for geo-distributed teams, each proxy requires its own wildcard access URL configuration: -```bash +```sh # Main Coder server export CODER_WILDCARD_ACCESS_URL="*.coder.example.com" @@ -132,7 +132,7 @@ If workspace applications are not working: - Restart the Coder server if you made changes to the environment variable 2. Check DNS resolution for wildcard subdomains: - ```bash + ```sh dig test.coder.example.com nslookup test.coder.example.com ``` diff --git a/docs/admin/networking/workspace-proxies.md b/docs/admin/networking/workspace-proxies.md index 834ad052465c9..69aa2073debe1 100644 --- a/docs/admin/networking/workspace-proxies.md +++ b/docs/admin/networking/workspace-proxies.md @@ -35,7 +35,7 @@ Create the workspace proxy and make sure to save the returned authentication token for said proxy. This is the token the workspace proxy will use to authenticate back to primary coderd. -```bash +```sh $ coder wsproxy create --name=newyork --display-name="USA East" --icon="/emojis/2194.png" Workspace Proxy "newyork" created successfully. Save this token, it will not be shown again. Token: 2fb6500b-bb47-4783-a0db-dedde895b865:05271b4ef9432bac14c02b3c56b5a2d7f05453718a1f85ba7e772c0a096c7175 @@ -43,7 +43,7 @@ Token: 2fb6500b-bb47-4783-a0db-dedde895b865:05271b4ef9432bac14c02b3c56b5a2d7f054 To verify it was created. -```bash +```sh $ coder wsproxy ls NAME URL STATUS STATUS newyork unregistered @@ -55,7 +55,7 @@ Deploying the workspace proxy will also register the proxy with coderd and make the workspace proxy usable. If the proxy deployment is successful, `coder wsproxy ls` will show an `ok` status code: -```shell +```sh $ coder wsproxy ls NAME URL STATUS STATUS primary https://dev.coder.com ok @@ -80,7 +80,7 @@ Workspace proxy configuration overlaps with a subset of the coderd configuration. To see the full list of configuration options: `coder wsproxy server --help` -```bash +```sh # Proxy specific configuration. These are REQUIRED # Example: https://coderd.example.com CODER_PRIMARY_ACCESS_URL="https://<url_of_coderd_dashboard>" @@ -133,7 +133,7 @@ coder: Using Helm, install the workspace proxy chart -```bash +```sh helm install coder coder-v2/coder --namespace <your workspace proxy namespace> -f ./values-wsproxy.yaml ``` @@ -143,7 +143,7 @@ and up the deployment's replicas. ### Running on a VM -```bash +```sh # Set configuration options via environment variables, a config file, or cmd flags coder wsproxy server ``` @@ -156,7 +156,7 @@ can configure the workspace proxy by settings in To run workspace proxy as a system service on the host: -```bash +```sh # Use systemd to start workspace proxy now and on reboot sudo systemctl enable --now coder-workspace-proxy @@ -166,7 +166,7 @@ journalctl -u coder-workspace-proxy.service -b To restart workspace proxy after applying system changes: -```shell +```sh sudo systemctl restart coder-workspace-proxy ``` @@ -188,7 +188,7 @@ file to include a custom entrypoint: #### Docker run -```bash +```sh docker run --rm -it --entrypoint /opt/coder ghcr.io/coder/coder:latest wsproxy server ``` diff --git a/docs/admin/provisioners/manage-provisioner-jobs.md b/docs/admin/provisioners/manage-provisioner-jobs.md index b2581e6020fc6..a01c36afb44b0 100644 --- a/docs/admin/provisioners/manage-provisioner-jobs.md +++ b/docs/admin/provisioners/manage-provisioner-jobs.md @@ -71,7 +71,7 @@ Follow these steps to identify problematic jobs or daemons: 1. Filter jobs by `pending` status in the dashboard, or use the CLI: - ```bash + ```sh coder provisioner jobs list -s pending ``` @@ -79,6 +79,6 @@ Follow these steps to identify problematic jobs or daemons: 1. Cancel the job through the dashboard, or use the CLI: - ```shell + ```sh coder provisioner jobs cancel <job-id> ``` diff --git a/docs/admin/security/audit-logs.md b/docs/admin/security/audit-logs.md index 4c7522d6b5d1d..693a715a95ef6 100644 --- a/docs/admin/security/audit-logs.md +++ b/docs/admin/security/audit-logs.md @@ -183,7 +183,7 @@ You may choose to run a `VACUUM` or `VACUUM FULL` operation on the audit logs ta - **Run during a planned maintenance window** to ensure ample time for the operation to complete and minimize impact to users - **Stop all running instances of `coderd`** to prevent connection errors while the table is locked. The actual steps for this will depend on your particular deployment setup. For example, if your `coderd` deployment is running on Kubernetes: - ```bash + ```sh kubectl scale deployment coder --replicas=0 -n coder ``` @@ -199,7 +199,7 @@ You may choose to run a `VACUUM` or `VACUUM FULL` operation on the audit logs ta After the vacuum completes, scale coderd back up: -```bash +```sh kubectl scale deployment coder --replicas= -n coder ``` diff --git a/docs/admin/security/database-encryption.md b/docs/admin/security/database-encryption.md index 72a7c0284399b..2cbe7ac9be53e 100644 --- a/docs/admin/security/database-encryption.md +++ b/docs/admin/security/database-encryption.md @@ -59,13 +59,13 @@ values using that key to a new key. - Generate a 32-byte random key and base64-encode it. For example: -```shell +```sh dd if=/dev/urandom bs=32 count=1 | base64 ``` - Store this key in a secure location (for example, a Kubernetes secret): -```shell +```sh kubectl create secret generic coder-external-token-encryption-keys --from-literal=keys=<key> ``` diff --git a/docs/admin/setup/appearance.md b/docs/admin/setup/appearance.md index f5d69fa444f91..61b4cf03cb84d 100644 --- a/docs/admin/setup/appearance.md +++ b/docs/admin/setup/appearance.md @@ -104,7 +104,7 @@ CODER_SUPPORT_LINKS='[{"name": "Hello GitHub", "target": "https://github.com/cod For CLI, use, -```shell +```sh export CODER_SUPPORT_LINKS='[{"name": "Hello GitHub", "target": "https://github.com/coder/coder", "icon": "bug"}, {"name": "Hello Slack", "target": "https://codercom.slack.com/archives/C014JH42DBJ", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/slack.svg"}, {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/discord.svg", "location": "navbar"}, {"name": "Hello Foobar", "target": "https://discord.gg/coder", "icon": "/emojis/1f3e1.png"}]' coder-server ``` diff --git a/docs/admin/setup/data-retention.md b/docs/admin/setup/data-retention.md index fb69289c0569c..661513edade5f 100644 --- a/docs/admin/setup/data-retention.md +++ b/docs/admin/setup/data-retention.md @@ -53,7 +53,7 @@ Go duration units (`h`, `m`, `s`): ### CLI Example -```bash +```sh coder server \ --audit-logs-retention=365d \ --connection-logs-retention=90d \ @@ -64,7 +64,7 @@ coder server \ ### Environment Variables Example -```bash +```sh export CODER_AUDIT_LOGS_RETENTION=365d export CODER_CONNECTION_LOGS_RETENTION=90d export CODER_API_KEYS_RETENTION=7d diff --git a/docs/admin/setup/index.md b/docs/admin/setup/index.md index 6669a4debed6d..fc3193e3f64d0 100644 --- a/docs/admin/setup/index.md +++ b/docs/admin/setup/index.md @@ -21,7 +21,7 @@ to reverse proxy your deployment for simple setup. You can change which port(s) Coder listens on. -```shell +```sh # Listen on port 80 export CODER_HTTP_ADDRESS=0.0.0.0:80 @@ -83,7 +83,7 @@ working directory prior to step 1. 1. Create the TLS secret in your Kubernetes cluster - ```shell + ```sh kubectl create secret tls coder-tls -n <coder-namespace> --key="tls.key" --cert="tls.crt" ``` diff --git a/docs/admin/templates/extending-templates/docker-in-workspaces.md b/docs/admin/templates/extending-templates/docker-in-workspaces.md index 998b7cf6de877..cd683b81b810c 100644 --- a/docs/admin/templates/extending-templates/docker-in-workspaces.md +++ b/docs/admin/templates/extending-templates/docker-in-workspaces.md @@ -160,7 +160,7 @@ this secret. The following shows a minimal example using a the JSON API key from a GCP service account to pull a private image: -```bash +```sh # Create the secret $ kubectl create secret docker-registry <name> \ --docker-server=us.gcr.io \ @@ -197,7 +197,7 @@ Before using Podman, please review the following documentation: [smart-device-manager](https://github.com/smarter-project/smarter-device-manager#enabling-access) to securely expose a FUSE devices to pods. - ```shell + ```sh cat <<EOF | kubectl create -f - apiVersion: apps/v1 kind: DaemonSet @@ -235,7 +235,7 @@ Before using Podman, please review the following documentation: 2. Be sure to label your nodes to enable smarter-device-manager: - ```shell + ```sh kubectl get nodes kubectl label nodes --all smarter-device-manager=enabled ``` @@ -251,7 +251,7 @@ Before using Podman, please review the following documentation: [kubernetes-with-podman](https://github.com/coder/community-templates/tree/main/kubernetes-podman) example template, or make your own. - ```shell + ```sh echo "kubernetes-with-podman" | coder templates init cd ./kubernetes-with-podman coder templates create @@ -280,7 +280,7 @@ user namespaces are not enabled in /proc/sys/user/max_user_namespaces 1. Reboot the node. 1. Verify that the value is more than `0`: - ```shell + ```sh sysctl -n user.max_user_namespaces ``` diff --git a/docs/admin/templates/extending-templates/external-auth.md b/docs/admin/templates/extending-templates/external-auth.md index 62e05af10d191..aacad98b878b2 100644 --- a/docs/admin/templates/extending-templates/external-auth.md +++ b/docs/admin/templates/extending-templates/external-auth.md @@ -40,7 +40,7 @@ external authentication will work with native `git` commands. To check the auth token being used **from inside a running workspace**, run: -```shell +```sh # If the exit code is non-zero, then the user is not authenticated with the # external provider. coder external-auth access-token <external-auth-id> diff --git a/docs/admin/templates/extending-templates/jetbrains-airgapped.md b/docs/admin/templates/extending-templates/jetbrains-airgapped.md index f859bb61d2f6b..ace2c92bfa3eb 100644 --- a/docs/admin/templates/extending-templates/jetbrains-airgapped.md +++ b/docs/admin/templates/extending-templates/jetbrains-airgapped.md @@ -15,7 +15,7 @@ If you have a suggestion or encounter an issue, please Install the JetBrains Client Downloader binary. Note that the server must be a Linux-based distribution: -```shell +```sh wget -O jetbrains-clients-downloader-linux-x86_64.tar.gz \ 'https://data.services.jetbrains.com/products/download?code=JCD&platform=linux_x86-64' && \ tar -xzvf jetbrains-clients-downloader-linux-x86_64.tar.gz @@ -39,7 +39,7 @@ To install both backends and clients, you will need to run two commands. ### Backends -```shell +```sh mkdir ~/backends ./jetbrains-clients-downloader-linux-x86_64-*/bin/jetbrains-clients-downloader --products-filter <product-code> --build-filter <build-number> --platforms-filter linux-x64,windows-x64,osx-x64 --download-backends ~/backends ``` @@ -48,7 +48,7 @@ mkdir ~/backends This is the same command as above, with the `--download-backends` flag removed. -```shell +```sh mkdir ~/clients ./jetbrains-clients-downloader-linux-x86_64-*/bin/jetbrains-clients-downloader --products-filter <product-code> --build-filter <build-number> --platforms-filter linux-x64,windows-x64,osx-x64 ~/clients ``` @@ -87,7 +87,7 @@ option. You will need to add the following files on your local machine in order for Gateway to pull the backend and client from the server. -```shell +```sh $ cat productsInfoUrl # a path to products.json that was generated by the backend's downloader (it could be http://, https://, or file://) https://internal.site/backends/<PRODUCT_CODE>/products.json diff --git a/docs/admin/templates/extending-templates/jetbrains-preinstall.md b/docs/admin/templates/extending-templates/jetbrains-preinstall.md index 0bb11ef9e6a1b..dd7fa82a2489f 100644 --- a/docs/admin/templates/extending-templates/jetbrains-preinstall.md +++ b/docs/admin/templates/extending-templates/jetbrains-preinstall.md @@ -9,7 +9,7 @@ For a faster first time connection with JetBrains IDEs, pre-install the IDEs bac Install the JetBrains Client Downloader binary: -```shell +```sh wget -O jetbrains-clients-downloader-linux-x86_64.tar.gz \ 'https://data.services.jetbrains.com/products/download?code=JCD&platform=linux_x86-64' && \ tar -xzvf jetbrains-clients-downloader-linux-x86_64.tar.gz @@ -18,14 +18,14 @@ rm jetbrains-clients-downloader-linux-x86_64.tar.gz ## Install Gateway backend -```shell +```sh mkdir ~/JetBrains ./jetbrains-clients-downloader-linux-x86_64-*/bin/jetbrains-clients-downloader --products-filter <product-code> --build-filter <build-number> --platforms-filter linux-x64 --download-backends ~/JetBrains ``` For example, to install the build `243.26053.27` of IntelliJ IDEA: -```shell +```sh ./jetbrains-clients-downloader-linux-x86_64-*/bin/jetbrains-clients-downloader --products-filter IU --build-filter 243.26053.27 --platforms-filter linux-x64 --download-backends ~/JetBrains tar -xzvf ~/JetBrains/backends/IU/*.tar.gz -C ~/JetBrains/backends/IU rm -rf ~/JetBrains/backends/IU/*.tar.gz @@ -35,7 +35,7 @@ rm -rf ~/JetBrains/backends/IU/*.tar.gz Add the following command to your template's `startup_script`: -```shell +```sh ~/JetBrains/*/bin/remote-dev-server.sh registerBackendLocationForGateway ``` diff --git a/docs/admin/templates/extending-templates/modules.md b/docs/admin/templates/extending-templates/modules.md index cc2bdca55a901..9dc1e8a547bc4 100644 --- a/docs/admin/templates/extending-templates/modules.md +++ b/docs/admin/templates/extending-templates/modules.md @@ -80,7 +80,7 @@ to resolve modules via [Artifactory](https://jfrog.com/artifactory/). 1. Create a virtual repository with name `tf` 1. Follow the below instructions to publish coder modules to Artifactory - ```shell + ```sh git clone https://github.com/coder/registry cd registry/registry/coder/modules jf tfc @@ -140,13 +140,13 @@ with read only access to the necessary repos. If you are running Coder on a VM, make sure that you have `git` installed and the `coder` user has access to the following files: -```shell +```sh # /home/coder/.gitconfig [credential] helper = store ``` -```shell +```sh # /home/coder/.git-credentials # GitHub example: @@ -166,7 +166,7 @@ your own git credentials. Next, create the secret in Kubernetes. Be sure to do this in the same namespace that Coder is installed in. -```shell +```sh export NAMESPACE=coder kubectl apply -f - <<EOF apiVersion: v1 diff --git a/docs/admin/templates/extending-templates/parameters.md b/docs/admin/templates/extending-templates/parameters.md index 3eb7957a73160..cf8a450f9ff89 100644 --- a/docs/admin/templates/extending-templates/parameters.md +++ b/docs/admin/templates/extending-templates/parameters.md @@ -420,7 +420,7 @@ parameters in one of two ways: To enable this feature, you need to set the `auto-fill-parameters` experiment flag: - ```shell + ```sh coder server --experiments=auto-fill-parameters ``` diff --git a/docs/admin/templates/extending-templates/prebuilt-workspaces.md b/docs/admin/templates/extending-templates/prebuilt-workspaces.md index e35f1033d2552..71b8dec9d5fe2 100644 --- a/docs/admin/templates/extending-templates/prebuilt-workspaces.md +++ b/docs/admin/templates/extending-templates/prebuilt-workspaces.md @@ -295,7 +295,7 @@ The troubleshooting steps below will help you assess and resolve this situation: Run: -```bash +```sh coder prebuilds pause ``` @@ -307,7 +307,7 @@ This prevents further pollution of your provisioner queues by stopping the prebu Next, run: -```bash +```sh coder provisioner jobs list --status=pending --initiator=prebuilds ``` @@ -321,7 +321,7 @@ Human-initiated jobs are prioritized above prebuild jobs in the provisioner queu To expedite fixing a broken template by ensuring maximum provisioner availability, cancel all pending prebuild jobs: -```bash +```sh coder provisioner jobs list --status=pending --initiator=prebuilds | jq -r '.[].id' | xargs -n1 -P2 -I{} coder provisioner jobs cancel {} ``` @@ -333,7 +333,7 @@ At this stage, most prebuild related impact will have been mitigated. There may If you need to expedite the processing of human-related jobs at the cost of some infrastructure housekeeping, you can run: -```bash +```sh coder provisioner jobs list --status=running --initiator=prebuilds | jq -r '.[].id' | xargs -n1 -P2 -I{} coder provisioner jobs cancel {} ``` @@ -343,7 +343,7 @@ Once the provisioner queue has been cleared and all templates have been fixed, r #### Resume prebuild reconciliation -```bash +```sh coder prebuilds resume ``` diff --git a/docs/admin/templates/extending-templates/process-logging.md b/docs/admin/templates/extending-templates/process-logging.md index 859cbf4bdf146..979b371913dcc 100644 --- a/docs/admin/templates/extending-templates/process-logging.md +++ b/docs/admin/templates/extending-templates/process-logging.md @@ -39,18 +39,18 @@ The host machine must be running a Linux kernel >= 5.8 with the kernel config To check your kernel version, run: -```shell +```sh uname -r ``` To validate the required kernel config is enabled, run either of the following commands on your nodes directly (_not_ from a workspace terminal): -```shell +```sh cat /proc/config.gz | gunzip | grep CONFIG_DEBUG_INFO_BTF ``` -```shell +```sh cat "/boot/config-$(uname -r)" | grep CONFIG_DEBUG_INFO_BTF ``` @@ -248,7 +248,7 @@ restarted. To view the process logs for a specific workspace you can use `kubectl` to print the logs: -```bash +```sh kubectl logs pod-name --container exectrace ``` diff --git a/docs/admin/templates/extending-templates/variables.md b/docs/admin/templates/extending-templates/variables.md index 3c1d02f0baf63..4fa89d40aebbf 100644 --- a/docs/admin/templates/extending-templates/variables.md +++ b/docs/admin/templates/extending-templates/variables.md @@ -59,7 +59,7 @@ variables, you can employ a straightforward solution: 1. Push the new template revision using Coder CLI: - ```shell + ```sh coder templates push my-template -y # no need to use --var ``` diff --git a/docs/admin/templates/managing-templates/external-workspaces.md b/docs/admin/templates/managing-templates/external-workspaces.md index 92b7204fb602c..f958ac0c509b0 100644 --- a/docs/admin/templates/managing-templates/external-workspaces.md +++ b/docs/admin/templates/managing-templates/external-workspaces.md @@ -64,7 +64,7 @@ You can create and manage external workspaces using either the **CLI** or the ** 1. **Create an external workspace** - ```bash + ```sh coder external-workspaces create hello-world \ --template=externally-managed-workspace -y ``` @@ -74,13 +74,13 @@ You can create and manage external workspaces using either the **CLI** or the ** 2. **List external workspaces** - ```bash + ```sh coder external-workspaces list ``` Example output: - ```bash + ```sh WORKSPACE TEMPLATE STATUS HEALTHY LAST BUILT CURRENT VERSION OUTDATED hello-world externally-managed-workspace Started true 15m happy_mendel9 false ``` @@ -89,13 +89,13 @@ You can create and manage external workspaces using either the **CLI** or the ** Use this command to query the script you must run on the external machine: - ```bash + ```sh coder external-workspaces agent-instructions hello-world ``` Example: - ```bash + ```sh Please run the following command to attach external agent to the workspace hello-world: curl -fsSL "https://<DEPLOYMENT_URL>/api/v2/init-script/linux/amd64" | CODER_AGENT_TOKEN="<token>" sh @@ -103,7 +103,7 @@ You can create and manage external workspaces using either the **CLI** or the ** You can also output JSON for automation: - ```bash + ```sh coder external-workspaces agent-instructions hello-world --output=json ``` diff --git a/docs/admin/templates/managing-templates/index.md b/docs/admin/templates/managing-templates/index.md index 63549f3251dd7..413b99adc1963 100644 --- a/docs/admin/templates/managing-templates/index.md +++ b/docs/admin/templates/managing-templates/index.md @@ -92,7 +92,7 @@ in the right-hand corner of the page to delete the template. Using the CLI, login to Coder and run the following command to delete a template: -```shell +```sh coder templates delete <template-name> ``` diff --git a/docs/admin/templates/startup-coordination/example.md b/docs/admin/templates/startup-coordination/example.md index 612ab61366113..5c1474501b6fd 100644 --- a/docs/admin/templates/startup-coordination/example.md +++ b/docs/admin/templates/startup-coordination/example.md @@ -6,7 +6,7 @@ This example shows a complete, production-ready script that starts Claude Code only after a repository has been cloned. It includes error handling, graceful degradation, and cleanup on exit: -```bash +```sh #!/bin/bash set -euo pipefail diff --git a/docs/admin/templates/startup-coordination/index.md b/docs/admin/templates/startup-coordination/index.md index 2394f808941af..694384655ee17 100644 --- a/docs/admin/templates/startup-coordination/index.md +++ b/docs/admin/templates/startup-coordination/index.md @@ -26,7 +26,7 @@ The goal of startup script coordination is to provide a single reliable source o To start using workspace startup coordination, add calls to `coder exp sync (start|complete)` in your startup scripts where required: - ```bash + ```sh trap 'coder exp sync complete my-script' EXIT coder exp sync want my-script my-other-script coder exp sync start my-script diff --git a/docs/admin/templates/startup-coordination/troubleshooting.md b/docs/admin/templates/startup-coordination/troubleshooting.md index d75c0552eacfa..5c612d191c9c2 100644 --- a/docs/admin/templates/startup-coordination/troubleshooting.md +++ b/docs/admin/templates/startup-coordination/troubleshooting.md @@ -7,14 +7,14 @@ From a workspace terminal, test if sync is working using `coder exp sync ping`: -```bash +```sh coder exp sync ping ``` * If sync is working, expect the output to be `Success`. * Otherwise, you will see an error message similar to the below: -```bash +```sh error: connect to agent socket: connect to socket: dial unix /tmp/coder-agent.sock: connect: permission denied ``` @@ -22,13 +22,13 @@ error: connect to agent socket: connect to socket: dial unix /tmp/coder-agent.so You can check the status of a specific unit using `coder exp sync status`: -```bash +```sh coder exp sync status git-clone ``` If the unit exists, you will see output similar to the below: -```bash +```sh # coder exp sync status git-clone Unit: git-clone Status: completed @@ -37,7 +37,7 @@ Ready: true If the unit is not known to the agent, you will see output similar to the below: -```bash +```sh # coder exp sync status doesnotexist Unit: doesnotexist Status: not registered @@ -51,13 +51,13 @@ No dependencies found If you are unsure which units are registered, or want a quick overview of every unit's state, use `coder exp sync list`: -```bash +```sh coder exp sync list ``` This displays all registered units, their statuses, and whether they are ready to start: -```bash +```sh UNIT STATUS READY git-clone completed true env-setup started true @@ -66,7 +66,7 @@ ide-configure pending false You can also get JSON output for scripting: -```bash +```sh coder exp sync list --output json ``` @@ -89,7 +89,7 @@ If the workspace startup scripts fail: * Review `/tmp/coder-script-*.log` inside the workspace for script errors. * Verify the Coder CLI is available in `$PATH` inside the workspace: - ```bash + ```sh command -v coder ``` @@ -97,7 +97,7 @@ If the workspace startup scripts fail: If you see an error similar to the below in your startup script logs, you have defined a cyclic dependency: -```bash +```sh error: declare dependency failed: cannot add dependency: adding edge for unit "bar": failed to add dependency adding edge (bar -> foo): cycle detected ``` diff --git a/docs/admin/templates/startup-coordination/usage.md b/docs/admin/templates/startup-coordination/usage.md index bdb40a5d82252..03d4454380512 100644 --- a/docs/admin/templates/startup-coordination/usage.md +++ b/docs/admin/templates/startup-coordination/usage.md @@ -34,7 +34,7 @@ To use startup dependencies in your templates, you must: Here's a simple example of a script that depends on another unit completing first: -```bash +```sh #!/bin/bash UNIT_NAME="my-setup" @@ -59,7 +59,7 @@ own work. If your unit depends on multiple other units, you can declare all dependencies before starting: -```bash +```sh #!/bin/bash UNIT_NAME="my-app" DEPENDENCIES="git-clone,env-setup,database-migration" @@ -91,13 +91,13 @@ coder exp sync complete "$UNIT_NAME" Use `coder exp sync list` to see all registered units and their current state: -```bash +```sh coder exp sync list ``` Example output: -```bash +```sh UNIT STATUS READY git-clone completed true env-setup started true @@ -126,7 +126,7 @@ Once you're satisfied, [promote the new template version](../../../reference/cli Not all workspaces will have the Coder CLI available in `$PATH`. Check for availability of the Coder CLI before using sync commands: -```bash +```sh if command -v coder > /dev/null 2>&1; then coder exp sync start "$UNIT_NAME" else @@ -139,7 +139,7 @@ fi Units **must** call `coder exp sync complete` to unblock dependent units. Use `trap` to ensure completion even if your script exits early or encounters errors: -```bash +```sh SYNC_STARTED=0 if coder exp sync start "$UNIT_NAME"; then @@ -189,7 +189,7 @@ resource "coder_script" "ide_setup" { The Coder Agent detects and rejects circular dependencies, but they indicate a design problem: -```bash +```sh # This will fail coder exp sync want "unit-a" "unit-b" coder exp sync want "unit-b" "unit-a" @@ -224,7 +224,7 @@ Upon timeout, the command will exit with an error code and print `timeout waitin You can adjust this timeout as necessary for long-running operations: -```bash +```sh coder exp sync start "long-operation" --timeout 10m ``` diff --git a/docs/admin/templates/troubleshooting.md b/docs/admin/templates/troubleshooting.md index 96a4ae58ae15c..13fe791382968 100644 --- a/docs/admin/templates/troubleshooting.md +++ b/docs/admin/templates/troubleshooting.md @@ -132,7 +132,7 @@ what's going on. Here's a short example of an informative startup script: -```shell +```sh echo "Running startup script..." echo "Run: long-running-command" /path/to/long-running-command @@ -184,7 +184,7 @@ Refer to [Cannot connect to the Docker daemon](../../install/docker.md#cannot-co When you query `ContainerMemory` and encounter the error: -```shell +```sh open /sys/fs/cgroup/memory.max: no such file or directory ``` @@ -210,13 +210,13 @@ This error mostly affects Raspberry Pi OS, but might also affect older Debian-ba You can use `sed` to add it to the file for you: - ```bash + ```sh sudo sed -i '$s/$/ cgroup_memory=1 cgroup_enable=memory/' /boot/firmware/cmdline.txt ``` 1. Reboot: - ```bash + ```sh sudo reboot ``` diff --git a/docs/admin/users/github-auth.md b/docs/admin/users/github-auth.md index 57ed6f9eeb37a..4d07abb1e2e18 100644 --- a/docs/admin/users/github-auth.md +++ b/docs/admin/users/github-auth.md @@ -34,13 +34,13 @@ To use the default configuration: 1. By default, only the admin user can sign up. To allow additional users to sign up with GitHub, add: - ```shell + ```sh CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS=true ``` 1. (Optional) If you want to limit sign-ups to specific GitHub organizations, set: - ```shell + ```sh CODER_OAUTH2_GITHUB_ALLOWED_ORGS="your-org" ``` @@ -49,7 +49,7 @@ To use the default configuration: You can disable the default GitHub app by [configuring your own app](#step-1-configure-the-oauth-application-in-github) or by adding the following environment variable to your [Coder server configuration](../../reference/cli/server.md#options): -```shell +```sh CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER_ENABLE=false ``` @@ -87,7 +87,7 @@ CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER_ENABLE=false Go to your Coder host and run the following command to start up the Coder server: -```shell +```sh coder server --oauth2-github-allow-signups=true --oauth2-github-allowed-orgs="your-org" --oauth2-github-client-id="8d1...e05" --oauth2-github-client-secret="57ebc9...02c24c" ``` @@ -98,7 +98,7 @@ Alternatively, if you are running Coder as a system service, you can achieve the same result as the command above by adding the following environment variables to the `/etc/coder.d/coder.env` file: -```shell +```sh CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS=true CODER_OAUTH2_GITHUB_ALLOWED_ORGS="your-org" CODER_OAUTH2_GITHUB_CLIENT_ID="8d1...e05" @@ -136,7 +136,7 @@ coder: To upgrade Coder, run: -```shell +```sh helm upgrade <release-name> coder-v2/coder -n <namespace> -f values.yaml ``` @@ -152,7 +152,7 @@ This is enabled by default for the default GitHub app and cannot be disabled for For your own custom GitHub OAuth app, you can enable device flow by setting: -```shell +```sh CODER_OAUTH2_GITHUB_DEVICE_FLOW=true ``` diff --git a/docs/admin/users/idp-sync.md b/docs/admin/users/idp-sync.md index 847b3f8d34a88..658f689e2cd9c 100644 --- a/docs/admin/users/idp-sync.md +++ b/docs/admin/users/idp-sync.md @@ -459,7 +459,7 @@ to prevent creating excess groups. CODER_OIDC_GROUP_AUTO_CREATE=true ``` -```shell +```sh # as a flag --oidc-group-auto-create=true ``` @@ -476,7 +476,7 @@ set the following environment variable. CODER_OIDC_GROUP_REGEX_FILTER="^my-group-.*$" ``` -```shell +```sh # as a flag --oidc-group-regex-filter="^my-group-.*$" ``` diff --git a/docs/admin/users/index.md b/docs/admin/users/index.md index b49ac35905439..0a38fa8710abc 100644 --- a/docs/admin/users/index.md +++ b/docs/admin/users/index.md @@ -82,7 +82,7 @@ The new user will appear in the **Users** list. Use the toggle to change their To create a user via the Coder CLI, run: -```shell +```sh coder users create ``` @@ -116,7 +116,7 @@ To suspend a user via the web UI: To suspend a user via the CLI, run: -```shell +```sh coder users suspend <username|user_id> ``` @@ -135,7 +135,7 @@ To activate a user via the web UI: To activate a user via the CLI, run: -```shell +```sh coder users activate <username|user_id> ``` @@ -161,7 +161,7 @@ logging in. You can also reset a password via the CLI: -```shell +```sh # run `coder reset-password <username> --help` for usage instructions coder reset-password <username> ``` @@ -172,7 +172,7 @@ coder reset-password <username> ### Resetting a password on Kubernetes -```shell +```sh kubectl exec -it deployment/coder -n coder -- /bin/bash coder reset-password <username> @@ -232,7 +232,7 @@ You can use the Coder CLI or API to retrieve your list of users. Use `users list` to export the list of users to a CSV file: -```shell +```sh coder users list > users.csv ``` @@ -242,7 +242,7 @@ Visit the [users list](../../reference/cli/users_list.md) documentation for more Use [get users](../../reference/api/users.md#get-users): -```shell +```sh curl -X GET http://coder-server:8080/api/v2/users \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY' @@ -250,7 +250,7 @@ curl -X GET http://coder-server:8080/api/v2/users \ To export the results to a CSV file, you can use [`jq`](https://jqlang.org/) to process the JSON response: -```shell +```sh curl -X GET http://coder-server:8080/api/v2/users \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY' | \ diff --git a/docs/admin/users/organizations.md b/docs/admin/users/organizations.md index b38c46cd48549..efee0afaa93b3 100644 --- a/docs/admin/users/organizations.md +++ b/docs/admin/users/organizations.md @@ -79,7 +79,7 @@ provisioner as the built-in provisioners are scoped to the default organization. 1. Using Coder CLI, run the following command to create a key that will be used to authenticate the provisioner: - ```shell + ```sh coder provisioner keys create data-cluster-key --org data-platform Successfully created provisioner key data-cluster! Save this authentication token, it will not be shown again. diff --git a/docs/ai-coder/agent-firewall/index.md b/docs/ai-coder/agent-firewall/index.md index ca410dceaada3..60992be21766f 100644 --- a/docs/ai-coder/agent-firewall/index.md +++ b/docs/ai-coder/agent-firewall/index.md @@ -141,7 +141,7 @@ per template. You can do so by installing the [binary](https://github.com/coder/boundary) into the workspace image or at start-up. You can do so with the following command: -```bash +```sh curl -fsSL https://raw.githubusercontent.com/coder/boundary/main/install.sh | bash ``` diff --git a/docs/ai-coder/agent-firewall/nsjail/docker.md b/docs/ai-coder/agent-firewall/nsjail/docker.md index cb23a14bfe6c3..c6472cf266f37 100644 --- a/docs/ai-coder/agent-firewall/nsjail/docker.md +++ b/docs/ai-coder/agent-firewall/nsjail/docker.md @@ -93,7 +93,7 @@ above (or add "clone" to the list of allowed syscalls). Once updated, you can run the container with the custom seccomp profile: -```bash +```sh docker run -it \ --cap-add=NET_ADMIN \ --security-opt seccomp=seccomp-v25.0.13.json \ diff --git a/docs/ai-coder/agent-firewall/nsjail/k8s.md b/docs/ai-coder/agent-firewall/nsjail/k8s.md index 1de0e1d37bee4..4052f6f284c57 100644 --- a/docs/ai-coder/agent-firewall/nsjail/k8s.md +++ b/docs/ai-coder/agent-firewall/nsjail/k8s.md @@ -97,7 +97,7 @@ spec: User namespaces are often disabled (`user.max_user_namespaces=0`) on Bottlerocket nodes. Check and enable user namespaces: -```bash +```sh # Check current value sysctl user.max_user_namespaces diff --git a/docs/ai-coder/agents/extending-agents.md b/docs/ai-coder/agents/extending-agents.md index 01ce25c3d7d8c..587658b4cc775 100644 --- a/docs/ai-coder/agents/extending-agents.md +++ b/docs/ai-coder/agents/extending-agents.md @@ -57,7 +57,7 @@ a path-safe convenience for reading supporting files. Each `SKILL.md` starts with YAML frontmatter containing a `name` and an optional `description`, followed by the full instructions in markdown: -```markdown +```md --- name: deep-review description: "Multi-reviewer code review with domain-specific reviewers" @@ -93,7 +93,7 @@ frontmatter with a kebab-case `name`, an optional `description`, and a markdown body. This keeps content portable between personal skills and workspace skills. -```markdown +```md --- name: personal-reviewer description: "Personal review guidance" diff --git a/docs/ai-coder/agents/platform-controls/advisor.md b/docs/ai-coder/agents/platform-controls/advisor.md index 9ef54da4a7544..4fdfb166b1a5e 100644 --- a/docs/ai-coder/agents/platform-controls/advisor.md +++ b/docs/ai-coder/agents/platform-controls/advisor.md @@ -6,13 +6,13 @@ ## Enable the experiment -```shell +```sh coder server --experiments=chat-advisor ``` Or set the environment variable: -```shell +```sh CODER_EXPERIMENTS=chat-advisor ``` diff --git a/docs/ai-coder/agents/platform-controls/virtual-desktop.md b/docs/ai-coder/agents/platform-controls/virtual-desktop.md index e5186abdeb6b2..76b440f4b6a80 100644 --- a/docs/ai-coder/agents/platform-controls/virtual-desktop.md +++ b/docs/ai-coder/agents/platform-controls/virtual-desktop.md @@ -6,13 +6,13 @@ ## Enable the experiment -```shell +```sh coder server --experiments=chat-virtual-desktop ``` Or set the environment variable: -```shell +```sh CODER_EXPERIMENTS=chat-virtual-desktop ``` diff --git a/docs/ai-coder/ai-gateway/ai-gateway-proxy/setup.md b/docs/ai-coder/ai-gateway/ai-gateway-proxy/setup.md index 8cd0c179bf7b5..2d6b6b7904efa 100644 --- a/docs/ai-coder/ai-gateway/ai-gateway-proxy/setup.md +++ b/docs/ai-coder/ai-gateway/ai-gateway-proxy/setup.md @@ -14,7 +14,7 @@ Once enabled, `coderd` runs the `aibridgeproxyd` in-memory and intercepts traffi AI Gateway Proxy is disabled by default. To enable it, set the following configuration options: -```shell +```sh CODER_AI_GATEWAY_ENABLED=true \ CODER_AI_GATEWAY_PROXY_ENABLED=true \ CODER_AI_GATEWAY_PROXY_CERT_FILE=/path/to/ca.crt \ @@ -34,7 +34,7 @@ See [CA Certificate](#ca-certificate) for how to generate and obtain these files By default, the proxy listener accepts plain HTTP connections. To serve the listener over HTTPS, provide a TLS certificate and key: -```shell +```sh CODER_AI_GATEWAY_PROXY_TLS_CERT_FILE=/path/to/listener.crt CODER_AI_GATEWAY_PROXY_TLS_KEY_FILE=/path/to/listener.key # or via CLI flags: @@ -82,7 +82,7 @@ To prevent unauthorized use, restrict network access to the proxy so that only a In case the Coder access URL resolves to a private address, it is automatically exempt from this restriction so the proxy can always reach its own deployment. If you need to allow access to additional internal networks via the proxy, use the Allowlist CIDRs option ([`CODER_AI_GATEWAY_PROXY_ALLOWED_PRIVATE_CIDRS`](../../../reference/cli/server.md#--ai-gateway-proxy-allowed-private-cidrs)): -```shell +```sh CODER_AI_GATEWAY_PROXY_ALLOWED_PRIVATE_CIDRS=10.0.0.0/8,172.16.0.0/12 # or via CLI flag: --ai-gateway-proxy-allowed-private-cidrs=10.0.0.0/8,172.16.0.0/12 @@ -102,14 +102,14 @@ Generate a CA certificate specifically for AI Gateway Proxy: 1) Generate a private key: -```shell +```sh openssl genrsa -out ca.key 4096 chmod 400 ca.key ``` 1) Create a self-signed CA certificate (valid for 10 years): -```shell +```sh openssl req -new -x509 -days 3650 \ -key ca.key \ -out ca.crt \ @@ -118,7 +118,7 @@ openssl req -new -x509 -days 3650 \ Configure AI Gateway Proxy with both files: -```shell +```sh CODER_AI_GATEWAY_PROXY_CERT_FILE=/path/to/ca.crt CODER_AI_GATEWAY_PROXY_KEY_FILE=/path/to/ca.key ``` @@ -130,7 +130,7 @@ This simplifies deployment since AI tools that already trust your organization's Your organization's CA issues a certificate and private key pair for the proxy. Configure the proxy with both files: -```shell +```sh CODER_AI_GATEWAY_PROXY_CERT_FILE=/path/to/intermediate-ca.crt CODER_AI_GATEWAY_PROXY_KEY_FILE=/path/to/intermediate-ca.key ``` @@ -152,7 +152,7 @@ AI tools need to trust the CA certificate before connecting through the proxy. For **self-signed certificates**, AI tools must be configured to trust the CA certificate. The certificate (without the private key) is available at: -```shell +```sh https://<coder-url>/api/v2/ai-gateway/proxy/ca-cert.pem ``` @@ -176,7 +176,7 @@ The AI Gateway Proxy enforces a minimum TLS version of 1.2. In addition to the required proxy configuration, set the following to enable TLS on the proxy: -```shell +```sh CODER_AI_GATEWAY_PROXY_TLS_CERT_FILE=/path/to/listener.crt CODER_AI_GATEWAY_PROXY_TLS_KEY_FILE=/path/to/listener.key # or via CLI flags: @@ -195,14 +195,14 @@ Without a matching SAN, clients will reject the connection. 1) Generate a private key: -```shell +```sh openssl genrsa -out listener.key 4096 chmod 400 listener.key ``` 1) Create a self-signed certificate: -```shell +```sh openssl req -new -x509 -days 365 \ -key listener.key \ -out listener.crt \ @@ -254,13 +254,13 @@ To ensure AI Gateway also routes requests through the upstream proxy, make sure Configure the upstream proxy URL: -```shell +```sh CODER_AI_GATEWAY_PROXY_UPSTREAM=http://<corporate-proxy-url>:8080 ``` For HTTPS upstream proxies, if the upstream proxy uses a certificate not trusted by the system, provide the CA certificate: -```shell +```sh CODER_AI_GATEWAY_PROXY_UPSTREAM=https://<corporate-proxy-url>:8080 CODER_AI_GATEWAY_PROXY_UPSTREAM_CA=/path/to/corporate-ca.crt ``` @@ -281,7 +281,7 @@ Consult the tool's documentation for specific instructions. Alternatively, most tools support the standard `HTTPS_PROXY` environment variable, though this is not guaranteed for all tools: -```shell +```sh export HTTPS_PROXY="https://coder:${CODER_SESSION_TOKEN}@<proxy-host>:8888" ``` @@ -305,7 +305,7 @@ Consult the tool's documentation for specific instructions. Download the certificate: -```shell +```sh curl -o coder-ai-gateway-proxy-ca.pem \ -H "Coder-Session-Token: ${CODER_SESSION_TOKEN}" \ https://<coder-url>/api/v2/ai-gateway/proxy/ca-cert.pem @@ -316,7 +316,7 @@ Replace `<coder-url>` with your Coder deployment URL. When [TLS is enabled](#proxy-tls-configuration) on the proxy, AI tools must trust both the [MITM CA certificate](#ca-certificate) and the [TLS certificate](#proxy-tls-configuration). Combine both certificates into a single PEM file: -```shell +```sh cat coder-ai-gateway-proxy-ca.pem listener.crt > combined-ca.pem ``` @@ -336,7 +336,7 @@ Different AI tools use different runtimes, each with their own environment varia Set the environment variables associated with the AI tool's runtime. If you're unsure which runtime the tool uses, or if you use multiple AI tools, the simplest approach is to set all of them: -```shell +```sh export NODE_EXTRA_CA_CERTS="/path/to/coder-ai-gateway-proxy-ca.pem" export SSL_CERT_FILE="/path/to/coder-ai-gateway-proxy-ca.pem" export REQUESTS_CA_BUNDLE="/path/to/coder-ai-gateway-proxy-ca.pem" @@ -350,7 +350,7 @@ This makes the certificate trusted by all applications on the system. On Linux: -```shell +```sh sudo cp coder-ai-gateway-proxy-ca.pem /usr/local/share/ca-certificates/ sudo update-ca-certificates ``` @@ -385,7 +385,7 @@ This primarily affects deployments using a self-signed or internal CA, since pub in the system trust store. If the certificate is signed by a CA not in the system trust store, the connection fails and the Coder server logs: -```shell +```sh WARN: Cannot read TLS response from mitm'd server tls: failed to verify certificate: x509: certificate signed by unknown authority ``` @@ -397,7 +397,7 @@ reloads the trust store. If an AI tool fails with: -```shell +```sh x509: certificate signed by unknown authority ``` @@ -411,7 +411,7 @@ The proxy intercepts HTTPS traffic only for hostnames matching the base URL of a Gateway. Check that the provider is enabled and its base URL matches the hostname the tool is connecting to. Verify that `HTTPS_PROXY` points at the proxy. When interception is working, coderd logs: -```shell +```sh routing MITM request to aibridged ``` @@ -423,7 +423,7 @@ The Coder token must be supplied as the password in the proxy credentials, for e `https://coder:${CODER_SESSION_TOKEN}@<proxy-host>:8888`. When a CONNECT request has no usable token, the proxy replies with `407 Proxy Authentication Required` and logs: -```shell +```sh WARN rejecting CONNECT request host=... provider=... reason=missing_credentials ``` @@ -444,7 +444,7 @@ See [Client Configuration](#client-configuration) for how to configure the proxy Tunneled requests to private or reserved IP ranges are blocked by default. When a request is blocked, coderd logs: -```shell +```sh WARN blocking connection to private/reserved IP hostname=... port=... resolved_ip=... ``` diff --git a/docs/ai-coder/ai-gateway/clients/claude-code.md b/docs/ai-coder/ai-gateway/clients/claude-code.md index d110090d25923..1dca81998259c 100644 --- a/docs/ai-coder/ai-gateway/clients/claude-code.md +++ b/docs/ai-coder/ai-gateway/clients/claude-code.md @@ -9,7 +9,7 @@ Claude Code can be configured using environment variables. All modes require a * ## Centralized API Key -```bash +```sh # AI Gateway base URL. export ANTHROPIC_BASE_URL="<your-deployment-url>/api/v2/ai-gateway/anthropic" @@ -19,7 +19,7 @@ export ANTHROPIC_AUTH_TOKEN="<your-coder-api-token>" ## BYOK (Personal API Key) -```bash +```sh # AI Gateway base URL. export ANTHROPIC_BASE_URL="<your-deployment-url>/api/v2/ai-gateway/anthropic" @@ -35,7 +35,7 @@ unset ANTHROPIC_AUTH_TOKEN ## BYOK (Claude Subscription) -```bash +```sh # AI Gateway base URL. export ANTHROPIC_BASE_URL="<your-deployment-url>/api/v2/ai-gateway/anthropic" diff --git a/docs/ai-coder/ai-gateway/clients/codex.md b/docs/ai-coder/ai-gateway/clients/codex.md index cc92d0f89fd97..316992be9c970 100644 --- a/docs/ai-coder/ai-gateway/clients/codex.md +++ b/docs/ai-coder/ai-gateway/clients/codex.md @@ -23,7 +23,7 @@ wire_api = "responses" To authenticate with AI Gateway, get your **[Coder API token](../../../admin/users/sessions-tokens.md#generate-a-long-lived-api-token-on-behalf-of-yourself)** and set it in your environment: -```bash +```sh export OPENAI_API_KEY="<your-coder-api-token>" ``` @@ -46,7 +46,7 @@ env_http_headers = { "X-Coder-AI-Governance-Token" = "CODER_API_TOKEN" } Set both environment variables: -```bash +```sh # Your personal OpenAI API key, forwarded to OpenAI. export OPENAI_API_KEY="<your-openai-api-key>" @@ -79,7 +79,7 @@ env_http_headers = { "X-Coder-AI-Governance-Token" = "CODER_API_TOKEN" } Set your Coder API token and ensure `OPENAI_API_KEY` is not set: -```bash +```sh # Your Coder API token, used for authentication with AI Gateway. export CODER_API_TOKEN="<your-coder-api-token>" diff --git a/docs/ai-coder/ai-gateway/clients/copilot.md b/docs/ai-coder/ai-gateway/clients/copilot.md index cb7af2d488d4f..7aff3bd493dc2 100644 --- a/docs/ai-coder/ai-gateway/clients/copilot.md +++ b/docs/ai-coder/ai-gateway/clients/copilot.md @@ -27,7 +27,7 @@ For installation instructions, see [GitHub Copilot CLI documentation](https://do Set the `HTTPS_PROXY` environment variable: -```shell +```sh export HTTPS_PROXY="https://coder:${CODER_API_TOKEN}@<proxy-host>:8888" ``` @@ -39,7 +39,7 @@ Note: if [TLS is not enabled](../ai-gateway-proxy/setup.md#proxy-tls-configurati Copilot CLI is built on Node.js and uses the `NODE_EXTRA_CA_CERTS` environment variable for custom certificates: -```shell +```sh export NODE_EXTRA_CA_CERTS="/path/to/coder-ai-gateway-proxy-ca.pem" ``` @@ -47,7 +47,7 @@ See [Client Configuration CA certificate trust](../ai-gateway-proxy/setup.md#tru When [TLS is enabled](../ai-gateway-proxy/setup.md#proxy-tls-configuration) on the proxy, combine the MITM CA certificate and the TLS certificate into a single file: -```shell +```sh cat coder-ai-gateway-proxy-ca.pem listener.crt > combined-ca.pem export NODE_EXTRA_CA_CERTS="/path/to/combined-ca.pem" ``` diff --git a/docs/ai-coder/ai-gateway/clients/mux.md b/docs/ai-coder/ai-gateway/clients/mux.md index a7da16fdb5787..1f01124e2660a 100644 --- a/docs/ai-coder/ai-gateway/clients/mux.md +++ b/docs/ai-coder/ai-gateway/clients/mux.md @@ -85,7 +85,7 @@ module "mux" { If you prefer a file-based config, edit `~/.mux/providers.jsonc`: -```jsonc +```json { "openai": { "apiKey": "<your-coder-api-token>", diff --git a/docs/ai-coder/ai-gateway/mcp.md b/docs/ai-coder/ai-gateway/mcp.md index cc002ed24d54b..294c14975c1bb 100644 --- a/docs/ai-coder/ai-gateway/mcp.md +++ b/docs/ai-coder/ai-gateway/mcp.md @@ -26,7 +26,7 @@ AI Gateway makes use of [External Auth](../../admin/external-auth/index.md) appl For example, GitHub has a [remote MCP server](https://github.com/github/github-mcp-server?tab=readme-ov-file#remote-github-mcp-server) and we can use it as follows. -```bash +```sh CODER_EXTERNAL_AUTH_0_TYPE=github CODER_EXTERNAL_AUTH_0_CLIENT_ID=... CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=... diff --git a/docs/ai-coder/github-to-tasks.md b/docs/ai-coder/github-to-tasks.md index d48c10e78f9dd..46d3da323fe32 100644 --- a/docs/ai-coder/github-to-tasks.md +++ b/docs/ai-coder/github-to-tasks.md @@ -96,7 +96,7 @@ You must also set `coder-template-name` as part of this. The GHA example has thi - By viewing the URL of the template in the UI, e.g. `https://<your-coder-url>/templates/<org-name>/<template-name>` - Using the Coder CLI: -```bash +```sh # List all templates in your organization coder templates list @@ -165,7 +165,7 @@ We recommend that you further adapt this workflow to better match your process. - Modify the underlying use case to handle updating documentation, implementing a small feature, reviewing bug reports for completeness, or even writing unit tests - Modify the workflow trigger for other scenarios such as: -```yml +```yaml # Comment-based trigger slash commands on: issue_comment: @@ -251,7 +251,7 @@ Generate a new token with these permissions at `https://<your-coder-url>/deploym From within the running task workspace, check if the token is still valid: -```bash +```sh # Check if the token still works curl -H "Authorization: token ${GITHUB_TOKEN}" \ https://api.github.com/user diff --git a/docs/install/airgap.md b/docs/install/airgap.md index c371de54d9a67..06e99571c3706 100644 --- a/docs/install/airgap.md +++ b/docs/install/airgap.md @@ -147,13 +147,13 @@ filesystem mirror without re-building the image. First, create an empty plugins directory: -```shell +```sh mkdir $HOME/plugins ``` Next, add a volume mount to compose.yaml: -```shell +```sh vim compose.yaml ``` diff --git a/docs/install/cloud/azure-vm.md b/docs/install/cloud/azure-vm.md index 6cc21631056ba..258e47307ec0a 100644 --- a/docs/install/cloud/azure-vm.md +++ b/docs/install/cloud/azure-vm.md @@ -60,7 +60,7 @@ Coder a multitude of different ways. You can learn more about those In the Azure VM instance, run the following command to install Coder -```shell +```sh curl -fsSL https://coder.com/install.sh | sh ``` @@ -68,13 +68,13 @@ curl -fsSL https://coder.com/install.sh | sh Run the following command to start Coder as a system level service: -```shell +```sh sudo systemctl enable --now coder ``` The following command will get you information about the Coder launch service -```shell +```sh journalctl -u coder.service -b ``` @@ -84,7 +84,7 @@ Embedded in the logs is the Coder Access URL. Copy the URL and run the following command to create the first user, either on your local machine or in the instance terminal. -```shell +```sh coder login <url***.try.coder.app> ``` @@ -119,7 +119,7 @@ to initialize the template. Run the following commands to copy the Azure credentials and give the `coder` user access to them: -```shell +```sh sudo cp -r ~/.azure /home/coder/.azure sudo chown -R coder:coder /home/coder/.azure/ ``` @@ -127,7 +127,7 @@ sudo chown -R coder:coder /home/coder/.azure/ Navigate to the `./azure-linux` folder where you created your template and run the following command to put the template on your Coder instance. -```shell +```sh coder templates push ``` diff --git a/docs/install/cloud/compute-engine.md b/docs/install/cloud/compute-engine.md index c9f12e1633d72..43c21510e5f6c 100644 --- a/docs/install/cloud/compute-engine.md +++ b/docs/install/cloud/compute-engine.md @@ -54,7 +54,7 @@ Given you created or added key-pairs when launching the instance, you can [configure your Coder deployment](../../admin/setup/index.md) by logging in via SSH or using the console: -```shell +```sh ssh ubuntu@<gcp-public-IPv4> sudo vim /etc/coder.d/coder.env # edit config sudo systemctl daemon-reload diff --git a/docs/install/docker.md b/docs/install/docker.md index 999c980a4f6fe..911c3484efca1 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -36,7 +36,7 @@ which includes a PostgreSQL container and volume. 1. Update `group_add:` in `docker-compose.yaml` with the `gid` of `docker` group. You can get the `docker` group `gid` by running the below command: - ```shell + ```sh getent group docker | cut -d: -f3 ``` @@ -57,7 +57,7 @@ Coder's [configuration options](../admin/setup/index.md). For proof-of-concept deployments, you can run a complete Coder instance with the following command. -```shell +```sh export CODER_DATA=$HOME/.config/coderv2-docker export DOCKER_GROUP=$(getent group docker | cut -d: -f3) mkdir -p $CODER_DATA @@ -74,7 +74,7 @@ For production deployments, we recommend using an external PostgreSQL database (version 13 or higher). Set `CODER_ACCESS_URL` to the external URL that users and workspaces will use to connect to Coder. -```shell +```sh export DOCKER_GROUP=$(getent group docker | cut -d: -f3) docker run --rm -it \ -e CODER_ACCESS_URL="https://coder.example.com" \ diff --git a/docs/install/kubernetes.md b/docs/install/kubernetes.md index e55a067229d2c..8954a2b131a90 100644 --- a/docs/install/kubernetes.md +++ b/docs/install/kubernetes.md @@ -55,7 +55,7 @@ helm install postgresql bitnami/postgresql \ The cluster-internal DB URL for the above database is: -```shell +```sh postgres://coder:coder@postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable ``` @@ -75,7 +75,7 @@ kubectl create secret generic coder-db-url -n coder \ ## 4. Install Coder with Helm -```shell +```sh helm repo add coder-v2 https://helm.coder.com/v2 ``` @@ -131,7 +131,7 @@ We support two release channels: mainline and stable - read the - **Chart Registry** <!-- autoversion(mainline): "--version [version]" --> - ```shell + ```sh helm install coder coder-v2/coder \ --namespace coder \ --values values.yaml \ @@ -142,7 +142,7 @@ We support two release channels: mainline and stable - read the <!-- autoversion(mainline): "--version [version]" --> - ```shell + ```sh helm install coder oci://ghcr.io/coder/chart/coder \ --namespace coder \ --values values.yaml \ @@ -155,7 +155,7 @@ We support two release channels: mainline and stable - read the <!-- autoversion(stable): "--version [version]" --> - ```shell + ```sh helm install coder coder-v2/coder \ --namespace coder \ --values values.yaml \ @@ -166,7 +166,7 @@ We support two release channels: mainline and stable - read the <!-- autoversion(stable): "--version [version]" --> - ```shell + ```sh helm install coder oci://ghcr.io/coder/chart/coder \ --namespace coder \ --values values.yaml \ @@ -190,7 +190,7 @@ to the proper Coder URL. To upgrade Coder in the future or change values, you can run the following command: -```shell +```sh helm repo update helm upgrade coder coder-v2/coder \ --namespace coder \ diff --git a/docs/install/kubernetes/kubernetes-azure-app-gateway.md b/docs/install/kubernetes/kubernetes-azure-app-gateway.md index 1f9000ce003f2..6a3236ed5a3ac 100644 --- a/docs/install/kubernetes/kubernetes-azure-app-gateway.md +++ b/docs/install/kubernetes/kubernetes-azure-app-gateway.md @@ -100,13 +100,13 @@ The steps here follow the Microsoft tutorial for a Coder deployment. 1. Create Coder namespace: - ```shell + ```sh kubectl create ns coder ``` 1. Deploy non-production PostgreSQL instance to AKS cluster: - ```shell + ```sh helm repo add bitnami https://charts.bitnami.com/bitnami helm install coder-db bitnami/postgresql \ --set image.repository=bitnamilegacy/postgresql \ @@ -119,13 +119,13 @@ The steps here follow the Microsoft tutorial for a Coder deployment. 1. Create the PostgreSQL secret: - ```shell + ```sh kubectl create secret generic coder-db-url -n coder --from-literal=url="postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable" ``` 1. Deploy Coder to AKS cluster: - ```shell + ```sh helm repo add coder-v2 https://helm.coder.com/v2 helm install coder coder-v2/coder \ --namespace coder \ diff --git a/docs/install/openshift.md b/docs/install/openshift.md index 82e16b6f4698e..2506e1cd08278 100644 --- a/docs/install/openshift.md +++ b/docs/install/openshift.md @@ -13,13 +13,13 @@ Run the following command to login to your OpenShift cluster: -```shell +```sh oc login --token=w4r...04s --server=<cluster-url> ``` Next, you will run the below command to create a project for Coder: -```shell +```sh oc new-project coder ``` @@ -171,7 +171,7 @@ oc apply -f route.yaml You can now install Coder using the values you've set from the above steps. To do so, run the series of `helm` commands below: -```shell +```sh helm repo add coder-v2 https://helm.coder.com/v2 helm repo update helm install coder coder-v2/coder \ @@ -247,7 +247,7 @@ Security Context Constraints (SCCs) in OpenShift. > For more information, please consult the > [OpenShift Documentation](https://docs.openshift.com/container-platform/4.12/cicd/builds/understanding-buildconfigs.html). - ```shell + ```sh oc create -f - <<EOF kind: BuildConfig apiVersion: build.openshift.io/v1 @@ -292,7 +292,7 @@ Security Context Constraints (SCCs) in OpenShift. 1. Create an `ImageStream` as a target for the previous step: - ```shell + ```sh oc create imagestream enterprise-base ``` @@ -309,7 +309,7 @@ Security Context Constraints (SCCs) in OpenShift. Start from the default "Kubernetes" template: -```shell +```sh echo kubernetes | coderv2 templates init ./openshift-k8s cd ./openshift-k8s ``` @@ -323,7 +323,7 @@ Edit `main.tf` and update the following fields of the Kubernetes pod resource: Finally, create the template: -```shell +```sh coder template push kubernetes -d . ``` diff --git a/docs/install/rancher.md b/docs/install/rancher.md index 098a5fbac7c63..fe099d631e9af 100644 --- a/docs/install/rancher.md +++ b/docs/install/rancher.md @@ -22,7 +22,7 @@ Installing Coder on Rancher involves four key steps: Create a namespace for the Coder control plane. In this tutorial, we call it `coder`: -```shell +```sh kubectl create namespace coder ``` @@ -78,7 +78,7 @@ For more advanced PostgreSQL management, consider using the Create a Kubernetes secret with your PostgreSQL connection URL: -```shell +```sh kubectl create secret generic coder-db-url -n coder \ --from-literal=url="postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable" ``` diff --git a/docs/install/releases/feature-stages.md b/docs/install/releases/feature-stages.md index 44c50cccae55e..f4f46f7ea5bda 100644 --- a/docs/install/releases/feature-stages.md +++ b/docs/install/releases/feature-stages.md @@ -43,13 +43,13 @@ access features: - Enable all early access features: - ```shell + ```sh coder server --experiments=* ``` - Enable multiple early access features: - ```shell + ```sh coder server --experiments=feature1,feature2 ``` diff --git a/docs/install/releases/index.md b/docs/install/releases/index.md index 97cd323647f42..31f18c6a988c9 100644 --- a/docs/install/releases/index.md +++ b/docs/install/releases/index.md @@ -67,7 +67,7 @@ our GitHub [releases page](https://github.com/coder/coder/releases). You can also use our `install.sh` script with the `stable` flag to install the latest stable release: -```shell +```sh curl -fsSL https://coder.com/install.sh | sh -s -- --stable ``` diff --git a/docs/install/uninstall.md b/docs/install/uninstall.md index 12f1f96d0a7fa..c2df3d6530378 100644 --- a/docs/install/uninstall.md +++ b/docs/install/uninstall.md @@ -15,19 +15,19 @@ To uninstall your Coder server, delete the following directories. ## Debian, Ubuntu -```shell +```sh sudo apt remove coder ``` ## Fedora, CentOS, RHEL, SUSE -```shell +```sh sudo yum remove coder ``` ## Alpine -```shell +```sh sudo apk del coder ``` @@ -36,19 +36,19 @@ sudo apk del coder If you installed Coder manually or used the install script on an unsupported operating system, you can remove the binary directly: -```shell +```sh sudo rm /usr/local/bin/coder ``` ## macOS -```shell +```sh brew uninstall coder ``` If you installed Coder manually, you can remove the binary directly: -```shell +```sh sudo rm /usr/local/bin/coder ``` @@ -62,7 +62,7 @@ winget uninstall Coder.Coder ## Coder as a system service configuration -```shell +```sh sudo rm /etc/coder.d/coder.env ``` @@ -76,14 +76,14 @@ performing the following step or copying the directory to another location. ## Linux -```shell +```sh rm -rf ~/.config/coderv2 rm -rf ~/.cache/coder ``` ## macOS -```shell +```sh rm -rf ~/Library/Application\ Support/coderv2 ``` diff --git a/docs/install/upgrade-best-practices.md b/docs/install/upgrade-best-practices.md index 58b240c95f66b..1c4c8a777ba04 100644 --- a/docs/install/upgrade-best-practices.md +++ b/docs/install/upgrade-best-practices.md @@ -43,14 +43,14 @@ prevent the new pod from acquiring necessary locks. when the upgrade starts. This momentarily ensures no application access to the database, allowing migrations to acquire locks immediately: - ```shell + ```sh kubectl scale deployment coder --replicas=0 ``` - **Scale to one** if you prefer to minimize downtime. This keeps one pod running but eliminates contention from multiple replicas: - ```shell + ```sh kubectl scale deployment coder --replicas=1 ``` @@ -82,7 +82,7 @@ killing the pod prematurely. To confirm whether Kubernetes is killing pods due to liveness probe failures, check the Kubernetes events and pod logs: -```shell +```sh # Check events for the Coder deployment kubectl get events --field-selector involvedObject.name=coder -n <namespace> @@ -98,7 +98,7 @@ liveness probe, will be restarted`. If you have liveness probes enabled and experience issues during upgrades, disable them before upgrading: -```shell +```sh kubectl edit deployment coder ``` @@ -135,7 +135,7 @@ If an upgrade gets stuck in a restart loop due to database locks: 1. **Scale to zero:** Scale the Coder deployment to 0 to stop all application activity. - ```shell + ```sh kubectl scale deployment coder --replicas=0 ``` diff --git a/docs/install/upgrade.md b/docs/install/upgrade.md index 2c26614a30fc7..df17ba0ec25c5 100644 --- a/docs/install/upgrade.md +++ b/docs/install/upgrade.md @@ -19,13 +19,13 @@ of [install](../install/index.md). 1. If you installed Coder using the `install.sh` script, re-run the below command on the host: - ```shell + ```sh curl -L https://coder.com/install.sh | sh ``` 1. If you're running Coder as a system service, you can restart it with `systemctl`: - ```shell + ```sh systemctl daemon-reload systemctl restart coder ``` @@ -39,7 +39,7 @@ of [install](../install/index.md). If you installed using `docker-compose`, run the below command to upgrade the Coder container: -```shell +```sh docker-compose pull coder && docker-compose up -d coder ``` @@ -52,7 +52,7 @@ See 1. Run the Coder installation script on the host: - ```shell + ```sh curl -L https://coder.com/install.sh | sh ``` @@ -61,7 +61,7 @@ See 1. Restart the Coder system process with `systemctl`: - ```shell + ```sh systemctl daemon-reload systemctl restart coder ``` diff --git a/docs/reference/agent-api/debug.md b/docs/reference/agent-api/debug.md index ef1b3166f9b72..ca3e5c5e1cd67 100644 --- a/docs/reference/agent-api/debug.md +++ b/docs/reference/agent-api/debug.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh curl $CODER_AGENT_DEBUG_ADDRESS/debug/logs ``` @@ -22,7 +22,7 @@ Get the first 10MiB of data from `$CODER_AGENT_LOG_DIR/coder-agent.log`. ### Code samples -```shell +```sh curl $CODER_AGENT_DEBUG_ADDRESS/debug/magicsock ``` @@ -35,7 +35,7 @@ See ### Code samples -```shell +```sh curl $CODER_AGENT_DEBUG_ADDRESS/debug/magicsock/debug-logging/true ``` @@ -61,7 +61,7 @@ for more information. ### Code samples -```shell +```sh curl $CODER_AGENT_DEBUG_ADDRESS/debug/manifest ``` diff --git a/docs/reference/api/agents.md b/docs/reference/api/agents.md index 220115d59af4f..75eb4ea60be3c 100644 --- a/docs/reference/api/agents.md +++ b/docs/reference/api/agents.md @@ -6,7 +6,7 @@ Workspace agent endpoints. These power the workspace agent daemon defined by the ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/derp-map \ -H 'Coder-Session-Token: API_KEY' @@ -26,7 +26,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/tailnet \ -H 'Coder-Session-Token: API_KEY' @@ -46,7 +46,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaceagents/aws-instance-identity \ -H 'Content-Type: application/json' \ @@ -94,7 +94,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaceagents/azure-instance-identity \ -H 'Content-Type: application/json' \ @@ -142,7 +142,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaceagents/google-instance-identity \ -H 'Content-Type: application/json' \ @@ -189,7 +189,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/app-status \ -H 'Content-Type: application/json' \ @@ -247,7 +247,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/external-auth?match=string&id=string \ -H 'Accept: application/json' \ @@ -292,7 +292,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/gitauth?match=string&id=string \ -H 'Accept: application/json' \ @@ -337,7 +337,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/gitsshkey \ -H 'Accept: application/json' \ @@ -369,7 +369,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/log-source \ -H 'Content-Type: application/json' \ @@ -421,7 +421,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/workspaceagents/me/logs \ -H 'Content-Type: application/json' \ @@ -481,7 +481,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/reinit \ -H 'Accept: application/json' \ @@ -521,7 +521,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \ -H 'Accept: application/json' \ @@ -672,7 +672,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/connection \ -H 'Accept: application/json' \ @@ -770,7 +770,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/containers?label=string \ -H 'Accept: application/json' \ @@ -880,7 +880,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/containers/devcontainers/{devcontainer} \ -H 'Coder-Session-Token: API_KEY' @@ -907,7 +907,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/containers/devcontainers/{devcontainer}/recreate \ -H 'Accept: application/json' \ @@ -952,7 +952,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/containers/watch \ -H 'Accept: application/json' \ @@ -1061,7 +1061,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/coordinate \ -H 'Coder-Session-Token: API_KEY' @@ -1087,7 +1087,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/listening-ports \ -H 'Accept: application/json' \ @@ -1130,7 +1130,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/logs \ -H 'Accept: application/json' \ @@ -1203,7 +1203,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/pty \ -H 'Coder-Session-Token: API_KEY' @@ -1229,7 +1229,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/startup-logs \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/aigateway.md b/docs/reference/api/aigateway.md index 9c2f3bd8532c0..09e869a1693a5 100644 --- a/docs/reference/api/aigateway.md +++ b/docs/reference/api/aigateway.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ai-gateway/clients \ -H 'Accept: application/json' \ @@ -39,7 +39,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ai-gateway/models \ -H 'Accept: application/json' \ @@ -74,7 +74,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ai-gateway/sessions \ -H 'Accept: application/json' \ @@ -149,7 +149,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ai-gateway/sessions/{session_id} \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/aiproviders.md b/docs/reference/api/aiproviders.md index 35b81f6178a9b..fe9be024bfcdc 100644 --- a/docs/reference/api/aiproviders.md +++ b/docs/reference/api/aiproviders.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ai/providers \ -H 'Accept: application/json' \ @@ -81,7 +81,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/ai/providers \ -H 'Content-Type: application/json' \ @@ -152,7 +152,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ai/providers/{idOrName} \ -H 'Accept: application/json' \ @@ -205,7 +205,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/ai/providers/{idOrName} \ -H 'Coder-Session-Token: API_KEY' @@ -231,7 +231,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/ai/providers/{idOrName} \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/applications.md b/docs/reference/api/applications.md index e8d95f4efb36e..af1d3b503171f 100644 --- a/docs/reference/api/applications.md +++ b/docs/reference/api/applications.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/applications/auth-redirect \ -H 'Coder-Session-Token: API_KEY' @@ -30,7 +30,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/applications/host \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/audit.md b/docs/reference/api/audit.md index 6f2e46931ee4b..06a7057fb7d0d 100644 --- a/docs/reference/api/audit.md +++ b/docs/reference/api/audit.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/audit?limit=0 \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/authentication.md b/docs/reference/api/authentication.md index 77668fe030781..aef03ae6ee3e3 100644 --- a/docs/reference/api/authentication.md +++ b/docs/reference/api/authentication.md @@ -2,7 +2,7 @@ Long-lived tokens can be generated to perform actions on behalf of your user account: -```shell +```sh coder tokens create ``` diff --git a/docs/reference/api/authorization.md b/docs/reference/api/authorization.md index ad6632446cca8..1580bbcef027a 100644 --- a/docs/reference/api/authorization.md +++ b/docs/reference/api/authorization.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/auth/scopes \ -H 'Accept: application/json' @@ -34,7 +34,7 @@ curl -X GET http://coder-server:8080/api/v2/auth/scopes \ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/authcheck \ -H 'Content-Type: application/json' \ @@ -102,7 +102,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/login \ -H 'Content-Type: application/json' \ @@ -146,7 +146,7 @@ curl -X POST http://coder-server:8080/api/v2/users/login \ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/otp/change-password \ -H 'Content-Type: application/json' @@ -180,7 +180,7 @@ curl -X POST http://coder-server:8080/api/v2/users/otp/change-password \ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/otp/request \ -H 'Content-Type: application/json' @@ -212,7 +212,7 @@ curl -X POST http://coder-server:8080/api/v2/users/otp/request \ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/validate-password \ -H 'Content-Type: application/json' \ @@ -259,7 +259,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/{user}/convert-login \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/builds.md b/docs/reference/api/builds.md index 5f56524b445cc..cc61c88742af7 100644 --- a/docs/reference/api/builds.md +++ b/docs/reference/api/builds.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacename}/builds/{buildnumber} \ -H 'Accept: application/json' \ @@ -249,7 +249,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \ -H 'Accept: application/json' \ @@ -492,7 +492,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/cancel \ -H 'Accept: application/json' \ @@ -543,7 +543,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/logs \ -H 'Accept: application/json' \ @@ -618,7 +618,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/parameters \ -H 'Accept: application/json' \ @@ -668,7 +668,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/resources \ -H 'Accept: application/json' \ @@ -964,7 +964,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/state \ -H 'Accept: application/json' \ @@ -1207,7 +1207,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/state \ -H 'Content-Type: application/json' \ @@ -1245,7 +1245,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/timings \ -H 'Accept: application/json' \ @@ -1313,7 +1313,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \ -H 'Accept: application/json' \ @@ -1751,7 +1751,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/chats.md b/docs/reference/api/chats.md index 40bbd32637b85..ef1986a66dd24 100644 --- a/docs/reference/api/chats.md +++ b/docs/reference/api/chats.md @@ -6,7 +6,7 @@ Programmatic API for Coder Agents (the user-facing "Coder Agents" / "Chats" prod ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats \ -H 'Accept: application/json' \ @@ -238,7 +238,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/experimental/chats \ -H 'Content-Type: application/json' \ @@ -511,7 +511,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/experimental/chats/files?organization=497f6eca-6276-4993-bfeb-53cbbbba6f08 \ -H 'Accept: application/json' \ @@ -550,7 +550,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/files/{file} \ -H 'Coder-Session-Token: API_KEY' @@ -578,7 +578,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/models \ -H 'Accept: application/json' \ @@ -631,7 +631,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/watch \ -H 'Accept: application/json' \ @@ -770,7 +770,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/{chat} \ -H 'Accept: application/json' \ @@ -1001,7 +1001,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/experimental/chats/{chat} \ -H 'Content-Type: application/json' \ @@ -1047,7 +1047,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/experimental/chats/{chat}/context \ -H 'Accept: application/json' \ @@ -1278,7 +1278,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/{chat}/diff \ -H 'Accept: application/json' \ @@ -1322,7 +1322,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/experimental/chats/{chat}/interrupt \ -H 'Accept: application/json' \ @@ -1553,7 +1553,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/{chat}/messages \ -H 'Accept: application/json' \ @@ -1750,7 +1750,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/experimental/chats/{chat}/messages \ -H 'Content-Type: application/json' \ @@ -1970,7 +1970,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/experimental/chats/{chat}/messages/{message} \ -H 'Content-Type: application/json' \ @@ -2115,7 +2115,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/{chat}/prompts \ -H 'Accept: application/json' \ @@ -2166,7 +2166,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/experimental/chats/{chat}/reconcile-invalid \ -H 'Accept: application/json' \ @@ -2397,7 +2397,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/{chat}/stream \ -H 'Accept: application/json' \ @@ -2687,7 +2687,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/{chat}/stream/desktop \ -H 'Coder-Session-Token: API_KEY' @@ -2716,7 +2716,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/experimental/chats/{chat}/stream/git \ -H 'Accept: application/json' \ @@ -2766,7 +2766,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/experimental/chats/{chat}/title/regenerate \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/debug.md b/docs/reference/api/debug.md index 67e8f6e440f80..235f468e82a45 100644 --- a/docs/reference/api/debug.md +++ b/docs/reference/api/debug.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/debug/coordinator \ -H 'Coder-Session-Token: API_KEY' @@ -24,7 +24,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/debug/health \ -H 'Accept: application/json' \ @@ -427,7 +427,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/debug/health/settings \ -H 'Accept: application/json' \ @@ -460,7 +460,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/debug/health/settings \ -H 'Content-Type: application/json' \ @@ -510,7 +510,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/debug/tailnet \ -H 'Coder-Session-Token: API_KEY' diff --git a/docs/reference/api/enterprise.md b/docs/reference/api/enterprise.md index 34915c902b5e9..6368a193130b7 100644 --- a/docs/reference/api/enterprise.md +++ b/docs/reference/api/enterprise.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/.well-known/oauth-authorization-server \ -H 'Accept: application/json' @@ -51,7 +51,7 @@ curl -X GET http://coder-server:8080/.well-known/oauth-authorization-server \ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/.well-known/oauth-protected-resource \ -H 'Accept: application/json' @@ -88,7 +88,7 @@ curl -X GET http://coder-server:8080/.well-known/oauth-protected-resource \ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/agent-firewall/sessions/{id} \ -H 'Accept: application/json' \ @@ -129,7 +129,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/agent-firewall/sessions/{id}/logs \ -H 'Accept: application/json' \ @@ -182,7 +182,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ai-gateway/keys \ -H 'Accept: application/json' \ @@ -232,7 +232,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/ai-gateway/keys \ -H 'Content-Type: application/json' \ @@ -282,7 +282,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/ai-gateway/keys/{key} \ -H 'Coder-Session-Token: API_KEY' @@ -308,7 +308,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ai-gateway/serve \ -H 'X-AI-Governance-Gateway-Key: API_KEY' @@ -328,7 +328,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/appearance \ -H 'Accept: application/json' \ @@ -381,7 +381,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/appearance \ -H 'Content-Type: application/json' \ @@ -453,7 +453,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/connectionlog?limit=0 \ -H 'Accept: application/json' \ @@ -548,7 +548,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/entitlements \ -H 'Accept: application/json' \ @@ -612,7 +612,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/groups?organization=string&has_member=string&group_ids=string \ -H 'Accept: application/json' \ @@ -717,7 +717,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/groups/{group} \ -H 'Accept: application/json' \ @@ -780,7 +780,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/groups/{group} \ -H 'Accept: application/json' \ @@ -842,7 +842,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/groups/{group} \ -H 'Content-Type: application/json' \ @@ -923,7 +923,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/groups/{group}/ai/budget \ -H 'Accept: application/json' \ @@ -963,7 +963,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/groups/{group}/ai/budget \ -H 'Content-Type: application/json' \ @@ -1013,7 +1013,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/groups/{group}/ai/budget \ -H 'Coder-Session-Token: API_KEY' @@ -1039,7 +1039,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/groups/{group}/members \ -H 'Accept: application/json' \ @@ -1096,7 +1096,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/licenses \ -H 'Accept: application/json' \ @@ -1144,7 +1144,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/licenses \ -H 'Content-Type: application/json' \ @@ -1193,7 +1193,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/licenses/refresh-entitlements \ -H 'Accept: application/json' \ @@ -1231,7 +1231,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/licenses/{id} \ -H 'Coder-Session-Token: API_KEY' @@ -1257,7 +1257,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/notifications/templates/{notification_template}/method \ -H 'Coder-Session-Token: API_KEY' @@ -1284,7 +1284,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/oauth2-provider/apps \ -H 'Accept: application/json' \ @@ -1349,7 +1349,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/oauth2-provider/apps \ -H 'Content-Type: application/json' \ @@ -1406,7 +1406,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/oauth2-provider/apps/{app} \ -H 'Accept: application/json' \ @@ -1452,7 +1452,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/oauth2-provider/apps/{app} \ -H 'Content-Type: application/json' \ @@ -1510,7 +1510,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/oauth2-provider/apps/{app} \ -H 'Coder-Session-Token: API_KEY' @@ -1536,7 +1536,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/oauth2-provider/apps/{app}/secrets \ -H 'Accept: application/json' \ @@ -1588,7 +1588,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/oauth2-provider/apps/{app}/secrets \ -H 'Accept: application/json' \ @@ -1638,7 +1638,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/oauth2-provider/apps/{app}/secrets/{secretID} \ -H 'Coder-Session-Token: API_KEY' @@ -1665,7 +1665,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/groups \ -H 'Accept: application/json' \ @@ -1768,7 +1768,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/groups \ -H 'Content-Type: application/json' \ @@ -1843,7 +1843,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/groups/{groupName} \ -H 'Accept: application/json' \ @@ -1906,7 +1906,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/groups/{groupName}/members \ -H 'Accept: application/json' \ @@ -1964,7 +1964,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members/{user}/workspace-quota \ -H 'Accept: application/json' \ @@ -2003,7 +2003,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerdaemons/serve \ -H 'Coder-Session-Token: API_KEY' @@ -2029,7 +2029,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerkeys \ -H 'Accept: application/json' \ @@ -2089,7 +2089,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/provisionerkeys \ -H 'Accept: application/json' \ @@ -2126,7 +2126,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerkeys/daemons \ -H 'Accept: application/json' \ @@ -2251,7 +2251,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/provisionerkeys/{provisionerkey} \ -H 'Coder-Session-Token: API_KEY' @@ -2278,7 +2278,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/available-fields \ -H 'Accept: application/json' \ @@ -2317,7 +2317,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/field-values?claimField=string \ -H 'Accept: application/json' \ @@ -2357,7 +2357,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/groups \ -H 'Accept: application/json' \ @@ -2408,7 +2408,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/groups \ -H 'Content-Type: application/json' \ @@ -2483,7 +2483,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/groups/config \ -H 'Content-Type: application/json' \ @@ -2546,7 +2546,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/groups/mapping \ -H 'Content-Type: application/json' \ @@ -2618,7 +2618,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/roles \ -H 'Accept: application/json' \ @@ -2663,7 +2663,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/roles \ -H 'Content-Type: application/json' \ @@ -2726,7 +2726,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/roles/config \ -H 'Content-Type: application/json' \ @@ -2781,7 +2781,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/roles/mapping \ -H 'Content-Type: application/json' \ @@ -2847,7 +2847,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/settings/workspace-sharing \ -H 'Accept: application/json' \ @@ -2886,7 +2886,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/settings/workspace-sharing \ -H 'Content-Type: application/json' \ @@ -2936,7 +2936,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/provisionerkeys/{provisionerkey} \ -H 'Accept: application/json' @@ -2979,7 +2979,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/replicas \ -H 'Accept: application/json' \ @@ -3033,7 +3033,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/settings/idpsync/available-fields \ -H 'Accept: application/json' \ @@ -3072,7 +3072,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/settings/idpsync/field-values?claimField=string \ -H 'Accept: application/json' \ @@ -3112,7 +3112,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/settings/idpsync/organization \ -H 'Accept: application/json' \ @@ -3152,7 +3152,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/settings/idpsync/organization \ -H 'Content-Type: application/json' \ @@ -3216,7 +3216,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/settings/idpsync/organization/config \ -H 'Content-Type: application/json' \ @@ -3272,7 +3272,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/settings/idpsync/organization/mapping \ -H 'Content-Type: application/json' \ @@ -3338,7 +3338,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templates/{template}/acl \ -H 'Accept: application/json' \ @@ -3433,7 +3433,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/templates/{template}/acl \ -H 'Content-Type: application/json' \ @@ -3494,7 +3494,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templates/{template}/acl/available \ -H 'Accept: application/json' \ @@ -3619,7 +3619,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/templates/{template}/prebuilds/invalidate \ -H 'Accept: application/json' \ @@ -3662,7 +3662,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/ai/budget \ -H 'Accept: application/json' \ @@ -3703,7 +3703,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/ai/budget \ -H 'Content-Type: application/json' \ @@ -3755,7 +3755,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/users/{user}/ai/budget \ -H 'Coder-Session-Token: API_KEY' @@ -3781,7 +3781,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/ai/spend \ -H 'Accept: application/json' \ @@ -3824,7 +3824,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/quiet-hours \ -H 'Accept: application/json' \ @@ -3882,7 +3882,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/quiet-hours \ -H 'Content-Type: application/json' \ @@ -3950,7 +3950,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspace-quota/{user} \ -H 'Accept: application/json' \ @@ -3988,7 +3988,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceproxies \ -H 'Accept: application/json' \ @@ -4083,7 +4083,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaceproxies \ -H 'Content-Type: application/json' \ @@ -4155,7 +4155,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaceproxies/{workspaceproxy} \ -H 'Accept: application/json' \ @@ -4216,7 +4216,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/workspaceproxies/{workspaceproxy} \ -H 'Accept: application/json' \ @@ -4260,7 +4260,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/workspaceproxies/{workspaceproxy} \ -H 'Content-Type: application/json' \ @@ -4335,7 +4335,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/external-agent/{agent}/credentials \ -H 'Accept: application/json' \ @@ -4374,7 +4374,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/oauth2/authorize?client_id=string&state=string&response_type=code \ -H 'Coder-Session-Token: API_KEY' @@ -4410,7 +4410,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/oauth2/authorize?client_id=string&state=string&response_type=code \ -H 'Coder-Session-Token: API_KEY' @@ -4446,7 +4446,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/oauth2/clients/{client_id} \ -H 'Accept: application/json' @@ -4507,7 +4507,7 @@ curl -X GET http://coder-server:8080/oauth2/clients/{client_id} \ ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/oauth2/clients/{client_id} \ -H 'Content-Type: application/json' \ @@ -4601,7 +4601,7 @@ curl -X PUT http://coder-server:8080/oauth2/clients/{client_id} \ ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/oauth2/clients/{client_id} @@ -4625,7 +4625,7 @@ curl -X DELETE http://coder-server:8080/oauth2/clients/{client_id} ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/oauth2/register \ -H 'Content-Type: application/json' \ @@ -4719,7 +4719,7 @@ curl -X POST http://coder-server:8080/oauth2/register \ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/oauth2/revoke \ @@ -4755,7 +4755,7 @@ token_type_hint: string ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/oauth2/tokens \ -H 'Accept: application/json' @@ -4815,7 +4815,7 @@ grant_type: authorization_code ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/oauth2/tokens?client_id=string \ -H 'Coder-Session-Token: API_KEY' @@ -4841,7 +4841,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/scim/v2/ServiceProviderConfig @@ -4859,7 +4859,7 @@ curl -X GET http://coder-server:8080/scim/v2/ServiceProviderConfig ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/scim/v2/Users \ -H 'Authorizaiton: API_KEY' @@ -4879,7 +4879,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/scim/v2/Users \ -H 'Content-Type: application/json' \ @@ -4971,7 +4971,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/scim/v2/Users/{id} \ -H 'Authorizaiton: API_KEY' @@ -4997,7 +4997,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/scim/v2/Users/{id} \ -H 'Content-Type: application/json' \ @@ -5089,7 +5089,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/scim/v2/Users/{id} \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/files.md b/docs/reference/api/files.md index 251f633f9b68f..cd8abd99e5c8a 100644 --- a/docs/reference/api/files.md +++ b/docs/reference/api/files.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/files \ -H 'Accept: application/json' \ @@ -52,7 +52,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/files/{fileID} \ -H 'Coder-Session-Token: API_KEY' diff --git a/docs/reference/api/general.md b/docs/reference/api/general.md index 32a968febe1bc..14b99f21e19db 100644 --- a/docs/reference/api/general.md +++ b/docs/reference/api/general.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/ \ -H 'Accept: application/json' @@ -39,7 +39,7 @@ curl -X GET http://coder-server:8080/api/v2/ \ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/buildinfo \ -H 'Accept: application/json' @@ -76,7 +76,7 @@ curl -X GET http://coder-server:8080/api/v2/buildinfo \ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/csp/reports \ -H 'Content-Type: application/json' \ @@ -111,7 +111,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/deployment/config \ -H 'Accept: application/json' \ @@ -698,7 +698,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/deployment/ssh \ -H 'Accept: application/json' \ @@ -734,7 +734,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/deployment/stats \ -H 'Accept: application/json' \ @@ -786,7 +786,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/experiments \ -H 'Accept: application/json' \ @@ -825,7 +825,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/experiments/available \ -H 'Accept: application/json' \ @@ -864,7 +864,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/updatecheck \ -H 'Accept: application/json' @@ -894,7 +894,7 @@ curl -X GET http://coder-server:8080/api/v2/updatecheck \ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/keys/tokens/tokenconfig \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/git.md b/docs/reference/api/git.md index fb13c8aa25d84..8c5c996e84414 100644 --- a/docs/reference/api/git.md +++ b/docs/reference/api/git.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/external-auth \ -H 'Accept: application/json' \ @@ -41,7 +41,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth} \ -H 'Accept: application/json' \ @@ -103,7 +103,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/external-auth/{externalauth} \ -H 'Accept: application/json' \ @@ -141,7 +141,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth}/device \ -H 'Accept: application/json' \ @@ -182,7 +182,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/external-auth/{externalauth}/device \ -H 'Coder-Session-Token: API_KEY' diff --git a/docs/reference/api/initscript.md b/docs/reference/api/initscript.md index 80e5056b5d4d9..a86cc5f81c8ba 100644 --- a/docs/reference/api/initscript.md +++ b/docs/reference/api/initscript.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/init-script/{os}/{arch} diff --git a/docs/reference/api/insights.md b/docs/reference/api/insights.md index c0e3556ba90cd..eb42bc040c21b 100644 --- a/docs/reference/api/insights.md +++ b/docs/reference/api/insights.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/insights/daus?tz_offset=0 \ -H 'Accept: application/json' \ @@ -47,7 +47,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/insights/templates?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z&interval=week \ -H 'Accept: application/json' \ @@ -149,7 +149,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/insights/user-activity?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z \ -H 'Accept: application/json' \ @@ -205,7 +205,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/insights/user-latency?start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z \ -H 'Accept: application/json' \ @@ -264,7 +264,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/insights/user-status-counts \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/members.md b/docs/reference/api/members.md index ec63ece4efd7a..6660b4a138d93 100644 --- a/docs/reference/api/members.md +++ b/docs/reference/api/members.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members \ -H 'Accept: application/json' \ @@ -106,7 +106,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members/roles \ -H 'Accept: application/json' \ @@ -204,7 +204,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/organizations/{organization}/members/roles \ -H 'Content-Type: application/json' \ @@ -337,7 +337,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/members/roles \ -H 'Content-Type: application/json' \ @@ -470,7 +470,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/members/roles/{roleName} \ -H 'Accept: application/json' \ @@ -565,7 +565,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members/{user} \ -H 'Accept: application/json' \ @@ -631,7 +631,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/members/{user} \ -H 'Accept: application/json' \ @@ -679,7 +679,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization}/members/{user} \ -H 'Coder-Session-Token: API_KEY' @@ -706,7 +706,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/organizations/{organization}/members/{user}/roles \ -H 'Content-Type: application/json' \ @@ -766,7 +766,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/paginated-members \ -H 'Accept: application/json' \ @@ -879,7 +879,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/roles \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/notifications.md b/docs/reference/api/notifications.md index 76f32e127bc5a..176f6d683e722 100644 --- a/docs/reference/api/notifications.md +++ b/docs/reference/api/notifications.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/notifications/custom \ -H 'Content-Type: application/json' \ @@ -63,7 +63,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/notifications/dispatch-methods \ -H 'Accept: application/json' \ @@ -109,7 +109,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/notifications/inbox \ -H 'Accept: application/json' \ @@ -170,7 +170,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/notifications/inbox/mark-all-as-read \ -H 'Coder-Session-Token: API_KEY' @@ -190,7 +190,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/notifications/inbox/watch \ -H 'Accept: application/json' \ @@ -255,7 +255,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/notifications/inbox/{id}/read-status \ -H 'Accept: application/json' \ @@ -299,7 +299,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/notifications/settings \ -H 'Accept: application/json' \ @@ -330,7 +330,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/notifications/settings \ -H 'Content-Type: application/json' \ @@ -377,7 +377,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/notifications/templates/custom \ -H 'Accept: application/json' \ @@ -436,7 +436,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/notifications/templates/system \ -H 'Accept: application/json' \ @@ -495,7 +495,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/notifications/test \ -H 'Coder-Session-Token: API_KEY' @@ -515,7 +515,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/notifications/preferences \ -H 'Accept: application/json' \ @@ -567,7 +567,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/notifications/preferences \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/organizations.md b/docs/reference/api/organizations.md index c0dcb2192608d..41cb7e994c88c 100644 --- a/docs/reference/api/organizations.md +++ b/docs/reference/api/organizations.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations \ -H 'Accept: application/json' \ @@ -64,7 +64,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/organizations \ -H 'Content-Type: application/json' \ @@ -123,7 +123,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization} \ -H 'Accept: application/json' \ @@ -170,7 +170,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/organizations/{organization} \ -H 'Accept: application/json' \ @@ -214,7 +214,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization} \ -H 'Content-Type: application/json' \ @@ -277,7 +277,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerjobs \ -H 'Accept: application/json' \ @@ -415,7 +415,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerjobs/{job} \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/portsharing.md b/docs/reference/api/portsharing.md index eb7f2efafd16d..08c8deb4c008c 100644 --- a/docs/reference/api/portsharing.md +++ b/docs/reference/api/portsharing.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \ -H 'Accept: application/json' \ @@ -49,7 +49,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \ -H 'Content-Type: application/json' \ @@ -103,7 +103,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/workspaces/{workspace}/port-share \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/prebuilds.md b/docs/reference/api/prebuilds.md index 362b7c3cada40..6f6a0850004df 100644 --- a/docs/reference/api/prebuilds.md +++ b/docs/reference/api/prebuilds.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/prebuilds/settings \ -H 'Accept: application/json' \ @@ -35,7 +35,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/prebuilds/settings \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/provisioning.md b/docs/reference/api/provisioning.md index 7a6a238b6098b..29af98a46bb0a 100644 --- a/docs/reference/api/provisioning.md +++ b/docs/reference/api/provisioning.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerdaemons \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/secrets.md b/docs/reference/api/secrets.md index cd1ee75e82476..9ead8d17eb557 100644 --- a/docs/reference/api/secrets.md +++ b/docs/reference/api/secrets.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/secrets \ -H 'Accept: application/json' \ @@ -64,7 +64,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/{user}/secrets \ -H 'Content-Type: application/json' \ @@ -121,7 +121,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/secrets/{name} \ -H 'Accept: application/json' \ @@ -165,7 +165,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/users/{user}/secrets/{name} \ -H 'Coder-Session-Token: API_KEY' @@ -192,7 +192,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/users/{user}/secrets/{name} \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/tasks.md b/docs/reference/api/tasks.md index 4efe1053cf455..f869133fe433f 100644 --- a/docs/reference/api/tasks.md +++ b/docs/reference/api/tasks.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/tasks \ -H 'Accept: application/json' \ @@ -87,7 +87,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/tasks/{user} \ -H 'Content-Type: application/json' \ @@ -179,7 +179,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/tasks/{user}/{task} \ -H 'Accept: application/json' \ @@ -258,7 +258,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/tasks/{user}/{task} \ -H 'Coder-Session-Token: API_KEY' @@ -285,7 +285,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/tasks/{user}/{task}/input \ -H 'Content-Type: application/json' \ @@ -322,7 +322,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/tasks/{user}/{task}/logs \ -H 'Accept: application/json' \ @@ -369,7 +369,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/tasks/{user}/{task}/pause \ -H 'Accept: application/json' \ @@ -615,7 +615,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/tasks/{user}/{task}/resume \ -H 'Accept: application/json' \ @@ -861,7 +861,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/tasks/{user}/{task}/send \ -H 'Content-Type: application/json' \ @@ -898,7 +898,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/tasks/{task}/log-snapshot?format=agentapi \ -H 'Content-Type: application/json' \ diff --git a/docs/reference/api/templatebuilder.md b/docs/reference/api/templatebuilder.md index 89583756fbb1b..9b23383636a31 100644 --- a/docs/reference/api/templatebuilder.md +++ b/docs/reference/api/templatebuilder.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templatebuilder/bases \ -H 'Accept: application/json' \ @@ -56,7 +56,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/templatebuilder/compose \ -H 'Content-Type: application/json' \ @@ -104,7 +104,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/templatebuilder/compose/template \ -H 'Content-Type: application/json' \ @@ -231,7 +231,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templatebuilder/modules \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/templates.md b/docs/reference/api/templates.md index e5c8b6e665f45..3b3443d23c52a 100644 --- a/docs/reference/api/templates.md +++ b/docs/reference/api/templates.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templates \ -H 'Accept: application/json' \ @@ -159,7 +159,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/templates \ -H 'Content-Type: application/json' \ @@ -288,7 +288,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templates/examples \ -H 'Accept: application/json' \ @@ -350,7 +350,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templates/{templatename} \ -H 'Accept: application/json' \ @@ -441,7 +441,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templates/{templatename}/versions/{templateversionname} \ -H 'Accept: application/json' \ @@ -544,7 +544,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templates/{templatename}/versions/{templateversionname}/previous \ -H 'Accept: application/json' \ @@ -648,7 +648,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/templateversions \ -H 'Content-Type: application/json' \ @@ -775,7 +775,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templates \ -H 'Accept: application/json' \ @@ -924,7 +924,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templates/examples \ -H 'Accept: application/json' \ @@ -980,7 +980,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templates/{template} \ -H 'Accept: application/json' \ @@ -1070,7 +1070,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/templates/{template} \ -H 'Accept: application/json' \ @@ -1114,7 +1114,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/templates/{template} \ -H 'Content-Type: application/json' \ @@ -1246,7 +1246,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templates/{template}/daus \ -H 'Accept: application/json' \ @@ -1289,7 +1289,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templates/{template}/versions \ -H 'Accept: application/json' \ @@ -1467,7 +1467,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/templates/{template}/versions \ -H 'Content-Type: application/json' \ @@ -1521,7 +1521,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/templates/{template}/versions/archive \ -H 'Content-Type: application/json' \ @@ -1575,7 +1575,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templates/{template}/versions/{templateversionname} \ -H 'Accept: application/json' \ @@ -1750,7 +1750,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion} \ -H 'Accept: application/json' \ @@ -1851,7 +1851,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/templateversions/{templateversion} \ -H 'Content-Type: application/json' \ @@ -1963,7 +1963,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/templateversions/{templateversion}/archive \ -H 'Accept: application/json' \ @@ -2007,7 +2007,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/templateversions/{templateversion}/cancel \ -H 'Accept: application/json' \ @@ -2051,7 +2051,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/templateversions/{templateversion}/dry-run \ -H 'Content-Type: application/json' \ @@ -2148,7 +2148,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/dry-run/{jobID} \ -H 'Accept: application/json' \ @@ -2224,7 +2224,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/templateversions/{templateversion}/dry-run/{jobID}/cancel \ -H 'Accept: application/json' \ @@ -2269,7 +2269,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/dry-run/{jobID}/logs \ -H 'Accept: application/json' \ @@ -2345,7 +2345,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/dry-run/{jobID}/matched-provisioners \ -H 'Accept: application/json' \ @@ -2385,7 +2385,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/dry-run/{jobID}/resources \ -H 'Accept: application/json' \ @@ -2682,7 +2682,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/dynamic-parameters \ -H 'Coder-Session-Token: API_KEY' @@ -2708,7 +2708,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/templateversions/{templateversion}/dynamic-parameters/evaluate \ -H 'Content-Type: application/json' \ @@ -2828,7 +2828,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/external-auth \ -H 'Accept: application/json' \ @@ -2888,7 +2888,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/logs \ -H 'Accept: application/json' \ @@ -2963,7 +2963,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/parameters \ -H 'Coder-Session-Token: API_KEY' @@ -2989,7 +2989,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/presets \ -H 'Accept: application/json' \ @@ -3056,7 +3056,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/resources \ -H 'Accept: application/json' \ @@ -3352,7 +3352,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/rich-parameters \ -H 'Accept: application/json' \ @@ -3451,7 +3451,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/schema \ -H 'Coder-Session-Token: API_KEY' @@ -3477,7 +3477,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/templateversions/{templateversion}/unarchive \ -H 'Accept: application/json' \ @@ -3521,7 +3521,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/variables \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/users.md b/docs/reference/api/users.md index edef0ca09934e..788c51f196c22 100644 --- a/docs/reference/api/users.md +++ b/docs/reference/api/users.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users \ -H 'Accept: application/json' \ @@ -71,7 +71,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users \ -H 'Content-Type: application/json' \ @@ -151,7 +151,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/authmethods \ -H 'Accept: application/json' \ @@ -194,7 +194,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/first \ -H 'Accept: application/json' \ @@ -232,7 +232,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/first \ -H 'Content-Type: application/json' \ @@ -296,7 +296,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/logout \ -H 'Accept: application/json' \ @@ -334,7 +334,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/oauth2/github/callback \ -H 'Coder-Session-Token: API_KEY' @@ -354,7 +354,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/oauth2/github/device \ -H 'Accept: application/json' \ @@ -389,7 +389,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/oidc-claims \ -H 'Accept: application/json' \ @@ -420,7 +420,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/oidc/callback \ -H 'Coder-Session-Token: API_KEY' @@ -440,7 +440,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user} \ -H 'Accept: application/json' \ @@ -499,7 +499,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/users/{user} \ -H 'Coder-Session-Token: API_KEY' @@ -525,7 +525,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/appearance \ -H 'Accept: application/json' \ @@ -566,7 +566,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/appearance \ -H 'Content-Type: application/json' \ @@ -621,7 +621,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/autofill-parameters?template_id=string \ -H 'Accept: application/json' \ @@ -672,7 +672,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/gitsshkey \ -H 'Accept: application/json' \ @@ -712,7 +712,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/gitsshkey \ -H 'Accept: application/json' \ @@ -752,7 +752,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/{user}/keys \ -H 'Accept: application/json' \ @@ -789,7 +789,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/keys/tokens \ -H 'Accept: application/json' \ @@ -877,7 +877,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/{user}/keys/tokens \ -H 'Content-Type: application/json' \ @@ -935,7 +935,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/keys/tokens/{keyname} \ -H 'Accept: application/json' \ @@ -991,7 +991,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/keys/{keyid} \ -H 'Accept: application/json' \ @@ -1047,7 +1047,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/users/{user}/keys/{keyid} \ -H 'Coder-Session-Token: API_KEY' @@ -1074,7 +1074,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/keys/{keyid}/expire \ -H 'Accept: */*' \ @@ -1108,7 +1108,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/login-type \ -H 'Accept: application/json' \ @@ -1145,7 +1145,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/organizations \ -H 'Accept: application/json' \ @@ -1211,7 +1211,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/organizations/{organizationname} \ -H 'Accept: application/json' \ @@ -1259,7 +1259,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/password \ -H 'Content-Type: application/json' \ @@ -1296,7 +1296,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/preferences \ -H 'Accept: application/json' \ @@ -1337,7 +1337,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/preferences \ -H 'Content-Type: application/json' \ @@ -1392,7 +1392,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/profile \ -H 'Content-Type: application/json' \ @@ -1463,7 +1463,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/roles \ -H 'Accept: application/json' \ @@ -1522,7 +1522,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/roles \ -H 'Content-Type: application/json' \ @@ -1593,7 +1593,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/status/activate \ -H 'Accept: application/json' \ @@ -1652,7 +1652,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/users/{user}/status/suspend \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/workspaceproxies.md b/docs/reference/api/workspaceproxies.md index 97ba371b0dd23..85dc146149005 100644 --- a/docs/reference/api/workspaceproxies.md +++ b/docs/reference/api/workspaceproxies.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/regions \ -H 'Accept: application/json' \ diff --git a/docs/reference/api/workspaces.md b/docs/reference/api/workspaces.md index 2d00a98d83194..92ea4d72fe3b4 100644 --- a/docs/reference/api/workspaces.md +++ b/docs/reference/api/workspaces.md @@ -4,7 +4,7 @@ ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/members/{user}/workspaces \ -H 'Content-Type: application/json' \ @@ -338,7 +338,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/members/{user}/workspaces/available-users \ -H 'Accept: application/json' \ @@ -396,7 +396,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacename} \ -H 'Accept: application/json' \ @@ -704,7 +704,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/users/{user}/workspaces \ -H 'Content-Type: application/json' \ @@ -1037,7 +1037,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces \ -H 'Accept: application/json' \ @@ -1333,7 +1333,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \ -H 'Accept: application/json' \ @@ -1640,7 +1640,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/workspaces/{workspace} \ -H 'Content-Type: application/json' \ @@ -1676,7 +1676,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/acl \ -H 'Accept: application/json' \ @@ -1752,7 +1752,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/workspaces/{workspace}/acl \ -H 'Coder-Session-Token: API_KEY' @@ -1778,7 +1778,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PATCH http://coder-server:8080/api/v2/workspaces/{workspace}/acl \ -H 'Content-Type: application/json' \ @@ -1821,7 +1821,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/agent-connection-watch \ -H 'Accept: application/json' \ @@ -1871,7 +1871,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/autostart \ -H 'Content-Type: application/json' \ @@ -1907,7 +1907,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/autoupdates \ -H 'Content-Type: application/json' \ @@ -1943,7 +1943,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \ -H 'Content-Type: application/json' \ @@ -2259,7 +2259,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/extend \ -H 'Content-Type: application/json' \ @@ -2313,7 +2313,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/favorite \ -H 'Coder-Session-Token: API_KEY' @@ -2339,7 +2339,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X DELETE http://coder-server:8080/api/v2/workspaces/{workspace}/favorite \ -H 'Coder-Session-Token: API_KEY' @@ -2365,7 +2365,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/resolve-autostart \ -H 'Accept: application/json' \ @@ -2402,7 +2402,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/timings \ -H 'Accept: application/json' \ @@ -2470,7 +2470,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/ttl \ -H 'Content-Type: application/json' \ @@ -2506,7 +2506,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/usage \ -H 'Content-Type: application/json' \ @@ -2543,7 +2543,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/watch \ -H 'Accept: text/event-stream' \ @@ -2574,7 +2574,7 @@ To perform this operation, you must be authenticated. [Learn more](authenticatio ### Code samples -```shell +```sh # Example request using curl curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/watch-ws \ -H 'Accept: application/json' \ diff --git a/docs/reference/index.md b/docs/reference/index.md index 4de97ef4a3099..4e7c5d9134ff1 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -15,13 +15,13 @@ are several ways to extend/automate Coder: Generate a token on your Coder deployment by visiting: -```shell +```sh https://coder.example.com/settings/tokens ``` List your workspaces -```shell +```sh # CLI coder ls \ --url https://coder.example.com \ @@ -68,7 +68,7 @@ activity. this to show Kubernetes events, such as image pulls or ResourceQuota restrictions. - ```shell + ```sh curl -X PATCH https://coder.example.com/api/v2/workspaceagents/me/logs \ -H "Coder-Session-Token: $CODER_AGENT_TOKEN" \ -d "{ @@ -86,7 +86,7 @@ activity. Keep a workspace "active," even if there is not an open connection (e.g. for a long-running machine learning job). - ```shell + ```sh #!/bin/bash # Send workspace activity as long as the job is still running diff --git a/docs/start/local-deploy.md b/docs/start/local-deploy.md index c478fe3ce1ec0..f5d4f391028c5 100644 --- a/docs/start/local-deploy.md +++ b/docs/start/local-deploy.md @@ -47,7 +47,7 @@ winget install Coder.Coder To start or restart the Coder deployment, use the following command: -```shell +```sh coder server ``` diff --git a/docs/tutorials/best-practices/security-best-practices.md b/docs/tutorials/best-practices/security-best-practices.md index 61c48875e0f6d..55edf1ddb2140 100644 --- a/docs/tutorials/best-practices/security-best-practices.md +++ b/docs/tutorials/best-practices/security-best-practices.md @@ -78,7 +78,7 @@ A malicious workspace could reuse Coder cookies to call the API or interact with 1. Disable path-based apps: - ```shell + ```sh coderd server --disable-path-apps # or export CODER_DISABLE_PATH_APPS=true diff --git a/docs/tutorials/best-practices/speed-up-templates.md b/docs/tutorials/best-practices/speed-up-templates.md index fe28d9ea4bbe7..bb9d736d94506 100644 --- a/docs/tutorials/best-practices/speed-up-templates.md +++ b/docs/tutorials/best-practices/speed-up-templates.md @@ -23,7 +23,7 @@ potentially optimize within the template. You can also retrieve this detail programmatically from the API: -```shell +```sh curl -X GET https://coder.example.com/api/v2/workspacebuilds/{workspacebuild}/timings \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY' @@ -137,19 +137,19 @@ To use `terraform init` to build the static provider version list: 1. Pull your template to your local device: - ```shell + ```sh coder templates pull <template> ``` 1. Run `terraform init` inside the template directory to build the lock file: - ```shell + ```sh terraform init ``` 1. Push the templates back to your Coder deployment: - ```shell + ```sh coder templates push <template> ``` diff --git a/docs/tutorials/configuring-okta.md b/docs/tutorials/configuring-okta.md index 01cfacfb34c80..112eec8bb5960 100644 --- a/docs/tutorials/configuring-okta.md +++ b/docs/tutorials/configuring-okta.md @@ -46,7 +46,7 @@ Configure Coder to use these claims for group sync. These claims are present in the `id_token`. For more group sync configuration options, consult the [IDP sync documentation](../admin/users/idp-sync.md#group-sync). -```bash +```sh # Add the 'groups' scope and include the 'offline_access' scope for refresh tokens CODER_OIDC_SCOPES=openid,profile,email,offline_access,groups # This name needs to match the "Claim name" in the configuration above. @@ -59,7 +59,7 @@ CODER_OIDC_GROUP_FIELD=groups These groups can also be used to configure role syncing based on group membership: -```bash +```sh CODER_OIDC_SCOPES=openid,profile,email,offline_access,groups # This name needs to match the "Claim name" in the configuration above. CODER_OIDC_USER_ROLE_FIELD=groups @@ -91,7 +91,7 @@ attribute you have configured to the application: Configure using these new attributes in Coder: -```bash +```sh # This must be set to false. Coder uses this endpoint to grab the attributes. CODER_OIDC_IGNORE_USERINFO=false # Include offline_access for refresh tokens @@ -142,7 +142,7 @@ This is so if other applications exist, we do not send them information they do Now we have a custom scope and claim configured under an authorization server. Configure Coder to use this: -```bash +```sh # Grab this value from the Authorization Server > Settings > Issuer # DO NOT USE the application issuer URL. Make sure to use the newly configured # authorization server. diff --git a/docs/tutorials/external-database.md b/docs/tutorials/external-database.md index 07a0580f98daa..dda44b90829c5 100644 --- a/docs/tutorials/external-database.md +++ b/docs/tutorials/external-database.md @@ -26,7 +26,7 @@ Coder configuration is defined via [environment variables](../admin/setup/index.md). The database client requires the connection string provided via the `CODER_PG_CONNECTION_URL` variable. -```shell +```sh export CODER_PG_CONNECTION_URL="postgres://coder:secret42@localhost/coder?sslmode=disable" ``` @@ -55,7 +55,7 @@ List of schemas In this case the database client requires the modified connection string: -```shell +```sh export CODER_PG_CONNECTION_URL="postgres://coder:secret42@localhost/coder?sslmode=disable&search_path=myschema" ``` @@ -87,6 +87,6 @@ Please make sure that the schema selected in the connection string `...&search_path=myschema` exists and the role has granted permissions to access it. The schema should be present on this listing: -```shell +```sh psql -U coder -c '\dn' ``` diff --git a/docs/tutorials/faqs.md b/docs/tutorials/faqs.md index 848cc6c386842..0bbbd629fe31e 100644 --- a/docs/tutorials/faqs.md +++ b/docs/tutorials/faqs.md @@ -42,7 +42,7 @@ Visit <https://coder.com/trial> or contact 1. Open a terminal. 1. Log in to your Coder deployment: - ```shell + ```sh coder login <access url> ``` @@ -50,7 +50,7 @@ Visit <https://coder.com/trial> or contact - For a `.jwt` license file: - ```shell + ```sh coder licenses add -f <path to your license key> ``` diff --git a/docs/tutorials/persistent-shared-workspaces.md b/docs/tutorials/persistent-shared-workspaces.md index 39d0f40db2647..cbd28587bf708 100644 --- a/docs/tutorials/persistent-shared-workspaces.md +++ b/docs/tutorials/persistent-shared-workspaces.md @@ -54,7 +54,7 @@ Because no individual user owns the workspace, there are no personal credentials to expose and the shared environment is not affected when any user leaves the team or the organization. -```shell +```sh # On-call example — substitute a name that fits your use case coder users create \ --username oncall-sre \ @@ -66,7 +66,7 @@ coder users create \ Generate a long-lived API token so you can create and manage workspaces on behalf of the service account: -```shell +```sh coder tokens create \ --user oncall-sre \ --name oncall-automation \ @@ -85,7 +85,7 @@ Manager). Authenticate as the service account and create the workspace: -```shell +```sh export CODER_SESSION_TOKEN="<token-from-step-2>" coder create oncall-sre/oncall-workspace \ @@ -105,7 +105,7 @@ coder create oncall-sre/oncall-workspace \ Use `coder sharing share` to grant access to users who need the workspace: -```shell +```sh coder sharing share oncall-sre/oncall-workspace --user alice ``` @@ -115,19 +115,19 @@ workspace apps, starting and stopping the workspace, and viewing logs and stats. To grant `admin` permissions (which includes all `use` permissions as well as renaming, updating, and inviting others to join with the `use` role): -```shell +```sh coder sharing share oncall-sre/oncall-workspace --user alice:admin ``` To share with multiple users at once: -```shell +```sh coder sharing share oncall-sre/oncall-workspace --user alice:admin,bob ``` To share with an entire Coder group: -```shell +```sh coder sharing share oncall-sre/oncall-workspace --group sre-oncall ``` @@ -140,7 +140,7 @@ coder sharing share oncall-sre/oncall-workspace --group sre-oncall When team membership changes, remove outgoing users and add incoming ones: -```shell +```sh # Remove outgoing user coder sharing remove oncall-sre/oncall-workspace --user alice @@ -153,7 +153,7 @@ coder sharing share oncall-sre/oncall-workspace --user carol Verify current sharing status at any time: -```shell +```sh coder sharing status oncall-sre/oncall-workspace ``` @@ -165,7 +165,7 @@ cron job. ### Rotation script -```shell +```sh #!/bin/bash # rotate-access.sh # Usage: ./rotate-access.sh <outgoing-user> <incoming-user> @@ -199,7 +199,7 @@ in Okta or Azure AD), you can skip manual share/remove commands entirely: 1. Share the workspace with the group once: - ```shell + ```sh coder sharing share oncall-sre/oncall-workspace --group sre-oncall ``` @@ -211,7 +211,7 @@ in Okta or Azure AD), you can skip manual share/remove commands entirely: Shared users can find workspaces shared with them: -```shell +```sh # List all shared workspaces you can access, including your own coder list --search shared:true diff --git a/docs/tutorials/postgres-ssl.md b/docs/tutorials/postgres-ssl.md index 5cb8ec620e04b..027982b7618c4 100644 --- a/docs/tutorials/postgres-ssl.md +++ b/docs/tutorials/postgres-ssl.md @@ -18,7 +18,7 @@ follow the steps below: 1. Create the certificate as a secret in your Kubernetes cluster, if not already present: -```shell +```sh kubectl create secret tls postgres-certs -n coder --key="postgres.key" --cert="postgres.crt" ``` @@ -38,7 +38,7 @@ coder: 1. Lastly, your PG connection URL will look like: -```shell +```sh postgres://<user>:<password>@databasehost:<port>/<db-name>?sslmode=require&sslcert="$HOME/.postgresql/postgres.crt&sslkey=$HOME/.postgresql/postgres.key" ``` @@ -47,7 +47,7 @@ postgres://<user>:<password>@databasehost:<port>/<db-name>?sslmode=require&sslce 1. Download the CA certificate chain for your database instance, and create it as a secret in your Kubernetes cluster, if not already present: -```shell +```sh kubectl create secret tls postgres-certs -n coder --key="postgres-root.key" --cert="postgres-root.crt" ``` @@ -67,7 +67,7 @@ coder: 1. Lastly, your PG connection URL will look like: -```shell +```sh postgres://<user>:<password>@databasehost:<port>/<db-name>?sslmode=verify-full&sslrootcert="/home/coder/.postgresql/postgres-root.crt" ``` diff --git a/docs/tutorials/reverse-proxy-apache.md b/docs/tutorials/reverse-proxy-apache.md index ba3b7c37b28ae..027d289892b40 100644 --- a/docs/tutorials/reverse-proxy-apache.md +++ b/docs/tutorials/reverse-proxy-apache.md @@ -24,13 +24,13 @@ 3. Install Apache (assuming you're on Debian/Ubuntu): - ```shell + ```sh sudo apt install apache2 ``` 4. Enable the following Apache modules: - ```shell + ```sh sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod ssl @@ -39,7 +39,7 @@ 5. Stop Apache service and disable default site: - ```shell + ```sh sudo a2dissite 000-default.conf sudo systemctl stop apache2 ``` @@ -70,7 +70,7 @@ providers, refer to the dns_cloudflare_api_token = YOUR_API_TOKEN ``` - ```shell + ```sh mkdir -p ~/.secrets/certbot touch ~/.secrets/certbot/cloudflare.ini nano ~/.secrets/certbot/cloudflare.ini @@ -78,7 +78,7 @@ providers, refer to the 3. Set the correct permissions: - ```shell + ```sh sudo chmod 600 ~/.secrets/certbot/cloudflare.ini ``` @@ -86,7 +86,7 @@ providers, refer to the 1. Create the wildcard certificate: - ```shell + ```sh sudo certbot certonly --dns-cloudflare --dns-cloudflare-credentials ~/.secrets/certbot/cloudflare.ini -d coder.example.com -d *.coder.example.com ``` @@ -97,7 +97,7 @@ you're using `coder.example.com` as your subdomain. 1. Create Apache configuration for Coder: - ```shell + ```sh sudo nano /etc/apache2/sites-available/coder.conf ``` @@ -137,13 +137,13 @@ you're using `coder.example.com` as your subdomain. 3. Enable the site: - ```shell + ```sh sudo a2ensite coder.conf ``` 4. Restart Apache: - ```shell + ```sh sudo systemctl restart apache2 ``` @@ -151,19 +151,19 @@ you're using `coder.example.com` as your subdomain. 1. Create a new file in `/etc/cron.weekly`: - ```shell + ```sh sudo touch /etc/cron.weekly/certbot ``` 2. Make it executable: - ```shell + ```sh sudo chmod +x /etc/cron.weekly/certbot ``` 3. And add this code: - ```shell + ```sh #!/bin/sh sudo certbot renew -q ``` diff --git a/docs/tutorials/reverse-proxy-caddy.md b/docs/tutorials/reverse-proxy-caddy.md index 741f3842f10fb..1b83fd9fd0f79 100644 --- a/docs/tutorials/reverse-proxy-caddy.md +++ b/docs/tutorials/reverse-proxy-caddy.md @@ -108,7 +108,7 @@ certificates, you'll need a domain name that resolves to your Caddy server. 4. Start Coder. Set `CODER_ACCESS_URL` and `CODER_WILDCARD_ACCESS_URL` to the domain you're using in your Caddyfile. - ```shell + ```sh export CODER_ACCESS_URL=https://coder.example.com export CODER_WILDCARD_ACCESS_URL=*.coder.example.com docker compose up -d # Run on startup @@ -158,20 +158,20 @@ certificates, you'll need a domain name that resolves to your Caddy server. If you're [keeping Caddy running](https://caddyserver.com/docs/running) via a system service: - ```shell + ```sh sudo systemctl restart caddy ``` Or run a standalone server: - ```shell + ```sh caddy run ``` 6. Optionally, use [ufw](https://wiki.ubuntu.com/UncomplicatedFirewall) or another firewall to disable external traffic outside of Caddy. - ```shell + ```sh # Check status of UncomplicatedFirewall sudo ufw status diff --git a/docs/tutorials/reverse-proxy-nginx.md b/docs/tutorials/reverse-proxy-nginx.md index b2435bf46f086..c6053a8de9a42 100644 --- a/docs/tutorials/reverse-proxy-nginx.md +++ b/docs/tutorials/reverse-proxy-nginx.md @@ -24,13 +24,13 @@ 3. Install NGINX (assuming you're on Debian/Ubuntu): - ```shell + ```sh sudo apt install nginx ``` 4. Stop NGINX service: - ```shell + ```sh sudo systemctl stop nginx ``` @@ -41,13 +41,13 @@ you're using `coder.example.com` as your subdomain. 1. Create NGINX configuration for this app: - ```shell + ```sh sudo touch /etc/nginx/sites-available/coder.example.com ``` 2. Activate this file: - ```shell + ```sh sudo ln -s /etc/nginx/sites-available/coder.example.com /etc/nginx/sites-enabled/coder.example.com ``` @@ -77,7 +77,7 @@ providers, refer to the dns_cloudflare_api_token = YOUR_API_TOKEN ``` - ```shell + ```sh mkdir -p ~/.secrets/certbot touch ~/.secrets/certbot/cloudflare.ini nano ~/.secrets/certbot/cloudflare.ini @@ -85,7 +85,7 @@ providers, refer to the 3. Set the correct permissions: - ```shell + ```sh sudo chmod 600 ~/.secrets/certbot/cloudflare.ini ``` @@ -93,7 +93,7 @@ providers, refer to the 1. Create the wildcard certificate: - ```shell + ```sh sudo certbot certonly --dns-cloudflare --dns-cloudflare-credentials ~/.secrets/certbot/cloudflare.ini -d coder.example.com -d *.coder.example.com ``` @@ -101,7 +101,7 @@ providers, refer to the 1. Edit the file with: - ```shell + ```sh sudo nano /etc/nginx/sites-available/coder.example.com ``` @@ -144,7 +144,7 @@ providers, refer to the 3. Test the configuration: - ```shell + ```sh sudo nginx -t ``` @@ -152,26 +152,26 @@ providers, refer to the 1. Create a new file in `/etc/cron.weekly`: - ```shell + ```sh sudo touch /etc/cron.weekly/certbot ``` 2. Make it executable: - ```shell + ```sh sudo chmod +x /etc/cron.weekly/certbot ``` 3. And add this code: - ```shell + ```sh #!/bin/sh sudo certbot renew -q ``` ## Restart NGINX -```shell +```sh sudo systemctl restart nginx ``` diff --git a/docs/tutorials/template-from-scratch.md b/docs/tutorials/template-from-scratch.md index 2d85c95f84e9f..85f64f8f5926e 100644 --- a/docs/tutorials/template-from-scratch.md +++ b/docs/tutorials/template-from-scratch.md @@ -414,7 +414,7 @@ through the CLI, or through the Coder dashboard: - To zip the files through the command line: - ```shell + ```sh zip templates.zip Dockerfile main.tf ``` diff --git a/docs/tutorials/testing-templates.md b/docs/tutorials/testing-templates.md index 3e0de88bc92a4..00e5b29e94e37 100644 --- a/docs/tutorials/testing-templates.md +++ b/docs/tutorials/testing-templates.md @@ -35,7 +35,7 @@ ensures your templates are validated, tested, and promoted seamlessly. For Premium deployments, create a service account: -```shell +```sh coder users create \ --username machine-user \ --service-account @@ -46,7 +46,7 @@ coder tokens create --user machine-user --lifetime 8760h For OSS deployments, create a regular user: -```shell +```sh coder users create \ --username machine-user \ --email machine-user@example.com \ diff --git a/docs/user-guides/desktop/desktop-connect-sync.md b/docs/user-guides/desktop/desktop-connect-sync.md index 5ea445c672d9e..00eccf89a9eca 100644 --- a/docs/user-guides/desktop/desktop-connect-sync.md +++ b/docs/user-guides/desktop/desktop-connect-sync.md @@ -15,7 +15,7 @@ To copy the `.coder` hostname of a workspace agent, select the copy icon beside You can also connect to the SSH server in your workspace using any SSH client, such as OpenSSH or PuTTY: - ```shell + ```sh ssh your-workspace.coder ``` @@ -38,7 +38,7 @@ For other port forwarding methods (CLI, dashboard, SSH), see [Workspace Ports](. Use `ping6` in your terminal to verify the connection to your workspace: - ```shell + ```sh ping6 -c 5 your-workspace.coder ``` @@ -46,7 +46,7 @@ Use `ping6` in your terminal to verify the connection to your workspace: Use `ping` in a Command Prompt or PowerShell terminal to verify the connection to your workspace: - ```shell + ```sh ping -n 5 your-workspace.coder ``` diff --git a/docs/user-guides/desktop/index.md b/docs/user-guides/desktop/index.md index 5bafbd4509464..7f4616918e89f 100644 --- a/docs/user-guides/desktop/index.md +++ b/docs/user-guides/desktop/index.md @@ -41,7 +41,7 @@ The VPN extension routes only Coder traffic—your other internet activity remai #### Homebrew (Recommended) -```shell +```sh brew install --cask coder/coder/coder-desktop ``` @@ -67,7 +67,7 @@ Coder Desktop requires VPN extension permissions: #### WinGet (Recommended) -```shell +```sh winget install Coder.CoderDesktop ``` @@ -96,13 +96,13 @@ Once connected, test access to your workspaces: ### SSH Connection -```shell +```sh ssh your-workspace.coder ``` ### Ping Test -```shell +```sh # macOS ping6 -c 3 your-workspace.coder @@ -130,7 +130,7 @@ Administrators can disable the built-in auto-updater to manage updates through t Set the `disableUpdater` preference to `true` using the `defaults` command: -```shell +```sh defaults write com.coder.Coder-Desktop disableUpdater -bool true ``` @@ -181,7 +181,7 @@ Coder Desktop and its network extension write to the Apple [unified logging syst 1. Export the unified logs for the last hour with the `log` command: - ```shell + ```sh log show --predicate 'subsystem == "com.coder.Coder-Desktop"' \ --info --debug --last 1h > ~/Desktop/coder-desktop.log ``` @@ -190,7 +190,7 @@ Coder Desktop and its network extension write to the Apple [unified logging syst 2. If you're using file sync, also collect the Mutagen daemon log: - ```shell + ```sh ~/Library/Application\ Support/Coder\ Desktop/Mutagen/daemon.log ``` diff --git a/docs/user-guides/workspace-access/emacs-tramp.md b/docs/user-guides/workspace-access/emacs-tramp.md index 7906508bd9ee1..79b9e59de815f 100644 --- a/docs/user-guides/workspace-access/emacs-tramp.md +++ b/docs/user-guides/workspace-access/emacs-tramp.md @@ -7,7 +7,7 @@ editing operations on a remote server. To connect to your workspace first run: -```shell +```sh coder config-ssh ``` @@ -61,7 +61,7 @@ To fix this: 2. Next in the shell profile file on the workspace (ex., `~/.bashrc` for Bash and `~/.zshrc` for Zsh) add the following: - ```bash + ```sh ansi_term_announce_host() { printf '\033AnSiTh %s\n' "coder.$CODER_WORKSPACE_NAME" } diff --git a/docs/user-guides/workspace-access/index.md b/docs/user-guides/workspace-access/index.md index 25f753d2f9293..722094ce2f684 100644 --- a/docs/user-guides/workspace-access/index.md +++ b/docs/user-guides/workspace-access/index.md @@ -95,20 +95,20 @@ each user to simplify the setup process. 1. Use your terminal to authenticate the CLI with Coder web UI and your workspaces: - ```bash + ```sh coder login <accessURL> ``` 1. Access Coder via SSH: - ```shell + ```sh coder config-ssh ``` 1. Run `coder config-ssh --dry-run` if you'd like to see the changes that will be before you proceed: - ```shell + ```sh coder config-ssh --dry-run ``` diff --git a/docs/user-guides/workspace-access/jetbrains/fleet.md b/docs/user-guides/workspace-access/jetbrains/fleet.md index c995cdd235375..bba9bf762d679 100644 --- a/docs/user-guides/workspace-access/jetbrains/fleet.md +++ b/docs/user-guides/workspace-access/jetbrains/fleet.md @@ -11,13 +11,13 @@ To connect Fleet to a Coder workspace: 1. Install Coder CLI - ```shell + ```sh curl -L https://coder.com/install.sh | sh ``` 1. Login and configure Coder SSH. - ```shell + ```sh coder login coder.example.com coder config-ssh ``` diff --git a/docs/user-guides/workspace-access/jetbrains/gateway.md b/docs/user-guides/workspace-access/jetbrains/gateway.md index 7dbfc37375455..918f6f54df9ab 100644 --- a/docs/user-guides/workspace-access/jetbrains/gateway.md +++ b/docs/user-guides/workspace-access/jetbrains/gateway.md @@ -95,7 +95,7 @@ trust store present on your local machine as well as to the Coder plugin setting Use the `keytool` utility that ships with Java: - ```shell + ```sh keytool -import -alias coder -file <certificate> -keystore /path/to/trust/store ``` @@ -108,7 +108,7 @@ trust store present on your local machine as well as to the Coder plugin setting Use the `keytool` included in the JetBrains Gateway installation: - ```shell + ```sh keytool -import -alias coder -file cacert.pem -keystore /Applications/JetBrains\ Gateway.app/Contents/jbr/Contents/Home/lib/security/cacerts ``` diff --git a/docs/user-guides/workspace-access/jetbrains/toolbox.md b/docs/user-guides/workspace-access/jetbrains/toolbox.md index 6b857777dbd39..49d67335fd92c 100644 --- a/docs/user-guides/workspace-access/jetbrains/toolbox.md +++ b/docs/user-guides/workspace-access/jetbrains/toolbox.md @@ -27,7 +27,7 @@ For more details, visit the [official JetBrains documentation](https://www.jetbr For direct connections or creating bookmarks, use custom URI links with parameters: -```shell +```sh jetbrains://gateway/com.coder.toolbox?url=https://coder.example.com&token=<auth-token>&workspace=my-workspace ``` diff --git a/docs/user-guides/workspace-access/remote-desktops.md b/docs/user-guides/workspace-access/remote-desktops.md index b1e22896b2201..e3c8bfa77cff5 100644 --- a/docs/user-guides/workspace-access/remote-desktops.md +++ b/docs/user-guides/workspace-access/remote-desktops.md @@ -149,7 +149,7 @@ Use a VNC client (e.g., [TigerVNC](https://tigervnc.org/)) by forwarding the VNC Use the following command to forward the VNC port to your local machine: -```bash +```sh coder port-forward <workspace-name> --tcp 5900:5900 ``` diff --git a/docs/user-guides/workspace-access/vscode.md b/docs/user-guides/workspace-access/vscode.md index 739d7c9351d6e..cb26628321339 100644 --- a/docs/user-guides/workspace-access/vscode.md +++ b/docs/user-guides/workspace-access/vscode.md @@ -137,7 +137,7 @@ Web or using the workspace's terminal. 1. Add the `vsix` extension files to the same folder as your Dockerfile. - ```shell + ```sh ~/images/base ➜ ls -l -rw-r--r-- 1 coder coder 0 Aug 1 19:23 Dockerfile diff --git a/docs/user-guides/workspace-access/web-terminal.md b/docs/user-guides/workspace-access/web-terminal.md index 54fd93a4cce18..32d75647a62b3 100644 --- a/docs/user-guides/workspace-access/web-terminal.md +++ b/docs/user-guides/workspace-access/web-terminal.md @@ -104,7 +104,7 @@ webTerminalRenderer: "canvas" # Options: canvas, webgl, dom Or via environment variable: -```bash +```sh CODER_WEB_TERMINAL_RENDERER=canvas ``` @@ -215,7 +215,7 @@ End-users can customize: The terminal respects your shell's configuration files: -```bash +```sh # ~/.bashrc or ~/.zshrc export PS1="\u@\h:\w\$ " # Custom prompt alias ll="ls -lah" # Custom aliases diff --git a/docs/user-guides/workspace-access/zed.md b/docs/user-guides/workspace-access/zed.md index 4a30355bc29cc..635915d9a4e5f 100644 --- a/docs/user-guides/workspace-access/zed.md +++ b/docs/user-guides/workspace-access/zed.md @@ -46,19 +46,19 @@ Use the Coder CLI to log in and configure SSH, then connect to your workspace wi 1. Log in to your Coder deployment and authenticate when prompted: - ```shell + ```sh coder login coder.example.com ``` 1. Configure Coder SSH: - ```shell + ```sh coder config-ssh ``` 1. Connect to the workspace via SSH: - ```shell + ```sh zed ssh://coder.workspace-name ``` diff --git a/docs/user-guides/workspace-dotfiles.md b/docs/user-guides/workspace-dotfiles.md index 98e11fd6bc80a..b23ce3188140f 100644 --- a/docs/user-guides/workspace-dotfiles.md +++ b/docs/user-guides/workspace-dotfiles.md @@ -31,7 +31,7 @@ startup which users can populate with commands to customize their workspaces. You can even fill `personalize` with `coder dotfiles <repo>`, but those looking for a simpler approach can inline commands like so: -```bash +```sh #!/bin/bash sudo apt update # Install some of my favorite tools every time my workspace boots @@ -65,7 +65,7 @@ The setup script must be executable, otherwise the dotfiles setup will fail. If you encounter this issue, you can fix it by making the script executable using the following commands: -```shell +```sh cd <path_to_dotfiles_repo> chmod +x <script_name> git commit -m "Make <script_name> executable" <script_name> diff --git a/docs/user-guides/workspace-management.md b/docs/user-guides/workspace-management.md index 877263902fc59..dd30127452956 100644 --- a/docs/user-guides/workspace-management.md +++ b/docs/user-guides/workspace-management.md @@ -26,7 +26,7 @@ You can also create a workspace from the command line: Each Coder user has their own workspaces created from [templates](../admin/templates/index.md): -```shell +```sh # create a workspace from the template; specify any variables coder create --template="<templateName>" <workspaceName> @@ -84,7 +84,7 @@ workspace again. Update a workspace through the command line: -```shell +```sh coder update <workspace-name> ``` @@ -148,7 +148,7 @@ Use the following command to re-enter template input variables in an existing workspace. This command is useful when a workspace fails to build because its state is out of sync with the template. -```shell +```sh coder update <your workspace name> --always-prompt ``` @@ -165,7 +165,7 @@ Coder's filter query: You can also do this in the CLI with the following command: -```shell +```sh coder update <your workspace name> --always-prompt ``` @@ -173,7 +173,7 @@ If that does not work, a Coder admin can manually push and pull the Terraform state for a given workspace. This can lead to state corruption or deleted resources if you do not know what you are doing. -```shell +```sh coder state pull <username>/<workspace name> # Make changes coder state push <username>/<workspace name> From 0f88b139488e61e45a5aaebdc2f905f808fc892a Mon Sep 17 00:00:00 2001 From: Nick Vigilante <nick.vigilante@coder.com> Date: Fri, 10 Jul 2026 21:20:24 +0000 Subject: [PATCH 6/6] fix(scripts/apidocgen): normalize code-fence tags in API doc generators The earlier normalization sweeps only touched checked-in docs/** output, not the generator sources. A future 'make gen' would have reverted docs/reference/api/*.md fences back to 'shell' since the widdershins --language_tabs flag and postprocess/main.go template still emitted the old tag. widdershins loads a user-template file named code_${language_tab}.dot to render each language tab's code sample, so renaming the shell tab to 'sh' required renaming code_shell.dot to code_sh.dot as well; otherwise widdershins silently drops the '### Code samples' curl block for every endpoint (verified by regenerating and diffing). - generate.sh: --language_tabs "shell:curl" -> "sh:curl" - markdown-template/code_shell.dot -> code_sh.dot (renamed to match) - security.def: shell -> sh for the 'coder tokens create' example - postprocess/main.go: shell -> txt (bare URL, no shell syntax) and shell -> sh (real curl command) in the apiIndexContent template - docs/reference/api/index.md: synced checked-in output to match Verified by running 'rm coderd/apidoc/.gen && make coderd/apidoc/.gen' end to end: regenerated output is now byte-identical to the checked-in docs/reference/api/*.md files. --- docs/reference/api/index.md | 4 ++-- scripts/apidocgen/generate.sh | 2 +- .../markdown-template/{code_shell.dot => code_sh.dot} | 0 scripts/apidocgen/markdown-template/security.def | 2 +- scripts/apidocgen/postprocess/main.go | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename scripts/apidocgen/markdown-template/{code_shell.dot => code_sh.dot} (100%) diff --git a/docs/reference/api/index.md b/docs/reference/api/index.md index a44b68e2c8cf3..c8434f20bcecd 100644 --- a/docs/reference/api/index.md +++ b/docs/reference/api/index.md @@ -6,13 +6,13 @@ Get started with the Coder API: Generate a token on your Coder deployment by visiting: -````shell +````txt https://coder.example.com/settings/tokens ```` List your workspaces -````shell +````sh # CLI curl https://coder.example.com/api/v2/workspaces?q=owner:me \ -H "Coder-Session-Token: <your-token>" diff --git a/scripts/apidocgen/generate.sh b/scripts/apidocgen/generate.sh index 38f0b5c4df86e..0218b6ef1a4c4 100755 --- a/scripts/apidocgen/generate.sh +++ b/scripts/apidocgen/generate.sh @@ -38,7 +38,7 @@ pnpm exec -- widdershins \ --user_templates "./markdown-template" \ --search false \ --omitHeader true \ - --language_tabs "shell:curl" \ + --language_tabs "sh:curl" \ --summary "${SWAG_OUTPUT_DIR}/swagger.json" \ --outfile "${API_MD_TMP_FILE}" # Perform the postprocessing diff --git a/scripts/apidocgen/markdown-template/code_shell.dot b/scripts/apidocgen/markdown-template/code_sh.dot similarity index 100% rename from scripts/apidocgen/markdown-template/code_shell.dot rename to scripts/apidocgen/markdown-template/code_sh.dot diff --git a/scripts/apidocgen/markdown-template/security.def b/scripts/apidocgen/markdown-template/security.def index e45d06abe9343..bcc768e51467f 100644 --- a/scripts/apidocgen/markdown-template/security.def +++ b/scripts/apidocgen/markdown-template/security.def @@ -3,7 +3,7 @@ Long-lived tokens can be generated to perform actions on behalf of your user account: -```shell +```sh coder tokens create ``` diff --git a/scripts/apidocgen/postprocess/main.go b/scripts/apidocgen/postprocess/main.go index d923c3986004e..95592c8b259bc 100644 --- a/scripts/apidocgen/postprocess/main.go +++ b/scripts/apidocgen/postprocess/main.go @@ -29,13 +29,13 @@ Get started with the Coder API: Generate a token on your Coder deployment by visiting: -` + "````shell" + ` +` + "````txt" + ` https://coder.example.com/settings/tokens ` + "````" + ` List your workspaces -` + "````shell" + ` +` + "````sh" + ` # CLI curl https://coder.example.com/api/v2/workspaces?q=owner:me \ -H "Coder-Session-Token: <your-token>"