id = "so" name = "so" homepage = "https://github.com/samtay/so" description = "A terminal interface for Stack Overflow written in Rust." executables = ["so"] [dotfiles] # The upstream README documents the per-user config directory on Linux, # macOS, and Windows and names config.yml plus colors.toml in that directory. # https://github.com/samtay/so#configuration 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 = [] # `api_key` is the optional Stack Exchange API key stored in config.yml; # keep the preference file while excluding this credential from content sync. [[dotfiles.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 } [[commands.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 $ so -e google -s askubuntu -s stackoverflow -s unix how do i install linux cli.rs: Arg::new("site") .long("site") .short('s') -> --site, -s StackExchange site to search cli.rs: Arg::new("limit") .long("limit") .short('l') -> --limit, -l Question limit cli.rs: Arg::new("lucky") .long("lucky") -> --lucky Print the top-voted answer of the most relevant question cli.rs: Arg::new("search-engine") .long("search-engine") .short('e') -> --search-engine, -e [duckduckgo, google, stackexchange] Use specified search engine""" [[commands.field]] id = "query" label = "Query" description = "The search words." type = "string" position = 0 multiple = true sources = ["help"] [[commands.field]] 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"] [[commands.field]] 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"] [[commands.field]] id = "limit" label = "Question limit" type = "integer" option = ["--limit", "-l"] sources = ["help"] [[commands.field]] id = "lucky" label = "Lucky" description = "Print the top-voted answer of the most relevant question." type = "boolean" option = ["--lucky"] sources = ["help"] [[commands.task]] id = "search" label = "Search" fields = ["query", "site", "engine", "limit"] required = ["query"] [[commands.task]] id = "lucky" label = "Top answer only" set = { lucky = [true] } fields = ["query", "site", "lucky"] required = ["query"] [[commands.group]] id = "basic" label = "Basic" fields = ["query", "site", "lucky"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["engine", "limit"]