Skip to content

Allow configuration using a file. #512

Open

Description

@rsb-23

What would you like to happen?

Instead of passing multiple args to cli, the tool checks for args from gh_config.cfg or any similar format.

So, either one of these works..

github-backup USER
github-backup --from-config
github-backup

Activity

  1. Changaco commented on May 4, 2026

    @Changaco
    Contributor

    I think that's probably a bad idea. Configuration files are somewhat simpler from a user point of view, but they significantly increase the complexity of a program. If Python provided a standard and unified way to read options from multiple sources (command line arguments, environment variables, configuration files), then it might be fine to support all those sources, but since there is no such standard, it's probably better to avoid the extra complexity.

    I recommend saving your github-backup commands in a shell script instead. It's what I do.

  2. rsb-23 commented on May 4, 2026

    @rsb-23
    Author

    Seems fair.
    Also, can be a good addition too.

    Will check if there is any unified way to achieve this.

  3. Iamrodos commented on Jul 29, 2026

    @Iamrodos
    Contributor

    @rsb-23 are you still interested in this?

    I too would lean on a shell script (which I do in my use). However, argparse natively supports config files via fromfile_prefix_chars, that'd give you github-backup @myconfig without any new packages, which this project has traditionally avoided.

    You want to look at that?

  4. rsb-23 commented on Jul 29, 2026

    @rsb-23
    Author

    @rsb-23 are you still interested in this?

    You want to look at that?

    Yes, this seems interesting will look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions