jan-cli 0.27.0

YAML-defined CLI trees with progressive help, optional exec aliases, merged extra specs, and SQLite audit logging keyed by git branch
Documentation
# `jan lab`

Isolated jan + cron environment for trying a command tree (agent systems,
schedules, Unifier wakeups) **without** changing your daily `jan use`
preference or the user systemd unit.

This is the supported way to spin up a second preferred tree + cron daemon.
Under the hood it uses the same isolation the smoke tests use:

| Env | Purpose |
|-----|---------|
| `JAN_CONFIG_DIR` | Own `config.json`, preferred tree, `cron-disabled.json` |
| `XDG_RUNTIME_DIR` | Own `cron.sock` so a second daemon can coexist |
| `UNIFIER_HOME` | Optional (`--with-unifier`) private Unifier board |

Labs live under `$XDG_CACHE_HOME/jan/lab/<ID>/` (override with `$JAN_LAB_ROOT`).

## Quick start

```bash
# Eval exports into the current shell and start cron (no systemd):
eval "$(jan lab /path/to/dotfiles/jan --start)"
jan cron --list
jan jobs demo run          # example agent system
jan lab stop

# Or drop into a subshell already configured:
jan lab /path/to/dotfiles/jan --start --shell
# … try agents …
exit
```

With a private Unifier board as well:

```bash
eval "$(jan lab /path/to/dotfiles/jan --with-unifier --start)"
unifier daemon status      # uses the lab UNIFIER_HOME
jan jobs interact run --to job-analyst --message '{"job_id":"demo"}'
```

## Commands

| Command | Action |
|---------|--------|
| `jan lab <DIR>` | Create a lab, `jan use` the tree inside it, print `export …` on stdout |
| `jan lab <DIR> --start` | Same, and start cron (background; never systemd) |
| `jan lab <DIR> --shell` | Same, then `exec $SHELL` with lab env set |
| `jan lab env [<ID>]` | Re-print exports for eval (default: current lab) |
| `jan lab status [<ID>]` | Show paths + `jan cron status` |
| `jan lab stop [<ID>]` | Stop lab cron (and unifier if `--with-unifier`) |
| `jan lab ls` | List labs (`*` = current) |
| `jan lab clean` | Stop and delete all labs |

## Options

| Flag | Description |
|------|-------------|
| `--root NAME` | Entry YAML inside DIR (same as `jan use --root`) |
| `--name ID` | Lab id (default: derived from DIR basename + stamp) |
| `--with-unifier` | Isolate Unifier under the lab and start its daemon |
| `--start` | Start `jan cron start --no-systemd` in the lab |
| `--shell` | Enter `$SHELL` with lab env (after setup) |

## Notes

- stdout is always eval-able `export` lines when creating a lab (human tips go to stderr), so `eval "$(jan lab …)"` works.
- `jan cron start` skips systemd automatically whenever `JAN_CONFIG_DIR` is set, so a lab never hijacks `~/.config/systemd/user/jan-cron.service`.
- After editing `cron:` YAML in the tree, run `jan cron refresh` inside the lab.
- Your daily daemon (default config + systemd) keeps running untouched.

See also: [`use`](use.md), [`cron`](cron.md).