You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support listing the discovered devices using the cli #8007
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
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?
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.
@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.
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.
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!
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.
changed the title [-]Request: support listing the discovered devices using the cli[/-][+]Support listing the discovered devices using the cli[/+]on Jul 26, 2022
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Activity
AudriusButkevicius commentedon Oct 19, 2021
That is discovery packets observed over time, so this would only be accessible from the running instance I guess.
acolomb commentedon Oct 19, 2021
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.
jwatt commentedon Oct 19, 2021
That's correct. :-)
AudriusButkevicius commentedon Oct 19, 2021
I guess I just don't see how this is generally useful.
Seems like a niche request for which rest doesn't sound crazy?
acolomb commentedon Oct 19, 2021
@jwatt what's your use case around this? Any specific reason why
curlwouldn't cut it?imsodin commentedon Oct 19, 2021
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.
jwatt commentedon Oct 20, 2021
Since I'm just a user, I looked at the intro docs and user docs, didn't find a solution there, then discovering the
clicommand viasyncthing -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.
acolomb commentedon Oct 20, 2021
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.
jwatt commentedon Nov 18, 2021
@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!
jwatt commentedon Nov 25, 2021
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.
cli: Add show disovery command (fixes syncthing#8007)
cli: Changed description of disovery command (fixes syncthing#8007)
cmd/syncthing/cli: Add show discovery command (fixes #8007) (#8378)
Merge branch 'main' into owners2
[-]Request: support listing the discovered devices using the cli[/-][+]Support listing the discovered devices using the cli[/+]Merge branch 'main' into xattr