## Summary Nests the CLI reference by subcommand so the Command Line sidebar collapses from 156 flat entries to 49 top-level verbs. Each page's URL follows the invocation, its page title is the full command as inline code, and its sidebar label is only its own verb as inline code. | | Before | After | | --- | --- | --- | | File | `docs/reference/cli/oauth2-provider_dcr_disable.md` | `docs/reference/cli/oauth2-provider/dcr/disable.md` | | URL | `/reference/cli/oauth2-provider_dcr_disable` | `/reference/cli/oauth2-provider/dcr/disable` | | Page title (front matter) | `oauth2-provider dcr disable` | `` `coder oauth2-provider dcr disable` `` | | Sidebar label (manifest) | `oauth2-provider dcr disable` | `` `disable` `` | Resolves DOCS-140 (coder/coder half). Also fixes the Makefile part of DOCS-1073 / DOCS-912, which this change depends on. ## Changes - `scripts/clidocgen`: pages nest by command path. A command with visible subcommands becomes its directory's `index.md`, so `oauth2-provider/index.md` and `oauth2-provider/dcr/index.md` sit above `oauth2-provider/dcr/disable.md`. Subcommand table links are relative to the parent page. - `scripts/clidocgen`: the manifest "Command Line" section is built from the command tree (nested, sorted by name, hidden commands skipped) instead of a flat list. The redundant `coder` child that pointed back at `reference/cli/index.md` is gone. - `Makefile`: the CLI rule now replaces `docs/reference/cli/` wholesale, so stale pages get removed. The manifest rule now runs `clidocgen -manifest-only` on top of the API staging manifest, so the CLI nav is generated instead of edited by hand. As a result, the nine pages that had no nav entry (`ai-gateway*`, `secret enable/disable`, `server fix-oidc-links`) now have one. - `scripts/configdocgen` and 48 prose pages: links point at the new paths (for example `reference/cli/server.md` is now `reference/cli/server/index.md`). ## How to review/QA this PR - `docs/reference/cli/**/*` (approximately 190 pages): Each of these pages are generated automatically. Some pages appear deleted, and some pages appear new. Every deleted page corresponds to a new page somewhere else, so no information is being deleted. The docs in this section should adhere to the following, so a test in the build preview for each of these items should be satisfactory: - [ ] Each subcommand of a command gets nested as a child instead of being displayed as a flat list. - [ ] Each parent command is stored in an `index.md` file. - [ ] The title of each page inside the page should now feature the full `coder XYZ` command. - [ ] The title of each page inside the page should now be formatted as inline code. - [ ] The title of each page in the sidebar should be the most granular subcommand of the whole command string (if the page's title is `coder ai-gateway keys create`, the sidebar label is `create`). - [ ] The title of each page in the sidebar should now be formatted as inline code. - [ ] The page slug for each page is now the most granular subcommand. - [ ] All links now point to the correct page. - `docs/manifest.json`: The changes here reflect the updated structure of the `docs/reference/cli` section. - `docs/**/*.md` outside of `docs/reference/cli/**/*` (approximately 50 pages): The extent of the changes in these pages are just updating the paths to point to the new page locations. - [ ] The links on the page all point to the correct new path in `docs/reference/cli`. - `scripts/clidocgen` (4 files): This is the Go code responsible for generating everything inside of `docs/reference/cli/**/*`. A typical code review here should be satisfactory. - `scripts/configdocgen` (2 files): these two files just have updates to the raw `.md` path used by `docs/admin/setup/configuration-reference.md` and updates the tests to reflect that. - `Makefile`: This updates the `make` targets for generating the CLI docs to fit the new structure. ## Merge ordering Without the renderer PRs deployed, both docs sites show literal backticks in titles and sidebar labels. Without the redirects, the old flat URLs return 404. 1. Deploy before merging this PR: coder/docs-engine#176 (beta-docs renders these titles as inline code) and coder/coder.com#1111 (classic docs renders them as inline code). Both are safe to ship first, because titles without backticks render as before. 2. Merge this PR. 3. Merge coder/coder.com#1112 (redirects from the old flat URLs) only once this content reaches the mainline release branch that serves unversioned `/docs`. ## Testing - `go test ./scripts/clidocgen/ ./scripts/configdocgen/ ./scripts/docshtmlcheck/`: pass. New tests cover page paths, subcommand links, the nested manifest, and front matter quoting. - `make docs/reference/cli/index.md docs/manifest.json docs/admin/setup/configuration-reference.md`, then a forced rerun: the second run produced no diff. - Checked the manifest: all 164 CLI entries resolve to a file, no page is missing a nav entry, and everything outside "Command Line" is byte-identical. - Relative `.md` links across `docs/`: 0 broken, same as `main`. - `make pre-commit` and `make pre-push`: pass. On earlier pre-push attempts, different unrelated vitest files timed out under host load. Those files pass when run alone, and the final push passed with `PARALLEL_JOBS=1`. <details> <summary>Implementation plan and decision log</summary> **Goal (from DOCS-140 and the requester):** URLs follow the command hierarchy. Pages are titled with the full command, and sidebar entries with the last verb only. Both are formatted as inline code. **Contract with the renderers:** a title wrapped entirely in one pair of backticks (``^`[^`]+`$``) renders as inline code. Plain-text consumers (`<title>`, meta, search, llms corpus) strip the backticks. Page title comes from front matter `title`, and the sidebar label from the manifest node `title`. **Decisions** - A parent command is `dir/index.md` rather than a sibling `dir.md`. The root CLI page is already `index.md`, and both docs-engine and the legacy coder.com renderer map `x/index.md` to `/x`. - The manifest is built from the command tree, not from the written files, so ordering is deterministic and the nesting matches the pages exactly. - The manifest discard bug (DOCS-1073 item 1) is fixed here, because without that fix the generated nested manifest would never reach the tree. DOCS-1073 items 2 through 4 (a prose fix and a hidden-command policy) are out of scope. - `-manifest-only` keeps the existing parallel `make gen` layout: the API rule still owns `_gen/manifest-staging.json`, and CLI regeneration doesn't retrigger swag. - The renderer and redirect work lives in the companion PRs in coder/docs-engine and coder/coder.com. It is linked above and not duplicated here. </details> --- > [!NOTE] > Generated by Coder Agents on behalf of @nickvigilante.
11 KiB
title
| title |
|---|
| Generate and upload a support bundle to Coder Support |
When you engage with Coder support to diagnose an issue with your deployment, you may be asked to generate and upload a "Support Bundle" for offline analysis. This document explains the contents of a support bundle and the steps to submit a support bundle to Coder staff.
What is a Support Bundle?
A support bundle is an archive containing a snapshot of information about your Coder deployment.
It contains information about the workspace, the template it uses, running agents in the workspace, and other detailed information useful for troubleshooting.
It is primarily intended for troubleshooting connectivity issues to workspaces, but can be useful for diagnosing other issues as well.
While we attempt to redact sensitive information from support bundles, they may contain information deemed sensitive by your organization and should be treated as such.
A brief overview of all files contained in the bundle is provided below:
Note
Detailed descriptions of all the information available in the bundle is out of scope, as support bundles are primarily intended for internal use.
| Filename | Description |
|---|---|
agent/agent.json |
The agent used to connect to the workspace with environment variables stripped. |
agent/agent_magicsock.html |
The contents of the HTTP debug endpoint of the agent's Tailscale Wireguard connection. |
agent/client_magicsock.html |
The contents of the HTTP debug endpoint of the client's Tailscale Wireguard connection. |
agent/listening_ports.json |
The listening ports detected by the selected agent running in the workspace. |
agent/logs.txt |
Active agent log plus rotated agent logs modified in the last 24 hours, capped at 100 MiB. |
agent/workspace_files/collection_errors.txt |
Workspace file entries dropped while assembling the bundle, such as entries exceeding the size budget. Only present when entries were dropped. |
agent/workspace_files/files/ |
Files collected from inside the remote workspace with --workspace-file. Only present when workspace paths are requested. |
agent/workspace_files/manifest.json |
Describes the remote workspace file collection: requested patterns, collected files, per-path errors, truncation, and applied limits. Only present when workspace paths are requested. |
agent/manifest.json |
The manifest of the selected agent with environment variables stripped. |
agent/startup_logs.txt |
Startup logs of the workspace agent. |
agent/prometheus.txt |
The contents of the agent's Prometheus endpoint. |
cli_logs.txt |
Logs from running the coder support bundle command. |
deployment/buildinfo.json |
Coder version and build information. |
deployment/config.json |
Deployment configuration, with secret values removed. Requires Owner role. |
deployment/experiments.json |
Any experiments currently enabled for the deployment. |
deployment/health.json |
A snapshot of the health status of the deployment. Requires Owner role. |
logs.txt |
Logs from the codersdk.Client used to generate the bundle. |
network/connection_info.json |
Information used by workspace agents used to connect to Coder (DERP map etc.) |
network/coordinator_debug.html |
Peers currently connected to each Coder instance and the tunnels established between peers. Requires Owner role. |
network/netcheck.json |
Results of running coder netcheck locally. |
network/tailnet_debug.html |
Tailnet coordinators, their heartbeat ages, connected peers, and tunnels. Requires Owner role. |
workspace/build_logs.txt |
Build logs of the selected workspace. |
workspace/workspace.json |
Details of the selected workspace. |
workspace/parameters.json |
Build parameters of the selected workspace. |
workspace/template.json |
The template currently in use by the selected workspace. |
workspace/template_file.zip |
The source code of the template currently in use by the selected workspace. |
workspace/template_version.json |
The template version currently in use by the selected workspace. |
vscode-logs/ |
Only present when generated from the VS Code Coder Remote extension. Includes logs, redacted settings, and local telemetry files. |
How do I generate a Support Bundle?
-
Ensure your deployment is up and running. Generating a support bundle requires the Coder deployment to be available.
-
Ensure you have the Coder CLI installed on a local machine. See installation for steps on how to do this.
Note
It is recommended to generate a support bundle from a location experiencing workspace connectivity issues.
-
Ensure you are logged in to your Coder deployment. Any authenticated user can generate a support bundle. Users with the Owner role will get the most complete bundle; non-admin users will still get a useful bundle but some admin-only data will be omitted (see the note below).
-
Run
coder support bundle [owner/workspace], and respondyesto the prompt. The support bundle will be generated in the current directory with the filenamecoder-support-$TIMESTAMP.zip.If you use VS Code, you can also run Coder: Create Support Bundle from the Command Palette. The VS Code Coder Remote extension runs
coder support bundleand appends recent VS Code diagnostics to the generated archive. Bundles created with the CLI alone do not includevscode-logs/. Learn more about VS Code diagnostics.Note
While support bundles can be generated without a running workspace, it is recommended to specify one to maximize troubleshooting information.
To collect workspace-side files such as editor or service logs, add one
--workspace-fileflag for each path or glob. This is explicit opt-in. The CLI sends each value to the workspace agent, so quote globs to prevent your local shell from expanding them:coder support bundle my-workspace \ --workspace-file '$HOME/.vscode-server/data/logs/**/*.log' \ --workspace-file '$HOME/.local/share/code-server/coder-logs/**/*.log'Workspace paths and globs are evaluated by the workspace agent. Environment variables such as
$HOMEexpand in the workspace, and~/resolves against the agent user's home directory; any absolute path in the workspace can be requested. Symlinks are followed for directly requested paths, but not during glob traversal. Collection is limited to 10000 files and 100 MiB in total; files larger than 10 MiB are truncated to their last 10 MiB and marked as truncated in the manifest. Collected files are stored underagent/workspace_files/files/, and collection metadata is stored inagent/workspace_files/manifest.json.Warning
Workspace files can contain tokens, credentials, source code, or other sensitive data. Extract and review
agent/workspace_files/before sharing the bundle. -
(Recommended) Extract the support bundle and review its contents, redacting any information you deem necessary.
-
Coder staff will provide you a link where you can upload the bundle along with any other necessary supporting files.
Note
It is helpful to leave an informative message regarding the nature of supporting files.
Coder support will then review the information you provided and respond to you with next steps.