copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Robust configuration management experience

Open andyfeller opened this issue 3 months ago • 2 comments

I’m not using a screen reader but I would suggest that when you first time start the “copilot” it provides an interactive dialog to prepare the configuration for the user in its home directory.

  • Then we can add a cli option to skip this initial setup behavior.
  • Add a cli option to define an alternative location for a config file.
  • Add a sub-command “config” which allows us to “show”, “option”, “get”, “set”, “locate”, “init” the configuration file. The options like “show”, … “init” should be sub-commands of “config”. The sub-command “option” should show for a given name (property) of an option the description out with the possible values and type (str, number, array, object) and with examples.
  • all cli options should be configureable via the configuration file, and when the cli commandline defines the same option from the configuration again then the cli option wins and takes advantage before the value from the configuration file.

it might be also possible to detect screen reader devices and automatically suggest to configure it when we start “copilot” the first time or when we connect a screen reader device after we done the setup already and didn’t set a option like “detect_screen_readers” to “false”.

I miss that we can configure the cli via the config and that I have to add always the cli options and have to create aliases etc.

Originally posted by @tobiashochguertel in #199

andyfeller avatar Oct 07 '25 18:10 andyfeller

  1. I’m not using a screen reader but I would suggest that when you first time start the “copilot” it provides an interactive dialog to prepare the configuration for the user in its home directory.

    I believe I saw a similar suggestion during early development especially because there is no existing convention for CLIs to detect users who rely upon screen readers across CLIs.

  2. Add a cli option to define an alternative location for a config file.

    GitHub Copilot CLI follows the XDG specification, which users can override where config / state / cache / and more by overriding the appropriate environment variable.

    For more information, run copilot help environment to see which variables are used.

  3. Add a sub-command “config” which allows us to “show”, “option”, “get”, “set”, “locate”, “init” the configuration file. The options like “show”, … “init” should be sub-commands of “config”. The sub-command “option” should show for a given name (property) of an option the description out with the possible values and type (str, number, array, object) and with examples.

    Which would be more impactful for you?

    1. Interactive /config slash command that lets you do this
    2. Non-interactive copilot config commandset that lets you do this
  4. all cli options should be configureable via the configuration file, and when the cli commandline defines the same option from the configuration again then the cli option wins and takes advantage before the value from the configuration file.

    I wholeheartedly agree.

    Typically, here is the order of precedence from highest to lowest I expect from a CLI:

    1. Command line flag or argument
    2. Environment variable
    3. Configuration setting
    4. Local context such as git repository
    5. Default
  5. it might be also possible to detect screen reader devices and automatically suggest to configure it when we start “copilot” the first time or when we connect a screen reader device after we done the setup already and didn’t set a option like “detect_screen_readers” to “false”.

    I would grateful for insight from others who have successfully developed such capability detection! Sadly, I have not come across any reliable and universal way to do so across the various open and closed source solutions used (NVDA, JAWS, Orca, VoiceOver, etc).

andyfeller avatar Oct 07 '25 18:10 andyfeller

Thoughts based on GitHub CLI experience

As a gh user, I appreciate the gh config commandset allows me to view supported configuration options, see what I have set, and allow me to change them appropriately. As a copilot user, I have no documentation about support configurations including valid options nor do I have any way in the copilot experience to change them; I have to manually modify ~/.copilot/config.json without introducing problems.

$ gh config --help
Display or change configuration settings for gh.

Current respected settings:
- `git_protocol`: the protocol to use for git clone and push operations `{https | ssh}` (default `https`)
- `editor`: the text editor program to use for authoring text
- `prompt`: toggle interactive prompting in the terminal `{enabled | disabled}` (default `enabled`)
- `prefer_editor_prompt`: toggle preference for editor-based interactive prompting in the terminal `{enabled | disabled}` (default `disabled`)
- `pager`: the terminal pager program to send standard output to
- `http_unix_socket`: the path to a Unix socket through which to make an HTTP connection
- `browser`: the web browser to use for opening URLs
- `color_labels`: whether to display labels using their RGB hex color codes in terminals that support truecolor `{enabled | disabled}` (default `disabled`)
- `accessible_colors`: whether customizable, 4-bit accessible colors should be used `{enabled | disabled}` (default `disabled`)
- `accessible_prompter`: whether an accessible prompter should be used `{enabled | disabled}` (default `disabled`)
- `spinner`: whether to use a animated spinner as a progress indicator `{enabled | disabled}` (default `enabled`)


USAGE
  gh config <command> [flags]

AVAILABLE COMMANDS
  clear-cache:   Clear the cli cache
  get:           Print the value of a given configuration key
  list:          Print a list of configuration keys and values
  set:           Update configuration with a value for the given key

INHERITED FLAGS
  --help   Show help for command

LEARN MORE
  Use `gh <command> <subcommand> --help` for more information about a command.
  Read the manual at https://cli.github.com/manual
  Learn about exit codes using `gh help exit-codes`
  Learn about accessibility experiences using `gh help accessibility`
$ gh config list
git_protocol=https
editor=
prompt=enabled
prefer_editor_prompt=disabled
pager=cat
http_unix_socket=
browser=
color_labels=disabled
accessible_colors=enabled
accessible_prompter=disabled
spinner=disabled

andyfeller avatar Nov 03 '25 18:11 andyfeller