tgs whoami#
Показывает текущий профиль и информацию об аккаунте. Читает данные из локального хранилища — подключение к Telegram не требуется.
Синопсис#
tgs whoami [flags]Флаги#
| Flag | Short | Default | Description |
|---|---|---|---|
--profile | -p | (resolved) | Profile to inspect |
--output | -o | json | Output format: json, text |
Порядок определения профиля, если --profile не указан: переменная TGS_PROFILE -> файл .tgs.yaml -> "default".
Примеры#
# Show current profile (JSON output)
tgs whoami
# Human-readable output
tgs whoami --output text
# Inspect a specific profile
tgs whoami --profile work
# Inspect a profile with text output
tgs whoami --profile work --output textВывод#
Profile: work
User: John Doe (id: 123456789)
Handle: @johndoe
Phone: +1234567890{
"profile": "work",
"user": {
"id": 123456789,
"phone": "+1234567890",
"username": "johndoe",
"first_name": "John",
"last_name": "Doe"
}
}Если профиль существует, но вход не выполнен, поле user будет null (JSON) или "Not logged in" (текст).