Skip to content

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 env credentials are...
  • login: Obtain a Yandex OAuth token + organization...

ycli auth status

Report whether the env credentials are set, whose they are, and which services accept them.

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]: Output format (auto = pretty on a TTY, JSON when piped).
  • --jq EXPR: Filter the JSON result through a jq expression; strings print raw, like jq -r. Needs the jq extra.
  • -y, --yes: Do not ask before an operation that deletes data.
  • --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.
  • --help: Show this message and exit.

ycli auth login

Obtain a Yandex OAuth token + organization id and save them to .env.

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]: Output format (auto = pretty on a TTY, JSON when piped).
  • --jq EXPR: Filter the JSON result through a jq expression; strings print raw, like jq -r. Needs the jq extra.
  • --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.
  • --help: Show this message and exit.