Skip to content

Support listing the discovered devices using the cli #8007

Closed

Description

@jwatt

When you click on "Add Remote Device" in the web GUI, it displays a list of discovered devices on the local network that can be added. As far as I can tell there is no equivalent for syncthing cli. Perhaps syncthing cli show connections could be made to support an optional --show-discovered argument?

Activity

  1. added
    enhancement
    needs-triage
    on Oct 18, 2021
  2. AudriusButkevicius commented on Oct 19, 2021

    @AudriusButkevicius
    Member

    That is discovery packets observed over time, so this would only be accessible from the running instance I guess.

  3. acolomb commented on Oct 19, 2021

    @acolomb
    Member

    Well the data is already available over the REST API: https://docs.syncthing.net/rest/system-discovery-get.html
    I think the request is about making it easier to access through the cli command.

  4. jwatt commented on Oct 19, 2021

    @jwatt
    Author

    I think the request is about making it easier to access through the cli command.

    That's correct. :-)

  5. AudriusButkevicius commented on Oct 19, 2021

    @AudriusButkevicius
    Member

    I guess I just don't see how this is generally useful.
    Seems like a niche request for which rest doesn't sound crazy?

  6. acolomb commented on Oct 19, 2021

    @acolomb
    Member

    @jwatt what's your use case around this? Any specific reason why curl wouldn't cut it?

  7. imsodin commented on Oct 19, 2021

    @imsodin
    Member

    Do we really need to discuss anything here? We have a cli, this is an operation that exists in our API, it wouldn't hurt to have it, at least someone wants it -> lets keep it as a feature request. If we get a ton of such requests, we can create an umbrella ticket "Implement rest api methods in the cli" and redirect new issues to that - but I don't see that happening for now.

  8. jwatt commented on Oct 20, 2021

    @jwatt
    Author

    @jwatt what's your use case around this? Any specific reason why curl wouldn't cut it?

    Since I'm just a user, I looked at the intro docs and user docs, didn't find a solution there, then discovering the cli command via syncthing -h. The REST docs are collapsed under the "Development" section of the documentation on the website, so I wasn't even aware there was a REST API. (I don't consider my basic initial setup task to be "development".)

    In addition to not being super obvious/discoverable for a beginner user, the REST/curl-based solution doesn't have great ergonomics, either in construction of the command line (there's no command auto-completion, so you have to: find, open and grok the REST docs...copy and paste the curl command and HTTP header from the docs...open the config file and copy and paste the apikey...identify then copy and paste the relevant endpoint from the docs), or great ergonomics in the necessity for parsing of JSON if the user is creating their own setup script.

    It also raises the technical barrier for CLI users who aren't familiar with REST/curl.

    For an inexperienced first-time Syncthing user trying to get through the initial setup and needing some very basic information (the device ID of the other machine on my LAN), the above friction seems a bit rough. If I was trying to fiddle with some obscure configuration as a more experienced user that would be a different thing.

    Anyway, just trying to provide insight into my first-time user experience in the hopes you guys can use it to make Syncthing even more approachable and awesome. Make of it what you will. :-) Thanks for your contributions, regardless of the outcome here.

  9. acolomb commented on Oct 20, 2021

    @acolomb
    Member

    Yeah, that complexity is roughly appropriate for something in the "development" chapter. Users are expected to use the web UI, that is much simpler.

    Out of curiousity, what would you do on the command line after getting the the discovered ID? Probably also use the cli to add the device? Is that the level of complexity you'd be comfortable with? Note that the CLI is pretty young and not a central design part, as maybe with Git or Docker.

  10. jwatt commented on Nov 18, 2021

    @jwatt
    Author

    @acolomb Sorry, I missed your reply.

    Yes, I would then like to use the cli to add the device, I think. I should actually run through a full setup though and get back to you if there's other unavailable functionality that would seem to make sense. I've just been a bit busy but I'll try to get around to that soon and let you know!

  11. jwatt commented on Nov 25, 2021

    @jwatt
    Author

    To follow-up on the above, the main issue for me is lack of CLI support for making settings changes to existing devices and folders. (For example, to pause a folder.) I've filed #8060 to track that.

  12. removed
    needs-triage
    on Jan 30, 2022
  13. added 2 commits that reference this issue on Jun 7, 2022
    fee9b9b
    c8de7c1
  14. added a commit that references this issue on Jul 13, 2022
    4335285
  15. added a commit that references this issue on Jul 21, 2022
    013b29e
  16. added this to the v1.20.4 milestone on Jul 26, 2022
  17. changed the title [-]Request: support listing the discovered devices using the cli[/-] [+]Support listing the discovered devices using the cli[/+] on Jul 26, 2022
  18. added a commit that references this issue on Jul 28, 2022
    da3fe7a
  19. added
    frozen-due-to-age
    on Jul 14, 2023
  20. locked and limited conversation to collaborators on Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions