{
  "id": "ghorg",
  "name": "ghorg",
  "homepage": "https://github.com/gabrie30/ghorg",
  "description": "A command-line utility to clone all repositories belonging to a GitHub organization.",
  "executables": [
    "ghorg"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/ghorg/ghorgignore"
    ],
    "secret": [
      "[configHome]/ghorg/conf.yaml"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Clone an organization",
    "description": "Clone every repository of an organization, group or user. Tokens are deliberately not a field; keep them in the ghorg config or the environment.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "clone"
        ],
        "label": "Clone all repositories of an owner",
        "source": [
          {
            "id": "readme",
            "kind": "help",
            "url": "https://github.com/gabrie30/ghorg#how-to-use",
            "revision": "2026-10-27",
            "evidence": "$ ghorg clone davecheney --clone-type=user --token=<token>\n$ ghorg clone gitlab-examples --scm=gitlab --preserve-dir --token=<token>\n$ ghorg clone all-groups --scm=gitlab --base-url=https://gitlab.internal.yourcompany.com --preserve-dir\n$ ghorg clone kubernetes --path=/tmp/ghorg\n$ ghorg clone kubernetes --match-regex=^sig- --output-dir=kubernetes-sig-only\nSkip archived repos: use `--skip-archived`\nSkip forked repos: use `--skip-forks`\nghorg clone kubernetes --backup --clone-wiki --include-submodules\nUse the `--concurrency` flag\n"
          }
        ],
        "field": [
          {
            "id": "owner",
            "label": "Organization, group or user",
            "type": "string",
            "position": 0,
            "sources": [
              "readme"
            ]
          },
          {
            "id": "scm",
            "label": "Hosting service",
            "type": "string",
            "option": [
              "--scm"
            ],
            "suggestions": [
              {
                "value": "gitlab",
                "label": "GitLab"
              }
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "clone_type",
            "label": "Owner type",
            "type": "string",
            "option": [
              "--clone-type"
            ],
            "suggestions": [
              {
                "value": "user",
                "label": "User"
              }
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "base_url",
            "label": "Self-hosted base URL",
            "type": "url",
            "option": [
              "--base-url"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "path",
            "label": "Clone into (absolute path)",
            "type": "path",
            "option": [
              "--path"
            ],
            "path": {
              "kind": "directory",
              "role": "output",
              "must_exist": false
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "output_dir",
            "label": "Output directory name",
            "type": "string",
            "option": [
              "--output-dir"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "match_regex",
            "label": "Only repositories matching regex",
            "type": "string",
            "option": [
              "--match-regex"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "skip_archived",
            "label": "Skip archived",
            "type": "boolean",
            "option": [
              "--skip-archived"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "skip_forks",
            "label": "Skip forks",
            "type": "boolean",
            "option": [
              "--skip-forks"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "preserve_dir",
            "label": "Preserve directory structure",
            "type": "boolean",
            "option": [
              "--preserve-dir"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "backup",
            "label": "Mirror backup",
            "type": "boolean",
            "option": [
              "--backup"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "concurrency",
            "label": "Concurrent clones",
            "type": "integer",
            "option": [
              "--concurrency"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "clone",
            "label": "Clone an organization",
            "fields": [
              "owner",
              "path",
              "skip_archived",
              "skip_forks"
            ],
            "required": [
              "owner"
            ]
          },
          {
            "id": "backup",
            "label": "Mirror backup",
            "set": {
              "backup": [
                true
              ]
            },
            "lock": [
              "backup"
            ],
            "fields": [
              "owner",
              "path",
              "skip_archived"
            ],
            "required": [
              "owner"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "owner",
              "scm",
              "clone_type",
              "path",
              "skip_archived",
              "skip_forks"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "base_url",
              "output_dir",
              "match_regex",
              "preserve_dir",
              "backup",
              "concurrency"
            ]
          }
        ]
      }
    ]
  }
}
