# repyh-console

> Terminal interface to the Repyh console

repyh-console is the terminal interface to the Repyh console.

Anything you can do in the web UI should eventually be doable here. The
first capability shipped is domain management; more groups follow.

- **Version:** `dev`
- **Platform:** `linux/amd64`
- **Generated by:** `repyh-console llms`

## Global flags

- `--server` (`-s`) *string*: console server URL (defaults to saved config or https://console.repyhlabs.dev)

## Command index

- `repyh-console auth`
- `repyh-console auth login`
- `repyh-console auth logout`
- `repyh-console auth whoami`
- `repyh-console domain`
- `repyh-console domain delete`
- `repyh-console domain deploy`
- `repyh-console domain get`
- `repyh-console domain list`
- `repyh-console domain logs`
- `repyh-console domain status`
- `repyh-console llms`
- `repyh-console upgrade`
- `repyh-console version`

## Commands

### `repyh-console auth`

Authenticate with the console

**Usage:** `repyh-console auth`

**Subcommands:**

- `repyh-console auth login` — Log in via device-code flow
- `repyh-console auth logout` — Remove saved credentials
- `repyh-console auth whoami` — Show the currently authenticated user

### `repyh-console auth login`

Log in via device-code flow

Log in to the console by approving a short code in your browser.

The CLI starts a flow and prints a URL + an 8-character code. Open the URL
in any browser where you're already signed into the console, confirm the
code, and the CLI receives a 30-day bearer token.

**Usage:** `repyh-console auth login [flags]`

**Flags:**

- `--label` *string*: identifier stored alongside the token (shown in token management) (default `cli`)

### `repyh-console auth logout`

Remove saved credentials

Wipe the locally-stored token and ask the server to revoke it. Next command will require `repyh-console auth login`.

**Usage:** `repyh-console auth logout`

### `repyh-console auth whoami`

Show the currently authenticated user

**Usage:** `repyh-console auth whoami`

### `repyh-console domain`

Manage DomainDeployment resources

Create, inspect, update, and delete domain deployments via the console.

**Usage:** `repyh-console domain`

**Subcommands:**

- `repyh-console domain delete` — Delete a domain
- `repyh-console domain deploy` — Create or update a domain (upsert)
- `repyh-console domain get` — Show a single domain with full spec and status
- `repyh-console domain list` — List all domains
- `repyh-console domain logs` — Print a domain's container logs
- `repyh-console domain status` — Show the phase and URL of a domain

**Flags:**

- `--output` (`-o`) *string*: output format: table (default), json, yaml

### `repyh-console domain delete`

Delete a domain

Delete a DomainDeployment. The operator's finalizer tears down the
Deployment, Service, Ingress, and ConfigMaps owned by the domain. PVCs
are preserved unless the CR had spec.storage.reclaimOnDelete=true.

**Usage:** `repyh-console domain delete <id> [flags]`

**Flags:**

- `--yes` (`-y`): skip the confirmation prompt

### `repyh-console domain deploy`

Create or update a domain (upsert)

Create a new DomainDeployment or partially update an existing one.

The <name> is the domain's metadata.name; it's the stable handle for
child resource names (<name>-config, <name>-files, ...). An existing
domain with the same name is PATCHed; otherwise a new one is created.

Use -f/--from-file to supply a full CR spec in YAML (escape hatch for
shapes the flags don't cover -- sidecars, affinity, raw volumes). In
that mode the flag spec-builders are ignored except --emit.

--emit prints the would-be CR YAML to stdout and skips the API call --
useful for committing the CR to a Fleet-managed git path.

**Usage:** `repyh-console domain deploy <name> [flags]`

**Flags:**

- `--cpu-limit` *string*: container CPU limit
- `--cpu-request` *string*: container CPU request
- `--create-database`: provision a per-domain Postgres database
- `--emit`: print the would-be CR YAML instead of posting to the console
- `--env` *stringSlice*: environment variable KEY=VAL (repeatable)
- `--env-from-secret` *stringSlice*: mount an entire secret as env; repeatable
- `--from-file` (`-f`) *string*: path to a YAML DomainDeployment spec (disables flag-based spec builders)
- `--hostname` *string*: ingress hostname (also enables ingress)
- `--image` (`-i`) *string*: container image (required in flag mode)
- `--ingress-class` *string*: ingress class (nginx, cloudflare-tunnel, ...)
- `--memory-limit` *string*: container memory limit (e.g. 1Gi)
- `--memory-request` *string*: container memory request
- `--namespace` (`-n`) *string*: target namespace
- `--no-probes`: disable HTTP liveness/readiness probes
- `--port` *int*: container port
- `--probe-path` *string*: HTTP path for liveness/readiness probes (default /healthz)
- `--probe-port` *int*: port for liveness/readiness probes (defaults to --port)
- `--replicas` *int*: replica count
- `--secret-ref` *stringSlice*: copy a secret from NS/NAME into the target namespace; repeatable
- `--service-port` *int*: Service port (defaults to --port)
- `--storage-mount` *string*: mount path inside the container
- `--storage-size` *string*: PVC size, e.g. 10Gi (type=pvc only)
- `--storage-type` *string*: emptyDir | pvc | hostPath

### `repyh-console domain get`

Show a single domain with full spec and status

**Usage:** `repyh-console domain get <id>`

### `repyh-console domain list`

List all domains

**Usage:** `repyh-console domain list`

### `repyh-console domain logs`

Print a domain's container logs

Print logs from a DomainDeployment's pod.

By default, prints the most recent lines and exits. Use -f to stream
live until Ctrl-C. The operator runs a single main container named
"domain" per pod; for sidecars (e.g. promtail on logged workloads) use
-c <container>.

**Usage:** `repyh-console domain logs <id> [flags]`

**Flags:**

- `--container` (`-c`) *string*: container name (default: domain)
- `--follow` (`-f`): stream logs live (Ctrl-C to stop)
- `--previous`: logs from the last crashed container
- `--since` *string*: start from N ago (e.g. 5m, 1h)
- `--tail` *int*: lines to seed with (max 10000) (default `100`)

### `repyh-console domain status`

Show the phase and URL of a domain

Lightweight status summary -- useful for shell scripts polling for readiness.

**Usage:** `repyh-console domain status <id>`

### `repyh-console llms`

Print AI-native documentation for this CLI

Emit a markdown reference covering every command, subcommand, and
flag. Intended for coding agents: the layout follows the llms.txt
convention so an LLM can learn the full shape of the CLI from a single
fetch.

The documentation is generated from the live command tree -- each
command contributes its own Short, Long, Usage, examples, and flag
descriptions. Nothing is hard-coded, so a new subcommand starts
appearing here the moment it's registered.

**Usage:** `repyh-console llms`

### `repyh-console upgrade`

Upgrade the CLI to the latest release

Download the newest CLI binary from the console and replace this
executable atomically. Pass --check to print available version info
without doing the replacement.

**Usage:** `repyh-console upgrade [flags]`

**Flags:**

- `--check`: print version info without upgrading
- `--force`: re-download and replace even if already on the latest version

### `repyh-console version`

Print the CLI version

**Usage:** `repyh-console version`

