anchor.diff:  class Git { }
   ----
   
  +.Kotlin
  +[source,kotlin,role="secondary"]
  +----
  +import picocli.CommandLine.PropertiesDefaultProvider;
  +// ...
  +@Command(name = "git", defaultValueProvider = PropertiesDefaultProvider::class)
  +class Git { }
  +----
  +
   The above will try to load default values from `new File(System.getProperty("user.home"), ".git.properties")`.
   The location of the properties file can also be controlled with system property `"picocli.defaults.${COMMAND-NAME}.path"` (`"picocli.defaults.git.path"` in this example), in which case the value of the property must be the path to the file containing the default values.
   
   The location of the properties file may also be specified programmatically. For example:
   
  -[source,java]
  +.Java
  +[source,java,role="primary"]
   ----
   CommandLine cmd = new CommandLine(new MyCommand());
   File defaultsFile = new File("path/to/config/mycommand.properties");
   cmd.setDefaultValueProvider(new PropertiesDefaultProvider(defaultsFile));
   cmd.execute(args);
  +----
  +
  +.Kotlin
  +[source,kotlin,role="secondary"]
  +----
  +val cmd = CommandLine(MyCommand())
  +val defaultsFile = File("path/to/config/mycommand.properties")
  +cmd.defaultValueProvider = PropertiesDefaultProvider(defaultsFile)
  +cmd.execute(*args)
   ----
   
   ==== PropertiesDefaultProvider Format
  
positive.code: The recommended way to give an option or positional parameter a default value is to use the `defaultValue` annotation attribute. This works correctly with argument groups, `@Option` and `@Parameters`-annotated methods, and allows annotation processors to detect and use default values.
  
  For <<option-parameters-methods,@Option and @Parameters-annotated methods>> and <<command-methods,@Command-annotated methods>>, there is no alternative but to use the `defaultValue` annotation attribute. For example, for an annotated interface:
  [source,java]
  ----
  interface Spec {
      @Option(names = "-c", defaultValue = "123", description = "... ${DEFAULT-VALUE} ...")
      int count();
  }
  ----
  Example of using the `defaultValue` attribute in the option of a command method:
  [source,java]
  ----
  class CommandMethod {
      @Command(description = "Do something.")
  
negative.code: }
  ----
  
  .Kotlin
  [source,kotlin,role="secondary"]
  ----
  class CommandMethod {
      @Command(description = ["Do something."])
      fun doit(@Option(names = ["-c"], defaultValue = "123") count: Int) {
          // ...
      }
  }
  ----
  
  Note that you can use the `${DEFAULT-VALUE}` <<Predefined Variables,variable>> in the `description` of the option or positional parameter and picocli will <<Show Default Values,show>> the actual default value.
  
  
  === Field Values
  For annotated fields, it is possible to declare the field with a value:
  
  .Java
  [source,java,role="primary"]
  ----
  @Option(names = "-c", description = "The count (default: ${DEFAULT-VALUE})")
  int count = 123; // default value is 123
  ----
  
  .Kotlin
  [source,kotlin,role="secondary"]
  ----
  @Option(names = ["-c"], description = ["The count (default: \${DEFAULT-VALUE})"])
  var count = 123 // default value is 123
  ----
  
  [WARNING]
  