Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add --quiet flag to coder ssh command#18883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
blink-so wants to merge4 commits intomain
base:main
Choose a base branch
Loading
fromfeat/ssh-quiet-flag

Conversation

blink-so[bot]
Copy link
Contributor

Adds a--quiet (-q) flag to suppress machine setup logs and connection indicators when connecting to workspaces via SSH.

Changes

  • AddQuiet field toAgentOptions struct incli/cliui/agent.go
  • ModifyAgent() function to skip all logging when quiet mode is enabled
  • Add--quiet flag with-q shorthand to SSH command
  • SupportCODER_SSH_QUIET environment variable

Usage

coder ssh myworkspace --quietcoder ssh myworkspace -qCODER_SSH_QUIET=true coder ssh myworkspace

Testing

  • Existing tests pass
  • Flag appears correctly incoder ssh --help
  • Implementation tested with cliui agent tests

blink-sobotand others added4 commitsJuly 15, 2025 18:28
Adds a --quiet (-q) flag to suppress machine setup logs and connectionindicators when connecting to workspaces via SSH. This provides a cleanerSSH experience for users who don't want to see the startup logs.Changes:- Add Quiet field to AgentOptions struct- Modify Agent() function to skip logging in quiet mode- Add --quiet flag with -q shorthand to SSH command- Support CODER_SSH_QUIET environment variableCo-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
Fix Go formatting for the quiet flag to match existing code style.Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
Generate updated CLI documentation that includes the new --quiet flagfor the SSH command.Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
Run markdownlint and markdown-table-formatter to fix formattingissues in the generated CLI documentation.Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
@matifalimatifali requested a review fromCopilotJuly 21, 2025 09:06
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR adds a--quiet flag to thecoder ssh command to suppress machine setup logs and connection indicators when connecting to workspaces via SSH.

  • Adds quiet mode support to the Agent function in cliui package
  • Implements--quiet flag with-q shorthand andCODER_SSH_QUIET environment variable in SSH command
  • Updates documentation to reflect the new flag functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
cli/cliui/agent.goAdds Quiet field to AgentOptions struct and implements quiet mode logic to skip all logging
cli/ssh.goAdds --quiet flag, environment variable support, and passes quiet option to agent
docs/reference/cli/ssh.mdDocuments the new --quiet flag with usage information
docs/manifest.jsonFormatting changes to JSON structure (unrelated to quiet flag functionality)

}
"versions": [
"main"
],
Copy link
Preview

CopilotAIJul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The formatting changes in this file appear unrelated to the quiet flag feature. Consider separating formatting changes from functional changes in different commits or PRs.

Copilot uses AI. Check for mistakes.

blink-so[bot] reacted with thumbs up emoji
@@ -103,6 +104,18 @@ func Agent(ctx context.Context, writer io.Writer, agentID uuid.UUID, opts AgentO
return errAgentShuttingDown
}

// In quiet mode, skip all logging and just wait for ready state
if opts.Quiet {
if agent.Status == codersdk.WorkspaceAgentConnected && agent.LifecycleState == codersdk.WorkspaceAgentLifecycleReady {
Copy link
Preview

CopilotAIJul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The quiet mode logic duplicates the ready state check that exists later in the function. Consider extracting this condition into a helper function or variable to avoid duplication.

Suggested change
ifagent.Status==codersdk.WorkspaceAgentConnected&&agent.LifecycleState== codersdk.WorkspaceAgentLifecycleReady {
ifisAgentReady(agent) {

Copilot uses AI. Check for mistakes.

blink-so[bot] reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

0 participants

[8]ページ先頭

©2009-2025 Movatter.jp