{
  "id": "src",
  "name": "Sourcegraph CLI",
  "homepage": "https://github.com/sourcegraph/src-cli",
  "description": "src is a command line interface to Sourcegraph: code search, GraphQL API requests and batch changes from the terminal.",
  "icon": "theSVG:sourcegraph",
  "executables": [
    "src"
  ],
  "dotfiles": {
    "paths": [
      "~/src-config.json"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false,
    "secret_paths": [
      {
        "file": "~/src-config.json",
        "match": {
          "key_path": [
            "accessToken",
            "additionalHeaders.*"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Sourcegraph CLI",
    "description": "Run a Sourcegraph code search from the terminal. Other src commands and credentials are left out.",
    "quality": "ai-draft",
    "base": "fig:src",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/src.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "search"
        ],
        "label": "Code search",
        "description": "Run a search query against the configured Sourcegraph instance.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/src.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "query",
            "label": "Query",
            "type": "string",
            "position": 0,
            "description": "The search query.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "json",
            "label": "JSON output",
            "type": "boolean",
            "option": [
              "-json"
            ],
            "description": "Output results as JSON.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "stream",
            "label": "Stream results",
            "type": "boolean",
            "option": [
              "-stream"
            ],
            "description": "Consume results as a stream.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "less",
            "label": "Pipe to less",
            "type": "boolean",
            "option": [
              "-less"
            ],
            "description": "Pipe output to less -R when on a terminal.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "trace",
            "label": "Log trace ID",
            "type": "boolean",
            "option": [
              "-trace"
            ],
            "description": "Log the trace ID for requests.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "explain_json",
            "label": "Explain JSON schema",
            "type": "boolean",
            "option": [
              "-explain-json"
            ],
            "description": "Explain the JSON output schema and exit.",
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "search",
            "label": "Search",
            "fields": [
              "query",
              "json",
              "stream"
            ],
            "required": [
              "query"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "query",
              "json",
              "stream",
              "less"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "trace",
              "explain_json"
            ]
          }
        ]
      }
    ]
  }
}
