yera.cli.commands.delete

Delete commands — remove config entries and files.

Symbols

def config — Delete yera.toml and all configuration stored in it. Requires ``--force``.
def cred — Delete one credential leaf.
def cred_group — Delete a credential group and every credential it contains.
def creds — Delete credentials from the active credential group. Requires ``--force``.
def mcp — Delete an MCP server and the state that Yera owns for it.
def model — Remove one model entry from the universe.
def models — Delete configured models from yera.toml. Requires ``--force``.
def profile — Remove a named Yera profile from yera.toml.
def profiles — Delete every profile and the active-profile selection. Requires ``--force``.
def provider — Remove a provider or one of its connections from yera.toml.
def providers — Delete every provider connection from yera.toml. Requires ``--force``.

config

config(
    force: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete yera.toml and all configuration stored in it. Requires --force.

Parameters

force
type: Annotated[bool, Parameter(negative='')] = False

Must be true; the command refuses to delete without --force.

Raises

YeraError

If deletion is not permitted with --force.

cred

cred(
    key: str,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete one credential leaf.

Parameters

key
type: str

Exact dotted credential name.

Raises

CredentialKeyError

If the name is absent or identifies a namespace.

cred_group

cred_group(
    name: str,
    force: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete a credential group and every credential it contains.

Requires --force.

Parameters

name
type: str

Credential group name to delete.

force
type: Annotated[bool, Parameter(negative='')] = False

Must be true; the command refuses to delete without --force.

Raises

YeraError

If deletion is not permitted with --force.

creds

creds(
    path: str | None = None,
    force: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete credentials from the active credential group. Requires --force.

Supply path to limit deletion to one namespace.

Parameters

path
type: str | None = None

Optional dotted namespace to clear.

force
type: Annotated[bool, Parameter(negative='')] = False

Whether destructive bulk deletion is permitted.

Raises

YeraError

If force is not enabled.

CredentialKeyError

If the path identifies only one credential leaf.

mcp

mcp(
    server_name: Annotated[str, Parameter(help='MCP server connection to remove.')],
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete an MCP server and the state that Yera owns for it.

Yera removes the server from every profile that uses it, deletes its imported tools and stored OAuth tokens, and keeps credential-group values referenced by headers.

Parameters

server_name
type: Annotated[str, Parameter(help='MCP server connection to remove.')]

Configured MCP server connection to remove.

Raises

YeraError

If the named MCP server is not configured.

model

model(
    model_id: Annotated[str, Parameter(help='Yera model id to remove.')],
    connection: Annotated[str, Parameter(help='Connection name the model was discovered under. Required since the same model id can exist under multiple connections.')],
    model_type: Annotated[Literal['llm', 'embedding', 'tts', 'stt', 'reranker'], Parameter(help='Model type of the entry to remove.')],
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Remove one model entry from the universe.

Parameters

model_id
type: Annotated[str, Parameter(help='Yera model id to remove.')]

Yera-internal dot-delimited model id to remove.

connection
type: Annotated[str, Parameter(help='Connection name the model was discovered under. Required since the same model id can exist under multiple connections.')]

Connection name the model was discovered under. Required because the same model id can exist under multiple connections.

model_type
type: Annotated[Literal['llm', 'embedding', 'tts', 'stt', 'reranker'], Parameter(help='Model type of the entry to remove.')]

Model type of the entry to remove.

Raises

YeraError

If no model matches the requested type, identifier, and connection.

models

models(
    model_type: Annotated[Literal['llm', 'embedding', 'tts', 'stt', 'reranker'] | None, Parameter(help='If set, remove only models of this type.')] = None,
    force: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete configured models from yera.toml. Requires --force.

Supply model_type to limit deletion to that type.

Parameters

model_type
type: Annotated[Literal['llm', 'embedding', 'tts', 'stt', 'reranker'] | None, Parameter(help='If set, remove only models of this type.')] = None

If set, only models of this type are removed. If omitted, all models across all types are removed.

force
type: Annotated[bool, Parameter(negative='')] = False

Must be true; the command refuses to delete without --force.

Raises

YeraError

If deletion is not permitted with --force.

profile

profile(
    profile_name: Annotated[str, Parameter(help='Yera profile name to remove.')],
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Remove a named Yera profile from yera.toml.

Parameters

profile_name
type: Annotated[str, Parameter(help='Yera profile name to remove.')]

Profile to remove. The active profile cannot be removed.

Raises

ProfileNotFoundInConfigError

If the named profile is not configured.

ProfileConfigError

If the named profile is currently active.

profiles

profiles(
    force: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete every profile and the active-profile selection. Requires --force.

Parameters

force
type: Annotated[bool, Parameter(negative='')] = False

Must be true; the command refuses to delete without --force.

Raises

YeraError

If deletion is not permitted with --force.

provider

provider(
    provider_type: Annotated[Literal['anthropic', 'openai', 'mistral', 'aws', 'azure', 'ollama', 'llama_cpp'], Parameter(help='Provider type to remove.')],
    connection: Annotated[str | None, Parameter(help='If set, remove only this connection rather than the entire provider. Raises an error if any Yera profile references this connection.')] = None,
    force: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Remove a provider or one of its connections from yera.toml.

Parameters

provider_type
type: Annotated[Literal['anthropic', 'openai', 'mistral', 'aws', 'azure', 'ollama', 'llama_cpp'], Parameter(help='Provider type to remove.')]

Provider type to remove. Must be a configured provider.

connection
type: Annotated[str | None, Parameter(help='If set, remove only this connection rather than the entire provider. Raises an error if any Yera profile references this connection.')] = None

If set, remove only this connection. Raises an error if any Yera profile references it — update or remove those profiles first.

force
type: Annotated[bool, Parameter(negative='')] = False

Required when removing an entire provider. The command refuses to delete without --force.

Raises

ConnectionNotFoundInConfigError

If the named connection is not configured for the provider.

YeraError

If provider deletion is not permitted with --force, or if a profile references the provider or connection.

providers

providers(
    force: Annotated[bool, Parameter(negative='')] = False,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Delete every provider connection from yera.toml. Requires --force.

Parameters

force
type: Annotated[bool, Parameter(negative='')] = False

Must be true; the command refuses to delete without --force.

Raises

YeraError

If deletion is not permitted with --force.