fix: improve sf nodes ssh documentation and specification#240
Merged
sigmachirality merged 8 commits intomainfrom Jan 21, 2026
Merged
fix: improve sf nodes ssh documentation and specification#240sigmachirality merged 8 commits intomainfrom
sf nodes ssh documentation and specification#240sigmachirality merged 8 commits intomainfrom
Conversation
- Remove redundant examples without user prefix from ssh.ts help text - Add root@ prefix to all remaining SSH examples in ssh.ts and index.ts - Ensures consistency with documentation and reduces user confusion Co-authored-by: danieltaox <danieltaox@gmail.com>
|
Cursor Agent can help with this pull request. Just |
Changed Files
|
Contributor
Greptile SummaryThis PR updates SSH command examples to consistently include username prefixes ( However, the changes introduce a documentation-code mismatch: while all examples now show a username as required, the actual implementation still supports optional usernames (lines 54-56 in ssh.ts allow single-part destinations without a username). This misleads users into thinking the username prefix is mandatory when it's actually optional. Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CLI as sf nodes ssh
participant Parser as Destination Parser
participant API as Node/VM API
participant SSH as SSH Client
User->>CLI: sf nodes ssh [root@]my-node
CLI->>Parser: Split destination by '@'
alt Username provided
Parser->>Parser: username = first part
Parser->>Parser: nodeOrVmId = second part
else No username provided
Parser->>Parser: username = undefined
Parser->>Parser: nodeOrVmId = full destination
end
Parser->>API: Fetch VM details (nodeOrVmId)
API-->>Parser: SSH hostname, port, host keys
Parser->>Parser: Build SSH destination
alt If username defined
Parser->>Parser: sshDestination = username@hostname:port
else No username
Parser->>Parser: sshDestination = hostname:port
end
Parser->>SSH: Execute ssh command
SSH-->>User: SSH session established
|
- Update argument descriptions to use root@HOST and root@VM_ID - Update vm list example output to show root@VM_ID - Ensures consistency across all SSH command documentation Co-authored-by: danieltaox <danieltaox@gmail.com>
- Change argument descriptions to use [user@]hostname format following SSH man page conventions - Keep root@ in actual examples (specific usage) - Aligns with standard SSH documentation patterns Co-authored-by: danieltaox <danieltaox@gmail.com>
sf nodes ssh documentation and specification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update SSH command examples to consistently include a user prefix and remove redundant examples.
Previously, some SSH examples omitted the username prefix, which could lead to confusion about the default user or encourage behavior inconsistent with best practices. This change ensures all examples explicitly show
root@(or<account>@) for clarity and consistency with documentation.