github.com/artpar/rclone@v1.67.3/docs/content/commands/rclone_config_create.md (about)

     1  ---
     2  title: "rclone config create"
     3  description: "Create a new remote with name, type and options."
     4  slug: rclone_config_create
     5  url: /commands/rclone_config_create/
     6  versionIntroduced: v1.39
     7  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/config/create/ and as part of making a release run "make commanddocs"
     8  ---
     9  # rclone config create
    10  
    11  Create a new remote with name, type and options.
    12  
    13  ## Synopsis
    14  
    15  
    16  Create a new remote of `name` with `type` and options.  The options
    17  should be passed in pairs of `key` `value` or as `key=value`.
    18  
    19  For example, to make a swift remote of name myremote using auto config
    20  you would do:
    21  
    22      rclone config create myremote swift env_auth true
    23      rclone config create myremote swift env_auth=true
    24  
    25  So for example if you wanted to configure a Google Drive remote but
    26  using remote authorization you would do this:
    27  
    28      rclone config create mydrive drive config_is_local=false
    29  
    30  Note that if the config process would normally ask a question the
    31  default is taken (unless `--non-interactive` is used).  Each time
    32  that happens rclone will print or DEBUG a message saying how to
    33  affect the value taken.
    34  
    35  If any of the parameters passed is a password field, then rclone will
    36  automatically obscure them if they aren't already obscured before
    37  putting them in the config file.
    38  
    39  **NB** If the password parameter is 22 characters or longer and
    40  consists only of base64 characters then rclone can get confused about
    41  whether the password is already obscured or not and put unobscured
    42  passwords into the config file. If you want to be 100% certain that
    43  the passwords get obscured then use the `--obscure` flag, or if you
    44  are 100% certain you are already passing obscured passwords then use
    45  `--no-obscure`.  You can also set obscured passwords using the
    46  `rclone config password` command.
    47  
    48  The flag `--non-interactive` is for use by applications that wish to
    49  configure rclone themselves, rather than using rclone's text based
    50  configuration questions. If this flag is set, and rclone needs to ask
    51  the user a question, a JSON blob will be returned with the question in
    52  it.
    53  
    54  This will look something like (some irrelevant detail removed):
    55  
    56  ```
    57  {
    58      "State": "*oauth-islocal,teamdrive,,",
    59      "Option": {
    60          "Name": "config_is_local",
    61          "Help": "Use web browser to automatically authenticate rclone with remote?\n * Say Y if the machine running rclone has a web browser you can use\n * Say N if running rclone on a (remote) machine without web browser access\nIf not sure try Y. If Y failed, try N.\n",
    62          "Default": true,
    63          "Examples": [
    64              {
    65                  "Value": "true",
    66                  "Help": "Yes"
    67              },
    68              {
    69                  "Value": "false",
    70                  "Help": "No"
    71              }
    72          ],
    73          "Required": false,
    74          "IsPassword": false,
    75          "Type": "bool",
    76          "Exclusive": true,
    77      },
    78      "Error": "",
    79  }
    80  ```
    81  
    82  The format of `Option` is the same as returned by `rclone config
    83  providers`. The question should be asked to the user and returned to
    84  rclone as the `--result` option along with the `--state` parameter.
    85  
    86  The keys of `Option` are used as follows:
    87  
    88  - `Name` - name of variable - show to user
    89  - `Help` - help text. Hard wrapped at 80 chars. Any URLs should be clicky.
    90  - `Default` - default value - return this if the user just wants the default.
    91  - `Examples` - the user should be able to choose one of these
    92  - `Required` - the value should be non-empty
    93  - `IsPassword` - the value is a password and should be edited as such
    94  - `Type` - type of value, eg `bool`, `string`, `int` and others
    95  - `Exclusive` - if set no free-form entry allowed only the `Examples`
    96  - Irrelevant keys `Provider`, `ShortOpt`, `Hide`, `NoPrefix`, `Advanced`
    97  
    98  If `Error` is set then it should be shown to the user at the same
    99  time as the question.
   100  
   101      rclone config update name --continue --state "*oauth-islocal,teamdrive,," --result "true"
   102  
   103  Note that when using `--continue` all passwords should be passed in
   104  the clear (not obscured). Any default config values should be passed
   105  in with each invocation of `--continue`.
   106  
   107  At the end of the non interactive process, rclone will return a result
   108  with `State` as empty string.
   109  
   110  If `--all` is passed then rclone will ask all the config questions,
   111  not just the post config questions. Any parameters are used as
   112  defaults for questions as usual.
   113  
   114  Note that `bin/config.py` in the rclone source implements this protocol
   115  as a readable demonstration.
   116  
   117  
   118  ```
   119  rclone config create name type [key value]* [flags]
   120  ```
   121  
   122  ## Options
   123  
   124  ```
   125        --all               Ask the full set of config questions
   126        --continue          Continue the configuration process with an answer
   127    -h, --help              help for create
   128        --no-obscure        Force any passwords not to be obscured
   129        --non-interactive   Don't interact with user and return questions
   130        --obscure           Force any passwords to be obscured
   131        --result string     Result - use with --continue
   132        --state string      State - use with --continue
   133  ```
   134  
   135  
   136  See the [global flags page](/flags/) for global options not listed here.
   137  
   138  # SEE ALSO
   139  
   140  * [rclone config](/commands/rclone_config/)	 - Enter an interactive configuration session.
   141