summaryrefslogtreecommitdiffstats
path: root/asciinema/commands/auth.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--asciinema/commands/auth.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/asciinema/commands/auth.py b/asciinema/commands/auth.py
new file mode 100644
index 0000000..1672e48
--- /dev/null
+++ b/asciinema/commands/auth.py
@@ -0,0 +1,20 @@
+from typing import Any, Dict
+
+from ..config import Config
+from .command import Command
+
+
+class AuthCommand(Command):
+ def __init__(self, args: Any, config: Config, env: Dict[str, str]) -> None:
+ Command.__init__(self, args, config, env)
+
+ def execute(self) -> None:
+ self.print(
+ f"Open the following URL in a web browser to link your install ID "
+ f"with your {self.api.hostname()} user account:\n\n"
+ f"{self.api.auth_url()}\n\n"
+ "This will associate all recordings uploaded from this machine "
+ "(past and future ones) to your account"
+ ", and allow you to manage them (change title/theme, delete) at "
+ f"{self.api.hostname()}."
+ )