-
-
Notifications
You must be signed in to change notification settings - Fork 5
Login
rhoopr edited this page May 18, 2026
·
3 revisions
Authenticate with iCloud and validate your session. It doesn't download anything.
# Interactive login - prompts for 2FA code
kei login
# Headless / Docker - two-step flow
kei login get-code
kei login submit-code 123456The account comes from [auth].username in the config file, or from ICLOUD_USERNAME for automation.
| Subcommand | Description |
|---|---|
| none | Authenticate interactively. Prompts for a 2FA code if needed. |
get-code |
Request a 2FA code be pushed to your trusted devices. |
submit-code <code> |
Submit a 6-digit 2FA code non-interactively. |
Running kei login without a subcommand handles SRP authentication, 2FA prompt, and session persistence. If the session is already valid, it exits immediately.
For Docker or cron environments where there's no TTY, split the flow into two steps:
- Run
kei login get-codeto trigger a 2FA push to trusted Apple devices. - Read the code, then run
kei login submit-code 123456.
The code accepts spaces and dashes, such as 123 456 or 123-456; only the 6 digits matter.
See Docker for the full headless setup workflow.
| Flag | Description |
|---|---|
--config |
Config file path |
-p, --password |
iCloud password |
--password-file |
Read password from a file |
--password-command |
Run a command to get the password |