diff --git a/docs/.style/style-guide/accessibility-and-inclusion.md b/docs/.style/style-guide/accessibility-and-inclusion.md index acf71a19a60..761a0ad23c1 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 a51707d7e05..5b1828d81ee 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 087b7239c0f..4fa5101a1df 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 f18429296c2..9d2ce3df79c 100644 --- a/docs/.style/style-guide/formatting.md +++ b/docs/.style/style-guide/formatting.md @@ -136,19 +136,34 @@ 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` 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. - `yaml` for YAML. + `yml` is not the canonical tag; use `yaml`. - `go` for Go. - `json` for JSON. -- `text` for command output shown on its own, and for any block with no syntax to highlight. + `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. 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. @@ -156,7 +171,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. -For content with no sensible language tag, fall back to `text`. +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 `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**: @@ -233,7 +250,7 @@ curl -L https://coder.com/install.sh | sh ### Windows -```powershell +```ps1 winget install Coder.Coder ``` @@ -266,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 @@ -280,7 +297,7 @@ The provisioner supports: - Google Cloud ``` -```markdown +```md The agent reconnect logic uses the following timeouts: - Initial reconnect: 1 second. @@ -290,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. @@ -312,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) @@ -328,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`. @@ -383,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 e2aae026652..8828a798943 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 3dc621927d4..d54ad2b787a 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 2df7097b694..cfca7af52ce 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 @@ -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 ---+ @@ -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 034f95e8a59..ea87a9a6661 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/documentation.md b/docs/about/contributing/documentation.md index 7f511d9b58d..1621fd6c1cc 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/frontend.md b/docs/about/contributing/frontend.md index af2981ed6cd..731055af5c9 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 05d06e9299f..408c0710a03 100644 --- a/docs/about/contributing/modules.md +++ b/docs/about/contributing/modules.md @@ -26,20 +26,20 @@ 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 ``` 3. **Understand the structure**: - ```text + ```txt registry/[namespace]/ ├── modules/ # Your modules ├── .images/ # Namespace avatar and screenshots @@ -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] ``` @@ -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 = { @@ -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 d0c18f078a2..c5bff9caff3 100644 --- a/docs/about/contributing/templates.md +++ b/docs/about/contributing/templates.md @@ -31,20 +31,20 @@ 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 ``` 3. **Understand the structure**: - ```text + ```txt registry/[namespace]/ ├── templates/ # Your templates ├── .images/ # Namespace avatar and screenshots @@ -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] ``` @@ -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 = { @@ -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" @@ -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 @@ -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" ``` @@ -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 8f01738442c..94adc1e023e 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 +```dotenv CODER_EXTERNAL_AUTH_0_ID="" CODER_EXTERNAL_AUTH_0_TYPE= CODER_EXTERNAL_AUTH_0_CLIENT_ID= @@ -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 ``` @@ -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 +```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: -```env +```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: -```env +```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: -```env +```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 -```env +```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. -```env +```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: -```env +```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: -```env +```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. -```env +```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: -```env +```dotenv CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key" ``` @@ -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 ``` @@ -358,7 +358,7 @@ Below is an example configuration with multiple providers: > git config --global credential.useHttpPath true > ``` -```env +```dotenv # Provider 1) github.com CODER_EXTERNAL_AUTH_0_ID=primary-github CODER_EXTERNAL_AUTH_0_TYPE=github diff --git a/docs/admin/infrastructure/scale-utility.md b/docs/admin/infrastructure/scale-utility.md index b4e0f913763..5da9b0f0b13 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 07f98a8117d..f06263e6a9e 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/devcontainers/integration.md b/docs/admin/integrations/devcontainers/integration.md index 1b37c1bc52c..6c40fdee428 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/dx-data-cloud.md b/docs/admin/integrations/dx-data-cloud.md index c74bafe5480..ee4f486a6ca 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/jfrog-artifactory.md b/docs/admin/integrations/jfrog-artifactory.md index 5dccd8d55e9..9450c976493 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/kubernetes-logs.md b/docs/admin/integrations/kubernetes-logs.md index 03c94228393..d4794f8c587 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 32d5ced73bb..3bbea893f96 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 ead5e210caf..ecd2760b53b 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 e965166802c..9ab8ce91231 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=@ @@ -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 394a63d7049..7509c1fbad2 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 477ebcb7146..396ef80df41 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 4403617234b..d2fd31d4b45 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" } @@ -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/port-forwarding.md b/docs/admin/networking/port-forwarding.md index f5678403adb..a20439b1e46 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 '<https://coder.example.com/api/v2/applications/auth-redirect>' from origin '<https://8000--dev--user--apps.coder.example.com>' 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 fc9e9173319..9d558a7da02 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 @@ -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 <your-coder-server-ip> ``` Or alternatively, using a CNAME record: -```text +```txt *.coder.example.com CNAME coder.example.com ``` @@ -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" @@ -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 <sydney-proxy-ip> *.london.coder.example.com A <london-proxy-ip> ``` @@ -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 +```tf resource "coder_app" "code-server" { agent_id = coder_agent.main.id slug = "code-server" @@ -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 d6b6aa1ed13..69aa2073deb 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,13 +188,13 @@ file to include a custom entrypoint: #### Docker run -```bash +```sh docker run --rm -it --entrypoint /opt/coder ghcr.io/coder/coder:latest wsproxy server ``` #### Custom Dockerfile -```Dockerfile +```dockerfile FROM ghcr.io/coder/coder:latest ENTRYPOINT ["/opt/coder", "wsproxy", "server"] ``` diff --git a/docs/admin/provisioners/manage-provisioner-jobs.md b/docs/admin/provisioners/manage-provisioner-jobs.md index b2581e6020f..a01c36afb44 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 4c7522d6b5d..693a715a95e 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 72a7c028439..2cbe7ac9be5 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 66dbc2587e7..61b4cf03cb8 100644 --- a/docs/admin/setup/appearance.md +++ b/docs/admin/setup/appearance.md @@ -98,13 +98,13 @@ coder: if running as a system service, set an environment variable `CODER_SUPPORT_LINKS` in `/etc/coder.d/coder.env` as follows, -```env +```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"}]' ``` 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 fb69289c056..661513edade 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 6669a4debed..fc3193e3f64 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/agent-metadata.md b/docs/admin/templates/extending-templates/agent-metadata.md index 92d43702ca0..1c1dd0e7c2e 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 3cfb0432e02..cd683b81b81 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 @@ -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 +```txt cannot clone: Invalid argument user namespaces are not enabled in /proc/sys/user/max_user_namespaces ``` @@ -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/dynamic-parameters.md b/docs/admin/templates/extending-templates/dynamic-parameters.md index b0f0229ca23..4dedeeab316 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 } @@ -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/external-auth.md b/docs/admin/templates/extending-templates/external-auth.md index 62e05af10d1..aacad98b878 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/icons.md b/docs/admin/templates/extending-templates/icons.md index 7de8e4a0718..57d55d88dc2 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 d7864e7d30b..dbbca837a9f 100644 --- a/docs/admin/templates/extending-templates/index.md +++ b/docs/admin/templates/extending-templates/index.md @@ -95,7 +95,7 @@ You can use these examples to add new Coder apps: ## code-server -```hcl +```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 -```hcl +```tf resource "coder_app" "filebrowser" { agent_id = coder_agent.main.id display_name = "file browser" @@ -123,7 +123,7 @@ resource "coder_app" "filebrowser" { ## Zed -```hcl +```tf resource "coder_app" "zed" { agent_id = coder_agent.main.id slug = "slug" diff --git a/docs/admin/templates/extending-templates/jetbrains-airgapped.md b/docs/admin/templates/extending-templates/jetbrains-airgapped.md index f859bb61d2f..ace2c92bfa3 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 0bb11ef9e6a..dd7fa82a248 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 cc2bdca55a9..9dc1e8a547b 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 3eb7957a731..cf8a450f9ff 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 669ce02307b..71b8dec9d5f 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 = { @@ -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 ``` @@ -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 +```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 4db1635d9ae..979b371913d 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 ``` @@ -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 { @@ -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 ``` @@ -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 65d18d35192..bbc9c5af1b7 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: -```hcl +```tf resource "kubernetes_deployment" "workspace" { # ... other configuration @@ -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/extending-templates/resource-monitoring.md b/docs/admin/templates/extending-templates/resource-monitoring.md index 78ce1b61278..441b88f9644 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 +```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/variables.md b/docs/admin/templates/extending-templates/variables.md index 3c1d02f0baf..4fa89d40aeb 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/extending-templates/web-ides.md b/docs/admin/templates/extending-templates/web-ides.md index e5ae8a810dd..30aba957bd7 100644 --- a/docs/admin/templates/extending-templates/web-ides.md +++ b/docs/admin/templates/extending-templates/web-ides.md @@ -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 diff --git a/docs/admin/templates/managing-templates/dependencies.md b/docs/admin/templates/managing-templates/dependencies.md index 80d80da6793..5f1338c5b2a 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/managing-templates/external-workspaces.md b/docs/admin/templates/managing-templates/external-workspaces.md index 92b7204fb60..f958ac0c509 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 63549f3251d..413b99adc19 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/open-in-coder.md b/docs/admin/templates/open-in-coder.md index b2ca526b06a..3f8bd1cce58 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 +```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) -```hcl +```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 c9af9974278..5c1474501b6 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 @@ -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/index.md b/docs/admin/templates/startup-coordination/index.md index 2394f808941..694384655ee 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 d75c0552eac..5c612d191c9 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 694ed694c55..03d44543805 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 @@ -173,7 +173,7 @@ ensure that your unit does not conflict with others. Add comments explaining why dependencies exist: -```hcl +```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 @@ -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 7e2e9d6f212..13fe7913829 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 ``` @@ -204,19 +204,19 @@ 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 ``` 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 57ed6f9eeb3..4d07abb1e2e 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 3c7ec708be3..658f689e2cd 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 ``` @@ -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 @@ -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 ``` @@ -454,12 +454,12 @@ 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 +```dotenv # as an environment variable CODER_OIDC_GROUP_AUTO_CREATE=true ``` -```shell +```sh # as a flag --oidc-group-auto-create=true ``` @@ -471,12 +471,12 @@ 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 +```dotenv # as an 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 b49ac359054..0a38fa8710a 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/oidc-auth/google.md b/docs/admin/users/oidc-auth/google.md index 298497b27be..95f3c7ac2c2 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 +```dotenv CODER_OIDC_ISSUER_URL=https://accounts.google.com CODER_OIDC_CLIENT_ID=<client id> CODER_OIDC_CLIENT_SECRET=<client secret> @@ -39,7 +39,7 @@ CODER_OIDC_ICON_URL=/icon/google.svg Google uses auth URL parameters to issue refresh tokens. Configure: -```env +```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 56adb915c66..17271e33343 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 +```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: -```env +```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: -```env +```dotenv CODER_OIDC_SIGN_IN_TEXT="Sign in with Gitea" CODER_OIDC_ICON_URL=https://gitea.io/images/gitea.png ``` @@ -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"}' ``` @@ -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 +```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. -```env +```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: -```env +```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 db9958f1bd0..2fae3fbc464 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 +```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=<client id, located in "Overview"> CODER_OIDC_CLIENT_SECRET=<client secret, saved from step 6> @@ -42,7 +42,7 @@ CODER_OIDC_ICON_URL=/icon/microsoft.svg ## Enable refresh tokens (recommended) -```env +```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 53a11478824..af5e02cb8fa 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 ``` @@ -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 +```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): -```env +```dotenv CODER_OIDC_SCOPES=openid,profile,email,offline_access CODER_OIDC_AUTH_URL_PARAMS='{"access_type":"offline"}' ``` @@ -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/organizations.md b/docs/admin/users/organizations.md index b38c46cd485..efee0afaa93 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/admin/users/quotas.md b/docs/admin/users/quotas.md index dd2c8a62bd5..d6493689ada 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 +```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 ca410dceaad..60992be2176 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 cb23a14bfe6..c6472cf266f 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/ecs.md b/docs/ai-coder/agent-firewall/nsjail/ecs.md index 257136f37db..357b58310f1 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 +```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 0dd2eee0fcf..4052f6f284c 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 @@ -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 +```tf bootstrap_extra_args = <<-EOT [settings.kernel.sysctl] "user.max_user_namespaces" = "65536" diff --git a/docs/ai-coder/agents/extending-agents.md b/docs/ai-coder/agents/extending-agents.md index 6b50cb52109..587658b4cc7 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 @@ -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/getting-started.md b/docs/ai-coder/agents/getting-started.md index 6120644519b..8089cf079cc 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/advisor.md b/docs/ai-coder/agents/platform-controls/advisor.md index 9ef54da4a75..4fdfb166b1a 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/chat-debug-retention.md b/docs/ai-coder/agents/platform-controls/chat-debug-retention.md index b715800988d..d9cbb7bf184 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 d6454104e47..ebc1aa1c55c 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/platform-controls/git-providers.md b/docs/ai-coder/agents/platform-controls/git-providers.md index 8b6e03a14d0..df4160d7713 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 +```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: -```env +```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`: -```env +```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 0f77b6fa108..c730254059b 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 +```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: -```hcl +```tf resource "coder_agent" "main" { os = "linux" arch = "amd64" diff --git a/docs/ai-coder/agents/platform-controls/virtual-desktop.md b/docs/ai-coder/agents/platform-controls/virtual-desktop.md index e5186abdeb6..76b440f4b6a 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/agents/tasks-to-chats-migration.md b/docs/ai-coder/agents/tasks-to-chats-migration.md index 8fb2b86322c..ee095961991 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 f4eab0cba7e..bf9ed23dff7 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/ai-gateway-proxy/setup.md b/docs/ai-coder/ai-gateway/ai-gateway-proxy/setup.md index 8cd0c179bf7..2d6b6b7904e 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 667f04b715d..1dca8199825 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" @@ -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 +```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: -```hcl +```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 5ce4a21cdb2..316992be9c9 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>" @@ -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/clients/copilot.md b/docs/ai-coder/ai-gateway/clients/copilot.md index cb7af2d488d..7aff3bd493d 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/index.md b/docs/ai-coder/ai-gateway/clients/index.md index 300c2b3132b..e3e5513721c 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 +```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 a7da16fdb57..1f01124e266 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 494f43832b5..294c14975c1 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=... @@ -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 +```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/ai-gateway/rebranding-migration.md b/docs/ai-coder/ai-gateway/rebranding-migration.md index 1404f7bcc39..2103d025c9c 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/ai-coder/custom-agents.md b/docs/ai-coder/custom-agents.md index ab3a262618d..5145ed203b1 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 +```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 4d99b6986da..46d3da323fe 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 @@ -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 } @@ -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/ai-coder/tasks-core-principles.md b/docs/ai-coder/tasks-core-principles.md index 771680cb8f0..404799cf05d 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 +```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 a4243c7759c..60108903b47 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 +```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: -```hcl +```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: -```hcl +```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 b833e6e6ff9..7fe2a01e266 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 +```tf terraform { required_providers { coder = { @@ -128,7 +128,7 @@ In v2.28 and above, the following changes were made: Example (**not** a full template): -```hcl +```tf terraform { required_providers { coder = { diff --git a/docs/ai-coder/tasks.md b/docs/ai-coder/tasks.md index 93a1350e5b3..0e072838774 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 +```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 019aaad85a3..0638f84bd2f 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 132e4bb9052..62b3b09badf 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 <your-workspace> 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 f5b3848707c..eb5e8e35d81 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 <PID> ``` diff --git a/docs/install/airgap.md b/docs/install/airgap.md index 244978d7d15..06e99571c37 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 @@ -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/cli.md b/docs/install/cli.md index 38e7d2ede9f..a8e5429143c 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/cloud/azure-vm.md b/docs/install/cloud/azure-vm.md index 6cc21631056..258e47307ec 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 c9f12e1633d..43c21510e5f 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 7d8f23715f1..911c3484efc 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" \ @@ -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 8e4c4e950f1..e78cea240e1 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/kubernetes.md b/docs/install/kubernetes.md index e55a067229d..8954a2b131a 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 1f9000ce003..6a3236ed5a3 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 82e16b6f469..2506e1cd082 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 f8144e56327..fe099d631e9 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 ``` @@ -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 ``` @@ -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/registry-mirror-artifactory.md b/docs/install/registry-mirror-artifactory.md index 21e7a07078d..efd6ebc5ae8 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 +```tf host "<your-artifactory-host>" { services = { "modules.v1" = "https://<your-artifactory-host>/artifactory/api/terraform/coder-registry/v1/modules/" diff --git a/docs/install/releases/feature-stages.md b/docs/install/releases/feature-stages.md index 44c50cccae5..f4f46f7ea5b 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 97cd323647f..31f18c6a988 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 c04bd6e9c27..c2df3d65303 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,25 +36,25 @@ 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 ``` ## Windows -```powershell +```ps1 winget uninstall Coder.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,20 +76,20 @@ 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 ``` ## Windows -```powershell +```ps1 rmdir %AppData%\coderv2 ``` diff --git a/docs/install/upgrade-best-practices.md b/docs/install/upgrade-best-practices.md index 58b240c95f6..1c4c8a777ba 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 8c4282202d2..df17ba0ec25 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 ``` @@ -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 +```ps1 winget install Coder.Coder ``` diff --git a/docs/reference/agent-api/debug.md b/docs/reference/agent-api/debug.md index ef1b3166f9b..ca3e5c5e1cd 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 220115d59af..75eb4ea60be 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 9c2f3bd8532..09e869a1693 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 35b81f6178a..fe9be024bfc 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 e8d95f4efb3..af1d3b50317 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 6f2e46931ee..06a7057fb7d 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 77668fe0307..aef03ae6ee3 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 ad6632446cc..1580bbcef02 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 5f56524b445..cc61c88742a 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 40bbd32637b..ef1986a66dd 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 67e8f6e440f..235f468e82a 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 34915c902b5..6368a193130 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 251f633f9b6..cd8abd99e5c 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 32a968febe1..14b99f21e19 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 fb13c8aa25d..8c5c996e844 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/index.md b/docs/reference/api/index.md index a44b68e2c8c..c8434f20bce 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/docs/reference/api/initscript.md b/docs/reference/api/initscript.md index 80e5056b5d4..a86cc5f81c8 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 c0e3556ba90..eb42bc040c2 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 ec63ece4efd..6660b4a138d 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 76f32e127bc..176f6d683e7 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 c0dcb219260..41cb7e994c8 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 eb7f2efafd1..08c8deb4c00 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 362b7c3cada..6f6a0850004 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 7a6a238b609..29af98a46bb 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 cd1ee75e824..9ead8d17eb5 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 4efe1053cf4..f869133fe43 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 89583756fbb..9b23383636a 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 e5c8b6e665f..3b3443d23c5 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 edef0ca0993..788c51f196c 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 97ba371b0dd..85dc1461490 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 2d00a98d831..92ea4d72fe3 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 4de97ef4a30..4e7c5d9134f 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 eb3b2af1318..f5d4f391028 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 ``` @@ -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 61c48875e0f..55edf1ddb21 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 fe28d9ea4bb..bb9d736d945 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 01cfacfb34c..112eec8bb59 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 a115192a47d..dda44b90829 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" ``` @@ -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 -----------+---------- @@ -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 f2a0902eb79..0bbbd629fe3 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> ``` @@ -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/persistent-shared-workspaces.md b/docs/tutorials/persistent-shared-workspaces.md index 39d0f40db26..cbd28587bf7 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 5cb8ec620e0..027982b7618 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 b49ed6db573..027d289892b 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 @@ -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 741f3842f10..1b83fd9fd0f 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 afc48cd6ef7..c6053a8de9a 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 @@ -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 9872b7cfb53..85f64f8f592 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: - ```output + ```txt > Welcome to Coder, marc! You're authenticated. $ ``` @@ -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 3e0de88bc92..00e5b29e94e 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 5ea445c672d..00eccf89a9e 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 e458883505b..7f4616918e8 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 ``` @@ -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 ``` @@ -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 ``` @@ -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/shared-workspaces.md b/docs/user-guides/shared-workspaces.md index a63872fbec4..02a3ae75f4b 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/emacs-tramp.md b/docs/user-guides/workspace-access/emacs-tramp.md index 7906508bd9e..79b9e59de81 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 25f753d2f92..722094ce2f6 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 c995cdd2353..bba9bf762d6 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 5ef42a37f26..918f6f54df9 100644 --- a/docs/user-guides/workspace-access/jetbrains/gateway.md +++ b/docs/user-guides/workspace-access/jetbrains/gateway.md @@ -89,38 +89,38 @@ trust store present on your local machine as well as to the Coder plugin setting #### Linux - ```none + ```txt <Gateway installation directory>/jbr/lib/security/cacerts ``` Use the `keytool` utility that ships with Java: - ```shell + ```sh keytool -import -alias coder -file <certificate> -keystore /path/to/trust/store ``` #### macOS - ```none + ```txt <Gateway installation directory>/jbr/lib/security/cacerts /Library/Application Support/JetBrains/Toolbox/apps/JetBrainsGateway/ch-0/<app-id>/JetBrains Gateway.app/Contents/jbr/Contents/Home/lib/security/cacerts # Path for Toolbox installation ``` 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 ``` #### Windows - ```none + ```txt C:\Program Files (x86)\<Gateway installation directory>\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 <version>/jbr/bin/keytool.exe' 'C:\Program Files\JetBrains\JetBrains Gateway <version>/jre/lib/security/cacerts' -import -alias coder -file <cert> # command for Toolbox installation diff --git a/docs/user-guides/workspace-access/jetbrains/toolbox.md b/docs/user-guides/workspace-access/jetbrains/toolbox.md index 6b857777dbd..49d67335fd9 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 f07589a5399..e3c8bfa77cf 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://<your Coder server name>/v0/open/ws/<workspace name>/agent/<agent name>/rdp?username=<username>&password=<password> ``` For example: -```text +```txt coder://coder.example.com/v0/open/ws/myworkspace/agent/main/rdp?username=Administrator&password=coderRDP! ``` @@ -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 a467fbc3766..cb266283213 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 ``` @@ -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 @@ -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 diff --git a/docs/user-guides/workspace-access/web-terminal.md b/docs/user-guides/workspace-access/web-terminal.md index cdfbe75ed1d..32d75647a62 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 ``` @@ -104,7 +104,7 @@ webTerminalRenderer: "canvas" # Options: canvas, webgl, dom Or via environment variable: -```bash +```sh CODER_WEB_TERMINAL_RENDERER=canvas ``` @@ -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 ``` @@ -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 d2d507363c7..635915d9a4e 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 ``` @@ -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 98e11fd6bc8..b23ce318814 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 877263902fc..dd301274529 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> diff --git a/scripts/apidocgen/generate.sh b/scripts/apidocgen/generate.sh index 38f0b5c4df8..0218b6ef1a4 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 e45d06abe93..bcc768e5146 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 d923c398600..95592c8b259 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>"