{
  "id": "so",
  "name": "so",
  "homepage": "https://github.com/samtay/so",
  "description": "A terminal interface for Stack Overflow written in Rust.",
  "executables": [
    "so"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/so/config.yml",
      "~/.config/so/colors.toml",
      "[preferences]/io.Sam-Tay.so/config.yml",
      "[preferences]/io.Sam-Tay.so/colors.toml",
      "%APPDATA%/Sam Tay/so/config.yml",
      "%APPDATA%/Sam Tay/so/colors.toml"
    ],
    "secret": [],
    "secret_paths": [
      {
        "file": [
          "~/.config/so/config.yml",
          "[preferences]/io.Sam-Tay.so/config.yml",
          "%APPDATA%/Sam Tay/so/config.yml"
        ],
        "format": "yaml",
        "match": {
          "key_path": [
            "api_key"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Search Stack Exchange",
    "description": "Search one or more Stack Exchange sites from the terminal. Leaves out the list/update/config maintenance flags.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://raw.githubusercontent.com/samtay/so/HEAD/src/cli.rs",
        "revision": "HEAD 2026-10-27",
        "evidence": "$ so --site tex how to put tilde over character\n$ so -e google -s askubuntu -s stackoverflow -s unix how do i install linux\ncli.rs: Arg::new(\"site\") .long(\"site\") .short('s') -> --site, -s <site-code>  StackExchange site to search\ncli.rs: Arg::new(\"limit\") .long(\"limit\") .short('l') -> --limit, -l <int>  Question limit\ncli.rs: Arg::new(\"lucky\") .long(\"lucky\") -> --lucky  Print the top-voted answer of the most relevant question\ncli.rs: Arg::new(\"search-engine\") .long(\"search-engine\") .short('e') -> --search-engine, -e <engine>  [duckduckgo, google, stackexchange]  Use specified search engine"
      }
    ],
    "field": [
      {
        "id": "query",
        "label": "Query",
        "description": "The search words.",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "site",
        "label": "Site",
        "description": "Stack Exchange site code, for example stackoverflow or askubuntu. Repeat to search several.",
        "type": "string",
        "option": [
          "--site",
          "-s"
        ],
        "multiple": true,
        "suggestions": [
          {
            "value": "stackoverflow",
            "label": "Stack Overflow"
          },
          {
            "value": "askubuntu",
            "label": "Ask Ubuntu"
          },
          {
            "value": "unix",
            "label": "Unix & Linux"
          },
          {
            "value": "serverfault",
            "label": "Server Fault"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "engine",
        "label": "Search engine",
        "type": "enum",
        "option": [
          "--search-engine",
          "-e"
        ],
        "choices": [
          {
            "value": "duckduckgo",
            "label": "DuckDuckGo"
          },
          {
            "value": "google",
            "label": "Google"
          },
          {
            "value": "stackexchange",
            "label": "Stack Exchange"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "limit",
        "label": "Question limit",
        "type": "integer",
        "option": [
          "--limit",
          "-l"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "lucky",
        "label": "Lucky",
        "description": "Print the top-voted answer of the most relevant question.",
        "type": "boolean",
        "option": [
          "--lucky"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "search",
        "label": "Search",
        "fields": [
          "query",
          "site",
          "engine",
          "limit"
        ],
        "required": [
          "query"
        ]
      },
      {
        "id": "lucky",
        "label": "Top answer only",
        "set": {
          "lucky": [
            true
          ]
        },
        "fields": [
          "query",
          "site",
          "lucky"
        ],
        "required": [
          "query"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "query",
          "site",
          "lucky"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "engine",
          "limit"
        ]
      }
    ]
  }
}
