click v8 now integrates shell completion: https://click.palletsprojects.com/en/8.0.x/shell-completion