## Summary Page descriptions in the docs were inconsistent about ending with a period. This makes every page description end with one and adds a lint so it stays that way. A page description can come from three places, and the docs site reads front matter first and falls back to the manifest: - the hand-written YAML sidebar sources under `docs/manifest/` (including `children_from` overlays), - the generated fragments (`docs/manifest/generated/cli.json`, `rest-api.json`), compiled into `docs/manifest.json`, - a page's own front matter (today only the generated CLI and API reference pages carry one). The check covers all three. For the CLI, the description comes from each command's `Short`, which stays unpunctuated by CLI-help convention, so `clidocgen` adds the period when it writes the docs description instead of changing 120 `Short` strings and the CLI golden files. ## What the lint checks `make lint/docs-manifest` (`docsmanifestgen check`, already part of `make lint` in CI) now fails when a non-empty description doesn't end with `.`. No description in the tree ends with `?` or `!`, so the rule allows only a period. Errors name the source file, the sidebar breadcrumb, and the description, for example: ``` install/plan/sizing.yml: Install > Plan your deployment > Coder Validated Architecture > Up to 1,000 users: description must end with a period: "Hardware specifications and architecture guidance for Coder deployments that support up to 1,000 users" generated/api.json: General: description must end with a period: "General endpoints" reference/cli/ping.md: Reference > Command Line > `ping`: front matter description must end with a period: "Ping a workspace" ``` The style guide's page-description rule now lists the requirement and cites the checker, and `styleclaims` recognises `scripts/docsmanifestgen` so the coverage table counts it as tool-checked. ## Count of descriptions fixed 147 descriptions in `docs/manifest.json`: - 27 hand-written descriptions in 15 sidebar source files, - 120 generated CLI descriptions, which also update the front matter of 120 CLI reference pages. The REST API descriptions already ended with a period. No description is otherwise reworded. ## Testing - New table cases in `scripts/docgenenv` (section route, child route, overlay, generated fragment, front matter, and a `?` ending) and `scripts/clidocgen`, written first and failing before the change. - `docsmanifestgen check` on the unfixed tree reported the 27 source descriptions; after the fixes and regeneration it passes. - `go test ./scripts/docgenenv/ ./scripts/clidocgen/ ./scripts/docsmanifestgen/ ./scripts/styleclaims/ ./scripts/apidocgen/...` - `golangci-lint run` on the changed packages, `pnpm run check-docs`, `go run ./scripts/styleclaims`, `scripts/check_emdash.sh`, and `docsmanifestgen fmt` (no changes). Linear: [DOCS-1304](https://linear.app/codercom/issue/DOCS-1304) --- 🤖 Built with AI assistance.
174 lines
6.1 KiB
Markdown
Generated
174 lines
6.1 KiB
Markdown
Generated
---
|
|
# Code generated by make gen. DO NOT EDIT.
|
|
title: "`coder ssh`"
|
|
description: Start a shell into a workspace or run a command.
|
|
---
|
|
|
|
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
|
|
|
Start a shell into a workspace or run a command
|
|
|
|
## Usage
|
|
|
|
```console
|
|
coder ssh [flags] <workspace> [command]
|
|
```
|
|
|
|
## Description
|
|
|
|
```console
|
|
This command does not have full parity with the standard SSH command. For users who need the full functionality of SSH, create an ssh configuration with `coder config-ssh`.
|
|
|
|
- Use `--` to separate and pass flags directly to the command executed via SSH.:
|
|
|
|
$ coder ssh <workspace> -- ls -la
|
|
```
|
|
|
|
## Options
|
|
|
|
### --stdio
|
|
|
|
| | |
|
|
|-------------|-------------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_SSH_STDIO</code> |
|
|
|
|
Specifies whether to emit SSH output over stdin/stdout.
|
|
|
|
### -t, --tty
|
|
|
|
| | |
|
|
|-------------|-----------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_SSH_TTY</code> |
|
|
|
|
Request a pseudo-terminal for the SSH session. Interactive shell sessions request one by default; command sessions do not unless this flag is set.
|
|
|
|
### --ssh-host-prefix
|
|
|
|
| | |
|
|
|-------------|-----------------------------------------|
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_SSH_SSH_HOST_PREFIX</code> |
|
|
|
|
Strip this prefix from the provided hostname to determine the workspace name. This is useful when used as part of an OpenSSH proxy command.
|
|
|
|
### --hostname-suffix
|
|
|
|
| | |
|
|
|-------------|-----------------------------------------|
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_SSH_HOSTNAME_SUFFIX</code> |
|
|
|
|
Strip this suffix from the provided hostname to determine the workspace name. This is useful when used as part of an OpenSSH proxy command. The suffix must be specified without a leading . character.
|
|
|
|
### -A, --forward-agent
|
|
|
|
| | |
|
|
|-------------|---------------------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_SSH_FORWARD_AGENT</code> |
|
|
|
|
Specifies whether to forward the SSH agent specified in $SSH_AUTH_SOCK.
|
|
|
|
### -G, --forward-gpg
|
|
|
|
| | |
|
|
|-------------|-------------------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_SSH_FORWARD_GPG</code> |
|
|
|
|
Specifies whether to forward the GPG agent. Unsupported on Windows workspaces, but supports all clients. Requires gnupg (gpg, gpgconf) on both the client and workspace. The GPG agent must already be running locally and will not be started for you. If a GPG agent is already running in the workspace, it will be attempted to be killed.
|
|
|
|
### --identity-agent
|
|
|
|
| | |
|
|
|-------------|----------------------------------------|
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_SSH_IDENTITY_AGENT</code> |
|
|
|
|
Specifies which identity agent to use (overrides $SSH_AUTH_SOCK), forward agent must also be enabled.
|
|
|
|
### --workspace-poll-interval
|
|
|
|
| | |
|
|
|-------------|---------------------------------------------|
|
|
| Type | <code>duration</code> |
|
|
| Environment | <code>$CODER_WORKSPACE_POLL_INTERVAL</code> |
|
|
| Default | <code>1m</code> |
|
|
|
|
Specifies how often to poll for workspace automated shutdown.
|
|
|
|
### --wait
|
|
|
|
| | |
|
|
|-------------|------------------------------|
|
|
| Type | <code>yes\|no\|auto</code> |
|
|
| Environment | <code>$CODER_SSH_WAIT</code> |
|
|
| Default | <code>auto</code> |
|
|
|
|
Specifies whether or not to wait for the startup script to finish executing. Auto means that the agent startup script behavior configured in the workspace template is used.
|
|
|
|
### --no-wait
|
|
|
|
| | |
|
|
|-------------|---------------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_SSH_NO_WAIT</code> |
|
|
|
|
Enter workspace immediately after the agent has connected. This is the default if the template has configured the agent startup script behavior as non-blocking.
|
|
|
|
### -l, --log-dir
|
|
|
|
| | |
|
|
|-------------|---------------------------------|
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_SSH_LOG_DIR</code> |
|
|
|
|
Specify the directory containing SSH diagnostic log files.
|
|
|
|
### -R, --remote-forward
|
|
|
|
| | |
|
|
|-------------|----------------------------------------|
|
|
| Type | <code>string-array</code> |
|
|
| Environment | <code>$CODER_SSH_REMOTE_FORWARD</code> |
|
|
|
|
Enable remote port forwarding (remote_port:local_address:local_port).
|
|
|
|
### -e, --env
|
|
|
|
| | |
|
|
|-------------|-----------------------------|
|
|
| Type | <code>string-array</code> |
|
|
| Environment | <code>$CODER_SSH_ENV</code> |
|
|
|
|
Set environment variable(s) for session (key1=value1,key2=value2,...).
|
|
|
|
### --network-info-dir
|
|
|
|
| | |
|
|
|------|---------------------|
|
|
| Type | <code>string</code> |
|
|
|
|
Specifies a directory to write network information periodically.
|
|
|
|
### --network-info-interval
|
|
|
|
| | |
|
|
|---------|-----------------------|
|
|
| Type | <code>duration</code> |
|
|
| Default | <code>5s</code> |
|
|
|
|
Specifies the interval to update network information.
|
|
|
|
### --disable-autostart
|
|
|
|
| | |
|
|
|-------------|-------------------------------------------|
|
|
| Type | <code>bool</code> |
|
|
| Environment | <code>$CODER_SSH_DISABLE_AUTOSTART</code> |
|
|
| Default | <code>false</code> |
|
|
|
|
Disable starting the workspace automatically when connecting via SSH.
|