ycli auth¶
Inspect and obtain Yandex 360 credentials.
Usage:
$ ycli auth [OPTIONS] COMMAND [ARGS]...
Options:
--help: Show this message and exit.
Commands:
status: Report whether the credentials are set,...login: Obtain a Yandex OAuth token + organization...profiles: List the saved profiles: name,...
ycli auth status¶
Report whether the credentials are set, whose they are, and which services accept them.
The credentials are the active profile's (--profile / YCLI_PROFILE), else the
environment's. The owner comes from Yandex ID, the organization name from API 360, and each
service is probed with its own call. ycli <service> auth status probes just one service.
Usage:
$ ycli auth status [OPTIONS]
Options:
-o, --format [auto|json|yaml|pretty|csv|markdown|ndjson|name]: Output format (auto = pretty on a TTY, JSON when piped).-y, --yes: Do not ask before an operation that deletes data or grants access.--dry-run: Do not send a write: print the request it would send instead. Reads still run, and only the first write of a command is shown. A secret in the body (a password, a token) is printed as ***.--profile NAME: Use the credentials saved as this profile (YCLI_PROFILE); the environment's and .env's are then not read.ycli auth profileslists them.-F, --field TEXT: Set any field of the request body: key=value, key[sub]=value for a nested one (JSON-coerced; repeatable). key=@FILE (@- for stdin) gives the file's text as it is; a string that starts with @ goes in JSON quotes ('text="@ivan"'). A flag of the command wins over it. Objects merge; a list replaces the one below it. Give a secret from a file, not typed here: a command line stays in the shell history. Write that file with no line break at its end (printf %s 'secret' > file), or the break goes out with the secret.--body-file FILE: A JSON object (YAML in a .yaml / .yml file) laid under the request body: -F and the command's flags win over it. Objects merge; a list is replaced, not added to. YAML guesses types (no, 1.10): quote a value meant as text.--help: Show this message and exit.
ycli auth login¶
Obtain a Yandex OAuth token + organization id and save them to .env.
With --profile NAME they are saved as that profile instead, in the user's configuration
directory (ycli auth profiles lists them).
Uses your own OAuth app (YANDEX_OAUTH_CLIENT_ID / YANDEX_OAUTH_CLIENT_SECRET): the headless device flow when both are set, otherwise the browser paste (implicit) flow. The token is validated against every service before it is written.
Usage:
$ ycli auth login [OPTIONS]
Options:
--implicit: Use the browser paste flow even if a client secret is set.-y, --yes: Write .env without asking to confirm.--device-name TEXT: Label shown for this device during OAuth approval.-o, --format [auto|json|yaml|pretty|csv|markdown|ndjson|name]: Output format (auto = pretty on a TTY, JSON when piped).--dry-run: Do not send a write: print the request it would send instead. Reads still run, and only the first write of a command is shown. A secret in the body (a password, a token) is printed as ***.--profile NAME: Use the credentials saved as this profile (YCLI_PROFILE); the environment's and .env's are then not read.ycli auth profileslists them.-F, --field TEXT: Set any field of the request body: key=value, key[sub]=value for a nested one (JSON-coerced; repeatable). key=@FILE (@- for stdin) gives the file's text as it is; a string that starts with @ goes in JSON quotes ('text="@ivan"'). A flag of the command wins over it. Objects merge; a list replaces the one below it. Give a secret from a file, not typed here: a command line stays in the shell history. Write that file with no line break at its end (printf %s 'secret' > file), or the break goes out with the secret.--body-file FILE: A JSON object (YAML in a .yaml / .yml file) laid under the request body: -F and the command's flags win over it. Objects merge; a list is replaced, not added to. YAML guesses types (no, 1.10): quote a value meant as text.--help: Show this message and exit.
ycli auth profiles¶
List the saved profiles: name, organization and which token each holds, never its value.
A profile is one file in the user's configuration directory (ycli doctor prints it),
written by ycli auth login --profile NAME; deleting the file removes the profile.
Usage:
$ ycli auth profiles [OPTIONS]
Options:
-o, --format [auto|json|yaml|pretty|csv|markdown|ndjson|name]: Output format (auto = pretty on a TTY, JSON when piped).-y, --yes: Do not ask before an operation that deletes data or grants access.--dry-run: Do not send a write: print the request it would send instead. Reads still run, and only the first write of a command is shown. A secret in the body (a password, a token) is printed as ***.--profile NAME: Use the credentials saved as this profile (YCLI_PROFILE); the environment's and .env's are then not read.ycli auth profileslists them.-F, --field TEXT: Set any field of the request body: key=value, key[sub]=value for a nested one (JSON-coerced; repeatable). key=@FILE (@- for stdin) gives the file's text as it is; a string that starts with @ goes in JSON quotes ('text="@ivan"'). A flag of the command wins over it. Objects merge; a list replaces the one below it. Give a secret from a file, not typed here: a command line stays in the shell history. Write that file with no line break at its end (printf %s 'secret' > file), or the break goes out with the secret.--body-file FILE: A JSON object (YAML in a .yaml / .yml file) laid under the request body: -F and the command's flags win over it. Objects merge; a list is replaced, not added to. YAML guesses types (no, 1.10): quote a value meant as text.--help: Show this message and exit.