Helix TeamHub CLI User Guide (2024.2 Enterprise)

# Session

This section describes the Helix TeamHub CLI commands used to create, delete, list and show sessions.

## hth session create (hth login)

Use one of the following commands to log in to TeamHub. Both commands work in the same way and have the same flags:

- hth session create
- hth login

### Flags

Flags | Description
--- | ---
-c or --company | Specify the TeamHub company ID to log in to.
-i or --instance | Specify the TeamHub instance URL to log in to.
-p or --password | Specify the password for the user
-u or --user | Specify the TeamHub user ID to log in with.

### When run inside a project directory

hth-cli uses instance and company names from the manifest file and looks for matching user short names from the global config file. Select a user from the list or input a user and enter the password.

### When running outside of a project directory

1. If Helix TeamHub instances are configured in the global config, hth-cli asks you to select one or provide an URL to the Helix TeamHub instance.
2. If company names are configured in the global config, hth-cli asks you to select one or provide a company name.
3. If users are configured in the global config, hth-cli asks you to select one or provide a username. Input the password.

#### After successful log in

If instance, company, or user are not in the global config file, hth-cli will offer to save the missing values in the global config for you.

## hth session delete (hth logout)

Use one of the following commands to log out of TeamHub. Both commands work in the same way and have the same flags:

- hth session delete
- hth logout

### Flags

Flags | Description
--- | ---
-a or --all | Delete all sessions.
-c or --company | Specify the TeamHub company ID to log out from.
-i or --instance | Specify the TeamHub instance URL to log out from.
-u or --user | Specify the TeamHub user ID to log out.

## hth session list

Use the hth session list command to list all of the active sessions.

### Flags

Flags | Description
--- | ---
-c or --company | Specify the TeamHub company ID to list active sessions for.
-i or --instance | Specify the TeamHub instance URL to list active sessions for.
-l or --long | Prints the full version of all sessions.
-u or --user | Specify the TeamHub user ID to list active sessions for.

## hth session show

Use the hth session show command to list all of the active sessions in your local working directory.

### Flags

Flags | Description
--- | ---
-l or --long | Prints the full version of all sessions.

Your search for returned result(s).