Skip to content

improve help message for profile copy command #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions src/planet_auth_utils/commands/cli/profile_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,13 @@ def cmd_profile_edit():
raise AuthException("Function not implemented")


@cmd_profile.command("copy")
# Separte help since the docstring here is developer oriented, not user oriented.
@cmd_profile.command(
"copy",
help="Copy an existing profile to create a new profile. Only the persistent"
" profile configuration will be copied. User access tokens initialized"
" via a call to `login` will not be copied.",
)
@click.argument("src")
@click.argument("dst")
@opt_sops()
Expand All @@ -228,18 +234,20 @@ def cmd_profile_copy(sops, src, dst):
"""
Copy an existing profile to create a new profile. Only the persistent
profile configuration will be copied. User access tokens initialized
via a call to `login` will not be copied. Note: Depending on the
type of [planet_auth.AuthClient] configured in the source profile,
the new profile may have long term credentials (e.g. OAuth
client credential secrets, API keys. etc.). External support files,
such as public/private keypair files, are not copied.
via a call to `login` will not be copied.

Note: Depending on the type of [planet_auth.AuthClient] configured in
the source profile, the new profile may have long term credentials
(e.g. OAuth client credential secrets, API keys. etc.).

Note: External support files, such as public/private keypair files,
are not copied.

This command will work with built-in as well as custom profiles,
so it is possible to bootstrap profiles to manage multiple user
identities with an otherwise default client profile:
```
profile copy default <my_new_profile>
profile copy legacy <my_new_profile>
profile copy my_app_builtin_default <my_new_profile>
```

"""
Expand Down