{
  "options": [
    { "arg": "-f, --fail-fast", "desc": "Exit as soon as any command failure" },
    {
      "arg": "-v, --verbose",
      "desc": "Print executed commands (for debugging"
    },
    { "arg": "-c, --config-file <configFile>", "desc": "Configuration file" },
    {
      "arg": "-t, --tags <tags>",
      "desc": "Comma-separated tags filter, to be matched against repo tags"
    },
    {
      "arg": "-r, --regex <regex>",
      "desc": "Regular expression filter, to be matched against repo name and URL"
    }
  ],
  "commands": {
    "config": {
      "desc": "Create configuration file",
      "options": [
        {
          "arg": "--bitbucket-auth-user <bitbucketAuthUser>",
          "desc": "Bitbucket authentication username"
        },
        {
          "arg": "--bitbucket-auth-pass <bitbucketAuthPass>",
          "desc": "Bitbucket authentication password"
        },
        {
          "arg": "--github-user <githubUser>",
          "desc": "Comma-separated GitHub usernames"
        },
        {
          "arg": "--github-org <githubOrg>",
          "desc": "Comma-separated GitHub organisations"
        },
        {
          "arg": "--github-auth-user <githubAuthUser>",
          "desc": "GitHub authentication username"
        },
        {
          "arg": "--github-auth-pass <githubAuthPass>",
          "desc": "GitHub authentication password"
        },
        {
          "arg": "--github-use-ssh",
          "desc": "Use the ssh url from Github instead of the standard clone url where possible"
        },
        {
          "arg": "--local",
          "desc": "Create configuration file from local repositories"
        },
        {
          "arg": "--remove-extraneous",
          "desc": "Will remove any repos found in the config that are not found in the source (org, user, local, etc)"
        }
      ],
      "examples": [
        "repoman config --github-user <user>",
        "repoman config --github-org <org>",
        "repoman config --local"
      ]
    },
    "add": {
      "desc": "Add a repository to the repoman configuration and clone it",
      "options": [
        {
          "arg": "--type <type>",
          "desc": "Type of the repository, git or svn"
        },
        {
          "arg": "--repository-name <name>",
          "desc": "Name of the repository (will become the key in configuration file and the local directory name)"
        },
        { "arg": "--name <name>", "desc": "Alias for --repository-name" },
        { "arg": "--url <url>", "desc": "Remote URL of the repository" }
      ],
      "examples": [
        "repoman add --name my-awesome-project --url git@github.com:basti1302/my-awesome-project.git"
      ]
    },
    "remove": {
      "desc": "Remove a single repository from the configuration and from disk",
      "options": [
        {
          "arg": "--repository-name <name>",
          "desc": "Name of the repository (the key in configuration file and the local directory name)"
        },
        { "arg": "--name <name>", "desc": "Alias for --repository-name" },
        { "arg": "--force", "desc": "Do not ask for confirmation" }
      ],
      "examples": ["repoman remove --name my-awesome-project"]
    },
    "init": {
      "desc": "Initialise local repositories"
    },
    "get": {
      "desc": "Update local repositories with changes from remote repositories"
    },
    "changes": {
      "desc": "Display the changes in local repositories"
    },
    "report": {
      "desc": "Display a brief status summary for each repository"
    },
    "save": {
      "desc": "Update remote repositories with changes from local repositories"
    },
    "undo": {
      "desc": "Remove uncommitted changes from local repositories"
    },
    "exec": {
      "desc": "Execute custom command against local repositories",
      "args": [{ "name": "command", "rules": ["required"] }],
      "examples": [
        "repoman exec 'touch .gitignore; echo \"Created {{{workspace}}}/{{{name}}}/.gitignore file;\"'",
        "repoman --fail-fast exec 'chown -R user:group /some/path/{{{name}}}';"
      ]
    },
    "list": {
      "desc": "Display a list of repository names"
    },
    "clean": {
      "desc": "Delete non-Repoman local repositories"
    },
    "signin": {
      "desc": "Auth repoman to Github user account, useful to also fetch private repos with 'repoman config --github-org <org>' when 2FA is activated."
    }
  }
}
