# gh-autoswitch config (YAML) # # Copy to: # Windows : %APPDATA%\gh-autoswitch\config.yml # Linux/macOS : ${XDG_CONFIG_HOME:-~/.config}/gh-autoswitch/config.yml # or point $GH_AUTOSWITCH_CONFIG at it. Easiest: run `gh-autoswitch` (the TUI). # Path to the `gh` executable (the credential manager). Inferred automatically # on `gh-autoswitch install`, or press `g` in the TUI to detect it. gh_path: C:\Program Files\GitHub CLI\gh.exe # Fallback account to switch to when no mapping below matches the remote's # host/owner (any host). Omit to leave the active account unchanged on no match. # Set it in the TUI with `D`. default_account: alice_personal # host/owner -> account mappings. `owner` may be: # * an exact org/user name (case-insensitive), # * a regular expression (e.g. "org1|org2" or "acme-.*"), matched fully and # case-insensitively, or # * "*" — a per-host catch-all default. # # Precedence: exact name > regex > per-host "*" > default_account. mappings: - host: github.com owner: acme-corp account: alice_work # One account shared by several orgs via a regex: - host: github.com owner: "acme-.*|widgets-inc|contoso" account: alice_work - host: github.com owner: alice account: alice_personal - host: github.com owner: "*" account: alice_personal # GitHub Enterprise example: # - host: ghe.corp.example.com # owner: "*" # account: alice_corp