# cli


## provision

``` python
async def provision(
    project:str=None, # Google Cloud project ID; the saved one, else the owner's stable `gclientids-*` ID
    name:str='gclientids', # OAuth application and client name
    output:pathlib._local.Path=None, # Credential directory; $XDG_CONFIG_HOME/gclientid if omitted
    owner:str=None, # Existing Cloud account for project creation; otherwise bootstrap through Cloud Console
    account:str=None, # Google account email to authorize when `authorize`
    preset:str=None, # Default scope preset for later authorization; the saved one, else google-apps
    scopes=None, # Additional OAuth scopes to declare, beyond `max`
    apis=None, # Additional Google API service names to enable, beyond `max`
    redirects=None, # Additional Web client redirect URIs, beyond the defaults
    internal:bool=False, # Use the Internal-audience project and its separate *-internal credential files?
    desktop:bool=False, # Ensure the Desktop client instead of the Web client?
    accept_terms:bool=True, # Accept Google's API Services terms automatically?
    cdp_chrome:bool=False, # Use dedicated CDP Chrome instead of normal Chrome?
    authorize:bool=False, # Also authorize `account` after provisioning?
    remote:bool=False, # Authorize through appapis copy/paste instead of the local callback?
    open_browser:bool=True, # Open the appapis authorization URL in the default browser?
):
```

*Ensure the project, its APIs and OAuth app, and one client exist, then optionally authorize an account*

## authorize_account

``` python
async def authorize_account(
    account:str, # Google account email to authorize
    output:pathlib._local.Path=None, # Credential directory; $XDG_CONFIG_HOME/gclientid if omitted
    preset:str=None, # Scope preset; the saved default, else google-apps
    scopes=None, # Additional OAuth scopes
    internal:bool=False, # Use the separately stored Internal OAuth client and token?
    desktop:bool=False, # Use the Desktop client and its token instead of the Web client?
    cdp_chrome:bool=False, # Use dedicated CDP Chrome instead of normal Chrome?
    remote:bool=False, # Use appapis copy/paste instead of the local callback (Web clients only)?
    open_browser:bool=True, # Open the appapis authorization URL in the default browser?
):
```

*Authorize `account` with an existing OAuth client and save its token*

## main

``` python
async def main(
    Project:str=None, # Google Cloud project ID; the saved one, else the owner's stable `gclientids-*` ID
    Name:str='gclientids', # OAuth application and client name
    Output:pathlib._local.Path=None, # Credential directory; $XDG_CONFIG_HOME/gclientid if omitted
    owner:str=None, # Existing Cloud account for project creation; otherwise bootstrap through Cloud Console
    Account:str=None, # Google account email to authorize with --authorize
    preset:str=None, # Default scope preset: google-apps, cloud, colab, workspace-addon, developer, workspace-admin, max, or gmail
    scope:str=None, # Additional OAuth scope to declare; may be repeated
    api:str=None, # Additional Google API service name to enable; may be repeated
    redirect:str=None, # Additional Web client redirect URI; may be repeated
    internal:bool=False, # Use the Internal-audience project and separate *-internal credential files?
    desktop:bool=False, # Ensure the Desktop client instead of the Web client?
    accept_terms:bool=True, # Accept Google's API Services terms automatically?
    cdp_chrome:bool=False, # Use dedicated CDP Chrome instead of normal Chrome?
    authorize:bool=False, # Also authorize a Google account after provisioning?
    remote:bool=False, # Authorize through appapis copy/paste instead of the local callback?
    open_browser:bool=True, # Open the appapis authorization URL in the default browser?
):
```

*Ensure a Google Cloud project, its OAuth app, and a Web or Desktop OAuth client*

## auth

``` python
async def auth(
    Account:str, # Google account email to authorize
    Output:pathlib._local.Path=None, # Credential directory; $XDG_CONFIG_HOME/gclientid if omitted
    preset:str=None, # Scope preset; defaults to the provisioned setting or google-apps
    scope:str=None, # Additional OAuth scope; may be repeated
    internal:bool=False, # Use the separately stored Internal OAuth client and token?
    desktop:bool=False, # Use the Desktop client and its token instead of the Web client?
    cdp_chrome:bool=False, # Use dedicated CDP Chrome instead of normal Chrome?
    remote:bool=False, # Use appapis copy/paste instead of the local callback (Web clients only)?
    open_browser:bool=True, # Open the appapis authorization URL in the default browser?
):
```

*Authorize a Google account using an existing OAuth client*
