Add device list command to ares-device CLI#9
Merged
Conversation
The Rust ares-device only resolved and printed a single device name; it had none of the original CLI's operations. Add the simplest of them, -D/--device-list, which prints the configured devices in the same columnar layout as the reference tool: name (with a "(default)" marker), deviceinfo (user@host:port), connection, profile and passphrase. https://claude.ai/code/session_017vAGzSSYNcgdQzJRLWfX47
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.
Summary
This PR adds a new
--device-listflag to the ares-device CLI that displays all available devices in a formatted table.Key Changes
-D, --device-listcommand-line argument to show available deviceslist_devices()function to retrieve and display devices from the DeviceManagerdevice_row()helper to format device information into table rowsprint_table()generic function to render left-aligned, space-padded tables with dashed header underlinesDevicetype from ares_device_lib--device-listflag is providedNotable Implementation Details
username@host:portin the deviceinfo columnprint_table()function is generic over the number of columns, automatically calculating column widths based on contenthttps://claude.ai/code/session_017vAGzSSYNcgdQzJRLWfX47