# treehouse CLI

Small admin CLI for common Treehouse ops (NixOS multi-tenant hosting).

## Run

```bash
cd /home/admin/treehouse/cli
npm run treehouse -- --help
```

Optional (to get a `treehouse` command in your shell):

```bash
cd /home/admin/treehouse/cli
npm link
treehouse --help
```

## Commands

### List running tenant app containers

```bash
treehouse apps ps
treehouse apps ps --json
```

### List apps on disk (deployed or not)

```bash
treehouse apps list
treehouse apps list --tenant blu
```

### Runtime checks

```bash
treehouse runtime ping
treehouse runtime df --tenant blu
```

### Tenants usage/ports (SQLite)

```bash
treehouse tenants usage --date 2026-03-13
treehouse tenants ports
```

### Ops helpers

```bash
treehouse caddy lint
treehouse nanoclaw hup
treehouse backups status
treehouse doctor
```

Notes:
- This inspects per-tenant rootless `containerd` sockets under `/run/user/<uid>/containerd/containerd.sock`.
- Tenants without a socket are reported as having no runtime (usually means no apps started).
