Add ares-setup-device (non-interactive device management)#10
Merged
Conversation
Port the ares-setup-device command from webos-tools/cli as a new workspace crate. This first cut covers the non-interactive (scriptable) operations; interactive prompts and SSDP --search are intentionally deferred. Commands: --list, --listfull, --add, --modify, --remove, --default, --reset. --add/--modify take device details via --info, accepting either a JSON object or repeated key=value pairs (with ipAddress/user aliases), and choose password vs ssh-key auth based on what is provided. Validation mirrors the reference CLI (name must not start with $/%, host must be localhost or IPv4, port 1-65535). The list output matches the reference table layout (name/deviceinfo/connection/profile/passphrase). Supporting data-layer additions in common/device: - DeviceManager::modify replaces an existing device in place - DeviceManager::reset restores the bundled default emulator entry - add now rejects duplicate names; remove refuses indelible devices https://claude.ai/code/session_017vAGzSSYNcgdQzJRLWfX47
Port the key-retrieval part of ares-novacom as a new crate. With --getkey it downloads the device's webos_rsa private key (the existing DeviceManager::novacom_getkey, which fetches http://<host>:9991/webos_rsa and verifies the passphrase), saves it to ~/.ssh/webos_<device> with 0600 permissions, and wires it into the device config: privateKey, passphrase, and the webOS dev-mode defaults prisoner@<host>:9922. The --passphrase flag supplies the code shown in the device's Developer Mode app (no interactive prompt in this first cut). Expose DeviceManager::ssh_key_dir so the binary can resolve the key directory. 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.
Port the ares-setup-device command from webos-tools/cli as a new
workspace crate. This first cut covers the non-interactive (scriptable)
operations; interactive prompts and SSDP --search are intentionally
deferred.
Commands: --list, --listfull, --add, --modify, --remove, --default,
--reset. --add/--modify take device details via --info, accepting either
a JSON object or repeated key=value pairs (with ipAddress/user aliases),
and choose password vs ssh-key auth based on what is provided.
Validation mirrors the reference CLI (name must not start with $/%, host
must be localhost or IPv4, port 1-65535). The list output matches the
reference table layout (name/deviceinfo/connection/profile/passphrase).
Supporting data-layer additions in common/device:
https://claude.ai/code/session_017vAGzSSYNcgdQzJRLWfX47