tgs profile#

Manage account profiles.

Synopsis#

tgs profile <subcommand> [flags]

Subcommands#

tgs profile list#

List all profiles with their associated account information.

tgs profile list [flags]
FlagShortDefaultDescription
--output-ojsonOutput format: json, text
tgs profile list
tgs profile list --output text
* default (@myuser)
  work (@workuser)

JSON (default):

[
  {"name":"default","phone":"+79001234567","username":"alice","id":261054642,"active":true},
  {"name":"work","phone":"+79001230000","username":"alice_work","id":342178890,"active":false}
]

Text (--output text):

* default (@alice)
  work (@alice_work)

The active profile is marked with * in text mode, and "active": true in JSON. If neither username nor phone is cached, the profile name alone is shown.


tgs profile switch#

Set the active profile for the current directory by writing a .tgs.yaml file.

tgs profile switch <name>
tgs profile switch work
tgs profile switch default
profile: <name>

JSON (default):

{"profile":"work","status":"switched","dir":"/Users/alice/projects"}

Text (--output text):

Switched to profile "work" (wrote .tgs.yaml in /Users/alice/projects)

All tgs commands run in this directory (and subdirectories) will use the specified profile.


tgs profile delete#

Delete a profile and its local session database.

tgs profile delete <name>
tgs profile delete old-account
tgs profile switch default
tgs profile delete work

JSON (default):

{"profile":"old","status":"deleted"}

Text (--output text):

Deleted profile "old"

You cannot delete the currently active profile. Switch to a different profile first.

See Also#