gitea.cli.config.add
add
Add command for config CLI.
Functions:
gitea.cli.config.add.add_command
add_command(
ctx: Context,
name: Annotated[
str,
Option(
"--name",
help="Name of the account. It does not need to be the same as the Gitea account name.",
),
],
token: Annotated[
str,
Option("--token", help="Token for authentication."),
],
base_url: Annotated[
str,
Option(
"--base-url", help="Base URL of the platform."
),
] = "https://gitea.com",
is_default: Annotated[
bool,
Option("--default", help="Set as default account."),
] = False,
) -> None
Add a new account to the configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
Context
|
Typer context. |
required |
name
|
Annotated[str, Option('--name', help='Name of the account. It does not need to be the same as the Gitea account name.')]
|
Name of the account. It does not need to be the same as the Gitea account name. |
required |
token
|
Annotated[str, Option('--token', help='Token for authentication.')]
|
Token for authentication. |
required |
base_url
|
Annotated[str, Option('--base-url', help='Base URL of the platform.')]
|
Base URL of the platform. |
'https://gitea.com'
|
is_default
|
Annotated[bool, Option('--default', help='Set as default account.')]
|
Set as default account. |
False
|