Skip to content

CLI support for making settings changes to existing devices and folders #8060

Closed

Description

@jwatt

From the output of syncthing cli config devices -h and syncthing cli config folders -h it seems that it's possible to add devices and folders, respectively. It does not seem to be possible to change them once added though. It would be helpful if along with the add command there was a modify command that took the same options.

Activity

  1. added
    enhancement
    needs-triage
    on Nov 25, 2021
  2. jwatt commented on Nov 25, 2021

    @jwatt
    Author

    Oh, I just realized that syncthing cli config folders add doesn't support sharing the folder so while a new modify command would be progress it wouldn't get me all the way there.

  3. acolomb commented on Nov 25, 2021

    @acolomb
    Member

    Would something like this help you?

    syncthing cli config folders abcde-fghij devices add 3LT2GA5-CQI4XJM-WTZ264P-MLOGMHL-MCRLDNT-MZV4RD3-KA745CL-OGAERQZ

    Please use the forum for such requests, until it is clear that Syncthing really definitely does not provide any way to serve your need.

  4. imsodin commented on Nov 25, 2021

    @imsodin
    Member

    That's already possible, e.g. syncthing cli config folders <folder-id> label set <label>.

  5. jwatt commented on Nov 25, 2021

    @jwatt
    Author

    Ah, thank you both.

    In that case I guess the real issue for me is that the help text was confusing.

    $ syncthing cli config folders -h
    NAME:
       syncthing cli config folders - 
    
    USAGE:
       syncthing cli config folders command [command options] [arguments...]
    
    COMMANDS:
    
       ACTIONS:
         list      List item keys in the collection
         add       Add a new item to collection
         add-json  Add a new item to collection deserialised from JSON
    
       ITEMS:
         default  
    
    OPTIONS:
       --help, -h  show help
    

    Bear with me for the following, because it may at first seem like I was being overly sloppy but I think there's an underlying issue that's worth bringing up.

    The natural way to read the above help text is to focus first on the USAGE line and see that it takes command [command options]. As most people would -- I'm guessing(!) -- I then skipped my eyes down to find the commands, which look to be list, add and add-json. To my mind, the ITEMS section "clearly" didn't contain commands since the names of items aren't "commands" in the normally understood sense of that word. I assumed that section was providing extra information I might need to pass to the commands listed above the ITEMS section.

    Of course, if I'd read slowly and very methodically, I'd have noticed the indenting under COMMANDS and realized that "command" was being used in an unusual way. I think most people use mental heuristics to filter and skip what they read though, so you may find this misunderstanding to be a recurring theme in future as the cli becomes more popular.

  6. jwatt commented on Nov 25, 2021

    @jwatt
    Author

    I'm not sure what might reduce the chances of people misreading the help text, but maybe the following?:

    $ syncthing cli config folders -h
    NAME:
       syncthing cli config folders - 
    
    USAGE:
       syncthing cli config folders action-or-item [options] [arguments...]
    
    ACTIONS:
      list      List item keys in the collection
      add       Add a new item to collection
      add-json  Add a new item to collection deserialised from JSON
    
    ITEMS:
      default  
    
    OPTIONS:
       --help, -h  show help
    

    Again, just my 2c from a new user offering my first time experience in the hope it's helpful. Thanks for your previous replies and work on Syncthing.

    I'd be happy to provide a pull request if you're amenable to changing the help text. (I'm aware that may involve changing the text for other commands for consistency.)

  7. added
    frozen-due-to-age
    on Mar 10, 2023
  8. locked and limited conversation to collaborators on Mar 10, 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-ageneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions