# liya CLI reference: every command and flag

Every liya command and flag, generated from the CLI's own --help output.

<!-- Generated by scripts/gen_cli_reference.py from `liya --help`. Do not edit by hand. -->

Every command accepts `-o table|json|yaml` and `--env NAME` / `--url URL`, before or
after the subcommand. `-v` / `--verbose` logs each request (never headers).

| Exit code | Meaning |
| --- | --- |
| `0` | Success |
| `1` | Error (message on stderr) |
| `2` | Invalid input |
| `3` | Not logged in, or not permitted |
| `4` | Not found |
| `5` | A deliberate "no": changes pending on `apply --dry-run`, a blocked guardrail test, or an agent that declined to answer |

## `liya`

```text
usage: liya [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] [--timeout TIMEOUT]
            [--no-color] [-v] [--version]
            COMMAND ...

liya — the Liyagent / TicketIQ command line. Every command calls the same REST API as
the web console.

positional arguments:
  COMMAND
    auth                log in, log out, and show who you are
    env                 manage environments (instances)
    agents              list, configure and talk to agents
    tickets             work with tickets
    triggers            schedules, webhooks and event triggers
    providers           LLM providers
    models              the model catalogue
    guardrails          input/output guardrails
    secrets             the secret vault (values are never shown)
    policies            Cedar access policies
    audit               the audit log
    budgets             spend budgets
    tenant              a tenant's solutions, and adopting legacy history into one
    connectors          ServiceNow, Jira, Teams and other connectors
    kb                  the knowledge base
    recall              search your own meetings (Liya Meeting)
    archive             Liya Meeting's encrypted raw archive
    status              gateway, model chain and connector health: the command-center
                        summary
    doctor              diagnose configuration and connectivity
    apply               apply YAML resources from a file or dir
    export              export resources as YAML files (no secrets)
    run                 run a coding agent with its model calls through the AI gateway
    version             client and server version
    completion          print a shell completion script
    tiq                 run a legacy `tiq` command (ask, plan, replay, …)

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use (default: the current one)
  --url URL             instance URL, overriding the environment's
  --timeout TIMEOUT     HTTP timeout in seconds
  --no-color            disable colour (same as NO_COLOR)
  -v, --verbose         log each request's method, URL, status and latency to stderr
                        (never headers or secrets); LIYA_VERBOSE=1 too
  --version             print the client version and exit

Environment: LIYA_TOKEN, LIYA_ENV, LIYA_URL, LIYA_HOME (default ~/.liya), LIYA_OUTPUT,
NO_COLOR. Run `liya COMMAND --help` for details.
```

## `liya auth`

```text
usage: liya auth [-h] SUBCOMMAND ...

log in, log out, and show who you are

positional arguments:
  SUBCOMMAND
    login     store a credential for the current environment
    logout    forget the current environment's credential
    status    show who you are signed in as (never the token)

options:
  -h, --help  show this help message and exit
```

### `liya auth login`

```text
usage: liya auth login [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                       [--username USERNAME] [--token-stdin] [--password-stdin]

Log in to the current environment. Uses the server's device-code flow when it offers
one; otherwise reads LIYA_TOKEN, a token from stdin (--token-stdin), or a hidden
prompt. --username signs in with a password (hidden prompt) and stores the resulting
session, never the password. Service-account tokens (svc/NAME:SECRET) are accepted.

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --username USERNAME   sign in as this user (password prompted)
  --token-stdin         read the token from stdin
  --password-stdin      read the password from stdin (with --username)
```

### `liya auth logout`

```text
usage: liya auth logout [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

forget the current environment's credential

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya auth status`

```text
usage: liya auth status [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

show who you are signed in as (never the token)

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

## `liya env`

```text
usage: liya env [-h] SUBCOMMAND ...

manage environments (instances)

positional arguments:
  SUBCOMMAND
    list      list environments; * marks the current one
    use       switch the current environment
    add       add or update an environment
    remove    remove an environment and its credential

options:
  -h, --help  show this help message and exit
```

### `liya env list`

```text
usage: liya env list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

list environments; * marks the current one

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya env use`

```text
usage: liya env use [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] name

switch the current environment

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya env add`

```text
usage: liya env add [-h] [-o {table,json,yaml}] --url URL [--use] name

add or update an environment

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --url URL             base URL, e.g. https://x.example
  --use                 also switch to it
```

### `liya env remove`

```text
usage: liya env remove [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] name

remove an environment and its credential

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

## `liya agents`

```text
usage: liya agents [-h] SUBCOMMAND ...

list, configure and talk to agents

positional arguments:
  SUBCOMMAND
    list      list agents and their model bindings
    get       show one agent
    create    create an agent from a blueprint
    update    change an agent's model binding
    delete    delete an agent
    pause     stop a managed agent
    resume    start a stopped managed agent
    chat      send one message through the playground
    eval      run the agent's eval set and print pass/fail

options:
  -h, --help  show this help message and exit
```

### `liya agents list`

```text
usage: liya agents list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                        [--stage STAGE]

list agents and their model bindings

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --stage STAGE         only agents in this stage
```

### `liya agents get`

```text
usage: liya agents get [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] id

show one agent

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya agents create`

```text
usage: liya agents create [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                          --from-blueprint BLUEPRINT [--provider PROVIDER]
                          [--model MODEL] [--tag TAG]
                          [name]

create an agent from a blueprint

positional arguments:
  name                  new agent id (default: blueprint's)

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --from-blueprint BLUEPRINT
  --provider PROVIDER
  --model MODEL
  --tag TAG             key=value (repeatable)
```

### `liya agents update`

```text
usage: liya agents update [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                          [--provider PROVIDER] [--model MODEL]
                          [--max-tokens MAX_TOKENS] [--effort EFFORT]
                          [--agent-timeout AGENT_TIMEOUT] [--enable | --disable]
                          [--reason REASON]
                          id

change an agent's model binding

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --provider PROVIDER
  --model MODEL
  --max-tokens MAX_TOKENS
  --effort EFFORT
  --agent-timeout AGENT_TIMEOUT
                        model call timeout, seconds
  --enable
  --disable
  --reason REASON       why (required when weakening a control)
```

### `liya agents delete`

```text
usage: liya agents delete [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                          [--dry-run] [--force] [--reason REASON] [-y]
                          id

delete an agent

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --dry-run             show what would be touched
  --force               delete even if still referenced
  --reason REASON
  -y, --yes             do not ask for confirmation
```

### `liya agents pause`

```text
usage: liya agents pause [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] id

stop a managed agent

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya agents resume`

```text
usage: liya agents resume [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] id

start a stopped managed agent

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya agents chat`

```text
usage: liya agents chat [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                        [--session SESSION] [--system SYSTEM] [--ticket TICKET]
                        id message

Run one message through the agent's governed playground path and print the reply. Exit
5 when the agent declines (budget, kill switch, no model).

positional arguments:
  id
  message               the message; - reads stdin

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --session SESSION     continue a playground session
  --system SYSTEM       override the system prompt
  --ticket TICKET       ground the turn on this ticket id
```

### `liya agents eval`

```text
usage: liya agents eval [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                        [--dataset DATASET] [--baseline BASELINE] [--wait WAIT]
                        id

Run an evaluation dataset against the agent, wait, and print each metric against the
baseline. Exit 0 pass, 1 fail or regression.

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --dataset DATASET     eval dataset (default: the agent's own)
  --baseline BASELINE   run id, pinned, latest or none
  --wait WAIT           seconds to wait
```

## `liya tickets`

```text
usage: liya tickets [-h] SUBCOMMAND ...

work with tickets

positional arguments:
  SUBCOMMAND
    list      list tickets, with filters
    get       show one ticket
    create    open a ticket
    comment   add a reply or internal note
    close     resolve or close a ticket

options:
  -h, --help  show this help message and exit
```

### `liya tickets list`

```text
usage: liya tickets list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                         [--status STATUS] [--team TEAM] [--category CATEGORY]
                         [-q QUERY] [--limit LIMIT] [--offset OFFSET]

list tickets, with filters

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --status STATUS
  --team TEAM
  --category CATEGORY
  -q QUERY, --query QUERY
                        free-text search
  --limit LIMIT
  --offset OFFSET
```

### `liya tickets get`

```text
usage: liya tickets get [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] id

show one ticket

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya tickets create`

```text
usage: liya tickets create [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] --title
                           TITLE [-d DESCRIPTION] [--requester REQUESTER]

open a ticket

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --title TITLE
  -d DESCRIPTION, --description DESCRIPTION
                        text, or - for stdin
  --requester REQUESTER
```

### `liya tickets comment`

```text
usage: liya tickets comment [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                            [--internal] [--author {desk,requester}]
                            id text

add a reply or internal note

positional arguments:
  id
  text                  the comment; - reads stdin

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --internal            an internal note, not public
  --author {desk,requester}
```

### `liya tickets close`

```text
usage: liya tickets close [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                          [--resolution RESOLUTION] [--status {closed,resolved}]
                          id

resolve or close a ticket

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --resolution RESOLUTION
  --status {closed,resolved}
```

## `liya triggers`

```text
usage: liya triggers [-h] SUBCOMMAND ...

schedules, webhooks and event triggers

positional arguments:
  SUBCOMMAND
    list      list triggers
    create    create a trigger
    delete    delete a trigger

options:
  -h, --help  show this help message and exit
```

### `liya triggers list`

```text
usage: liya triggers list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                          [--agent AGENT]

list triggers

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --agent AGENT         only this agent's
```

### `liya triggers create`

```text
usage: liya triggers create [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                            --agent AGENT --kind KIND [--schedule SCHEDULE]
                            [--timezone TIMEZONE] [--input INPUT] [--event EVENT]
                            [--about ABOUT] [--disabled] [--replace]
                            name

create a trigger

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --agent AGENT
  --kind KIND           cron, ticket, webhook, teams, slack, email or google_chat
  --schedule SCHEDULE   cron expression, for kind=cron
  --timezone TIMEZONE
  --input INPUT         the message a scheduled run sends
  --event EVENT         event name, for kind=event (repeatable)
  --about ABOUT
  --disabled            create it paused
  --replace             overwrite an existing trigger
```

### `liya triggers delete`

```text
usage: liya triggers delete [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] [-y]
                            name

delete a trigger

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  -y, --yes
```

## `liya providers`

```text
usage: liya providers [-h] SUBCOMMAND ...

LLM providers

positional arguments:
  SUBCOMMAND
    list      list providers with health
    test      send a test call through a saved provider
    add       add a provider

options:
  -h, --help  show this help message and exit
```

### `liya providers list`

```text
usage: liya providers list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

list providers with health

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya providers test`

```text
usage: liya providers test [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] name

send a test call through a saved provider

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya providers add`

```text
usage: liya providers add [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] --kind
                          KIND [--base-url BASE_URL] [--model MODEL]
                          [--display-name DISPLAY_NAME] [--about ABOUT]
                          [--api-key-stdin] [--prompt-key] [--replace]
                          name

Add an LLM provider. The API key is read from stdin (--api-key-stdin) or a hidden
prompt (--prompt-key), never argv.

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --kind KIND           openai, anthropic, azure, bedrock, ollama, …
  --base-url BASE_URL
  --model MODEL         default model
  --display-name DISPLAY_NAME
  --about ABOUT
  --api-key-stdin
  --prompt-key          prompt for the API key (hidden)
  --replace
```

## `liya models`

```text
usage: liya models [-h] SUBCOMMAND ...

the model catalogue

positional arguments:
  SUBCOMMAND
    list      list models (the catalogue, or one provider's)

options:
  -h, --help  show this help message and exit
```

### `liya models list`

```text
usage: liya models list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                        [--provider PROVIDER] [--limit LIMIT]

list models (the catalogue, or one provider's)

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --provider PROVIDER
  --limit LIMIT
```

## `liya guardrails`

```text
usage: liya guardrails [-h] SUBCOMMAND ...

input/output guardrails

positional arguments:
  SUBCOMMAND
    list      list guardrails
    test      dry-run every guardrail over sample text

options:
  -h, --help  show this help message and exit
```

### `liya guardrails list`

```text
usage: liya guardrails list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

list guardrails

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya guardrails test`

```text
usage: liya guardrails test [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                            [--agent AGENT] [--direction {input,output}]
                            text

Dry-run the configured guardrails over TEXT. Exit 5 if it would be blocked.

positional arguments:
  text                  sample text; - reads stdin

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --agent AGENT
  --direction {input,output}
```

## `liya secrets`

```text
usage: liya secrets [-h] SUBCOMMAND ...

the secret vault (values are never shown)

positional arguments:
  SUBCOMMAND
    list      list secret labels
    set       store a secret
    delete    delete a secret

options:
  -h, --help  show this help message and exit
```

### `liya secrets list`

```text
usage: liya secrets list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

list secret labels

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya secrets set`

```text
usage: liya secrets set [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                        [--about ABOUT] [--tag TAG] [--stdin]
                        label

Store a secret. The value is read from stdin when piped (or with --stdin), else from a
hidden prompt. It is never echoed.

positional arguments:
  label

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --about ABOUT
  --tag TAG
  --stdin
```

### `liya secrets delete`

```text
usage: liya secrets delete [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] [-y]
                           label

delete a secret

positional arguments:
  label

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  -y, --yes
```

## `liya policies`

```text
usage: liya policies [-h] SUBCOMMAND ...

Cedar access policies

positional arguments:
  SUBCOMMAND
    list      list policies
    get       show one policy
    create    bind a built-in template to an agent
    apply     create or update policies from a YAML file

options:
  -h, --help  show this help message and exit
```

### `liya policies list`

```text
usage: liya policies list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                          [--filter FILTER]

list policies

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --filter FILTER       AIP-160 filter
```

### `liya policies get`

```text
usage: liya policies get [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] name

show one policy

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya policies create`

```text
usage: liya policies create [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                            --agent AGENT --template
                            {full,read_only,readonly,sandboxed,standard}
                            [--principal PRINCIPAL] [--agent-tools] [--about ABOUT]
                            [--dry-run] [--reason REASON] [-y]
                            name

Bind a built-in template to an agent. A template is what PEOPLE may do with the agent:
readonly (read it), sandboxed (read and run it), standard (run and reconfigure it),
full (everything, the kill switch too). --principal names who (default: anyone). The
moment a policy names the agent it is governed: people without a permit lose what
their roles gave them. The agent's OWN tool and model calls are a separate decision;
--agent-tools writes them as the template implies — readonly and sandboxed: no tools
of its attached MCP servers; standard: their tools; full: those and its bound LLM
provider. Each policy is analysed first and a lockout, or one that takes a server from
another agent, is refused without --yes. --dry-run exits 5.

positional arguments:
  name                  policy name (lowercase letters, digits and -)

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --agent AGENT         the agent the template is bound to
  --template {full,read_only,readonly,sandboxed,standard}
                        readonly, sandboxed, standard or full
  --principal PRINCIPAL
                        any (default), user:NAME, group:NAME or role:NAME
  --agent-tools         also write the agent's own call_tool (and, for full,
                        call_model) policies the template implies
  --about ABOUT
  --dry-run             show the policies and their impact
  --reason REASON
  -y, --yes             create even where the analysis warns
```

### `liya policies apply`

```text
usage: liya policies apply [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] -f FILE
                           [--dry-run] [--reason REASON]

create or update policies from a YAML file

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  -f FILE, --file FILE  policy YAML; - for stdin
  --dry-run             show the diff, change nothing
  --reason REASON
```

## `liya audit`

```text
usage: liya audit [-h] SUBCOMMAND ...

the audit log

positional arguments:
  SUBCOMMAND
    search    search audit events
    verify    verify an evidence bundle offline (no server)

options:
  -h, --help  show this help message and exit
```

### `liya audit search`

```text
usage: liya audit search [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                         [--since SINCE] [--until UNTIL] [--limit LIMIT]
                         [--offset OFFSET] [--order {desc,asc}]
                         [query ...]

Search the audit log. QUERY is field=value terms, e.g. "outcome=denied actor=alice";
free text also matches.

positional arguments:
  query

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --since SINCE         30m, 24h, 7d, 2w or ISO time (default 24h)
  --until UNTIL
  --limit LIMIT
  --offset OFFSET
  --order {desc,asc}
```

### `liya audit verify`

```text
usage: liya audit verify [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                         [--local-key] [--require-signatures] [--audit-keys FILE]
                         bundle

verify an evidence bundle offline (no server)

positional arguments:
  bundle

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --local-key
  --require-signatures
  --audit-keys FILE     the instance's published audit signing keys, as JSON
```

## `liya budgets`

```text
usage: liya budgets [-h] SUBCOMMAND ...

spend budgets

positional arguments:
  SUBCOMMAND
    list      spend against each budget
    set       set the default or an agent's budget

options:
  -h, --help  show this help message and exit
```

### `liya budgets list`

```text
usage: liya budgets list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

spend against each budget

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya budgets set`

```text
usage: liya budgets set [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                        [--agent AGENT] --limit LIMIT [--period {day,week,month}]
                        [--warn-pct WARN_PCT]

set the default or an agent's budget

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --agent AGENT         omit for the default budget
  --limit LIMIT         USD per period
  --period {day,week,month}
  --warn-pct WARN_PCT
```

## `liya tenant`

```text
usage: liya tenant [-h] SUBCOMMAND ...

a tenant's solutions, and adopting legacy history into one

positional arguments:
  SUBCOMMAND
    solutions     which solutions a tenant has
    adopt-legacy  adopt the instance's pre-tenancy history into a home tenant

options:
  -h, --help      show this help message and exit
```

### `liya tenant solutions`

```text
usage: liya tenant solutions [-h] SUBCOMMAND ...

Which solutions a tenant has. TENANT '' is the instance's row, the default for every
tenant without one.

positional arguments:
  SUBCOMMAND
    show      show a tenant's solutions
    set       set exactly which solutions a tenant has
    infer     propose each tenant's row from what it uses

options:
  -h, --help  show this help message and exit
```

### `liya tenant solutions show`

```text
usage: liya tenant solutions show [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                                  tenant

show a tenant's solutions

positional arguments:
  tenant                tenant id, or '' for the instance

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya tenant solutions set`

```text
usage: liya tenant solutions set [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                                 [--default] [--plan PLAN] [--dry-run]
                                 [--reason REASON]
                                 tenant [SOLUTION ...]

Set exactly which solutions a tenant has (instance owners only). SOLUTIONS are keys:
itsm, sap, hr, finance, and SAP's modules sap.s4, sap.sf, sap.fsm (sap alone means all
of them). --default removes the row, so the tenant falls back to the instance's — or,
with none, every GA solution. Audited as tenant.solutions.update.

positional arguments:
  tenant                tenant id, or '' for the instance
  SOLUTION

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --default             remove the row instead
  --plan PLAN           a plan (starter, business, enterprise); the row grants its
                        solutions plus SOLUTIONS
  --dry-run             show what would turn on and off; write nothing
  --reason REASON       why (kept on the row and the audit log; required when anything
                        turns off)
```

### `liya tenant solutions infer`

```text
usage: liya tenant solutions infer [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                                   [--apply]

Propose each tenant's solutions from what it uses: intake sources (itsm), SAP
connectors bound to it (sap and modules), HR switched on or HR systems bound (hr),
finance connectors (finance). A dry run unless --apply. Never proposes turning off
what is in use: a solution kept only by a shared, unbound server stays on and is
listed as ambiguous.

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --apply               write each proposal (audited, reason 'migration infer')
```

### `liya tenant adopt-legacy`

```text
usage: liya tenant adopt-legacy [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                                --tenant TENANT [--dry-run] [--reason REASON]
                                [--triggers {doors,all,none}] [--no-grant-users]
                                [--no-sources]

Adopt the records written before this instance had tenants (transcripts, sessions,
answer records, trigger runs, memory, SAP/HR records; audit rows by cut-off) into
TENANT, bind the unbound door triggers and the deflection door to it and grant it to
every non-owner account that holds no tenant — so the people who used the instance
keep reading their own history, and only it. Idempotent; audited as
tenant.legacy.adopt. Run with --dry-run first.

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --tenant TENANT       the home tenant (it must exist)
  --dry-run             count every step; write nothing
  --reason REASON       why (required to apply; on the audit row)
  --triggers {doors,all,none}
                        unbound triggers to bind: inbound doors (default), all, or
                        none
  --no-grant-users      do not grant the home tenant to accounts holding none
  --no-sources          do not give it the unowned sources and the unsourced intake
```

## `liya connectors`

```text
usage: liya connectors [-h] SUBCOMMAND ...

ServiceNow, Jira, Teams and other connectors

positional arguments:
  SUBCOMMAND
    list      list integrations and MCP connectors
    test      test one connector

options:
  -h, --help  show this help message and exit
```

### `liya connectors list`

```text
usage: liya connectors list [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

list integrations and MCP connectors

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya connectors test`

```text
usage: liya connectors test [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] name

test one connector

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

## `liya kb`

```text
usage: liya kb [-h] SUBCOMMAND ...

the knowledge base

positional arguments:
  SUBCOMMAND
    search    search knowledge files

options:
  -h, --help  show this help message and exit
```

### `liya kb search`

```text
usage: liya kb search [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                      [--limit LIMIT]
                      query [query ...]

search knowledge files

positional arguments:
  query

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --limit LIMIT
```

## `liya recall`

```text
usage: liya recall [-h] SUBCOMMAND ...

search your own meetings (Liya Meeting)

positional arguments:
  SUBCOMMAND
    search    search your own meetings' redacted transcripts

options:
  -h, --help  show this help message and exit
```

### `liya recall search`

```text
usage: liya recall search [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                          [--limit LIMIT]
                          query [query ...]

search your own meetings' redacted transcripts

positional arguments:
  query

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --limit LIMIT
```

## `liya archive`

```text
usage: liya archive [-h] SUBCOMMAND ...

Liya Meeting's encrypted raw archive

positional arguments:
  SUBCOMMAND
    verify    check the archive manifest's chain, signatures and objects (exit 1 if
              not)
    request   ask to open one meeting's raw archive (someone else approves it)
    open      open one meeting's raw archive with an approved request

options:
  -h, --help  show this help message and exit
```

### `liya archive verify`

```text
usage: liya archive verify [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

check the archive manifest's chain, signatures and objects (exit 1 if not)

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

### `liya archive request`

```text
usage: liya archive request [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                            --reason REASON
                            meeting

ask to open one meeting's raw archive (someone else approves it)

positional arguments:
  meeting               meeting id (mtg_...)

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --reason REASON       why you need the raw archive
```

### `liya archive open`

```text
usage: liya archive open [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                         --approval APPROVAL [--identity FILE] [--out FILE]
                         meeting

Open one meeting's raw archive with an approved four-eyes request (single use). A
sealed archive prints its events. A recipient-mode archive is encrypted to your age
keys: --identity FILE decrypts it locally (the identity never leaves this machine),
--out FILE writes the events, or with no --identity the ciphertext, to a 0600 file.

positional arguments:
  meeting               meeting id (mtg_...)

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --approval APPROVAL   the approved request's id
  --identity FILE       age identity file to decrypt a recipient-mode archive locally
  --out FILE            write JSON lines (or the ciphertext, without --identity) here
```

## `liya status`

```text
usage: liya status [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

## `liya doctor`

```text
usage: liya doctor [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

## `liya apply`

```text
usage: liya apply [-h] [-o {table,json,yaml}] [--env ENV] [--url URL] -f FILE
                  [--dry-run] [--reason REASON]

Declarative apply of agents, providers, guardrails, policies and triggers. --dry-run
prints a diff and exits 5 if changes are pending.

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  -f FILE, --file FILE  a YAML/JSON file or a directory
  --dry-run
  --reason REASON       why, for changes that weaken a control
```

## `liya export`

```text
usage: liya export [-h] -o DIR [--kind {Agent,Provider,Guardrail,Policy,Trigger}]
                   [--format {table,json,yaml}]

Write agents, providers (without secrets), guardrails, policies and triggers as YAML
under DIR.

options:
  -h, --help            show this help message and exit
  -o DIR, --output-dir DIR
                        target directory
  --kind {Agent,Provider,Guardrail,Policy,Trigger}
                        only these kinds (repeatable)
  --format {table,json,yaml}
                        format of the summary printed
```

## `liya run`

```text
usage: liya run [-h] SUBCOMMAND ...

run a coding agent with its model calls through the AI gateway

positional arguments:
  SUBCOMMAND
    claude    start Claude Code routed through the AI gateway

options:
  -h, --help  show this help message and exit
```

### `liya run claude`

```text
usage: liya run claude [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]
                       [--agent AGENT] [--ttl-hours TTL_HOURS] [--token-stdin]
                       [--claude-bin CLAUDE_BIN] [--dry-run] [-y]
                       ...

Start Claude Code with ANTHROPIC_BASE_URL set to this instance's Anthropic gateway
(/api/gateway/anthropic) and ANTHROPIC_AUTH_TOKEN to an agent's gateway token, so
every model call is that agent's governed call: kill switch, Cedar, guardrails,
budget, audit. The token comes from LIYA_GATEWAY_TOKEN, --token-stdin, or is minted
for --agent (replacing its current token; confirmed, or --yes). A Claude Code settings
file that would send calls around the gateway — CLAUDE_CODE_USE_VERTEX, _BEDROCK,
_FOUNDRY or its own ANTHROPIC_BASE_URL — refuses the launch; the same set only in this
shell is cleared from Claude Code's environment instead. Arguments after -- go to
Claude Code; its exit status is liya's.

positional arguments:
  claude_args           arguments for Claude Code, after --

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
  --agent AGENT         mint a gateway token for this agent
  --ttl-hours TTL_HOURS
                        lifetime of a minted token (default 8)
  --token-stdin         read the agent's gateway token from stdin
  --claude-bin CLAUDE_BIN
                        the Claude Code executable (default: claude on PATH)
  --dry-run             show what would run, the token masked, and start nothing
  -y, --yes             mint without asking
```

## `liya version`

```text
usage: liya version [-h] [-o {table,json,yaml}] [--env ENV] [--url URL]

options:
  -h, --help            show this help message and exit
  -o {table,json,yaml}, --output {table,json,yaml}
                        output format: table (default), json or yaml
  --env ENV             environment to use
  --url URL             instance URL override
```

## `liya completion`

```text
usage: liya completion [-h] {bash,zsh}

eval "$(liya completion zsh)" in ~/.zshrc, or source <(liya completion bash).

positional arguments:
  {bash,zsh}

options:
  -h, --help  show this help message and exit
```

## `liya tiq`

Forwards to the legacy `tiq` command line (`ask`, `usage`, `plan`, `policy`, `network`, `trigger`, `eval`, `agent`, `replay`, `delete`) with liya's environment and stored credential. Those verbs also work directly: `liya plan -f bundle.json`.
