tlive usage guide
tlive is a self-hosted monitoring/approval layer. Claude Code sessions report
through global hooks; Codex sessions are watched through an app-server
companion process (no hooks, no trust step). Completions and failures land in
IM (Telegram/Feishu) and the web dashboard, where you can reply-to-continue.
The posture (tlive mode, default notify) decides whether approvals are
held for a remote answer: in notify tlive only watches + notifies (the shim
never holds an approval — prompts stay 100% native); tlive mode full turns on
remote approval (Allow/Deny from IM/desktop/dashboard); off makes every hook a
no-op. The daemon auto-starts with new sessions (disable via
daemon.autoStart: false).
Commands
tlive setup — configure IM credentials + register the Claude/Codex plugins
(hooks ride the Claude plugin; Codex needs none). --hooks-only re-registers
plugins only; add --claude / --codex to pick a vendor.
tlive status — daemon health, effective mode, channels, and the Codex
companion state (running / degraded / off; degraded or off = Codex
approvals local-only).
tlive mode off|notify|full — set posture (see intro). Persisted to config,
takes effect on the next hook; notify is the default, full = remote
approval on.
tlive run <cmd> — wrap a process: local terminal + live web terminal (QR to open).
tlive url — print the dashboard link + QR code.
tlive logs -f — follow the daemon log.
tlive start / tlive stop — explicit lifecycle (start is rarely needed;
sessions lazy-start the daemon unless autoStart is off).
Diagnostics
- No IM messages:
tlive status for channel config; tlive logs -f for send
errors; confirm the daemon is up after starting a session.
- Codex has no remote cards: check
tlive status — the companion line must say
running. off means codex isn't on PATH (or Windows); degraded means the
app-server child keeps dying — see ~/.tlive/codex-appserver.log. Either way
Codex still prompts locally; nothing is ever auto-run.
- No approval card ever arrives: check
tlive status — the mode: line must
say full. The default notify never sends approval cards (tool prompts
stay local); enable remote approval with tlive mode full.
- Claude approval card unanswered (in
full): the local dialog stays live the
whole time (parallel channels, first answer wins); answering locally resolves
the remote card as "answered in terminal". The remote window defaults to ~24h
(approvals.windowSec, shared by both vendors).
- Web page unreachable:
tlive url for the current link (token is in the URL);
phones need the same LAN (or your own reverse proxy/VPN — tlive has no
publicUrl config, and cards never carry the link).
Security model in one breath
- Never auto-allow: unanswered → Claude's local dialog governs / Codex's native
prompt governs. Deny always carries a reason.
- Read-only tools (Read/Glob/Grep) pass by default.
/safe on also auto-allows
routine ops (non-dangerous Bash, non-sensitive edits) — the danger floor
(rm -rf, sudo, .env/.ssh writes…) still asks and no config can lower it.
/trust on pauses approvals entirely (high risk — pair with allowedSenders).
- Runtime switches flip the same state from either entrance: IM commands
(/mute /trust /safe) and the CLI (
tlive mute|trust|safe on|off). /mute on
= go quiet; it silences IM notifications ONLY. The desktop toast is a separate,
independent surface (IM ⊥ desktop): CLI-only tlive desktop on|off, no IM
command, unaffected by /mute. It fires only for things that need you to act:
a pending approval, or the idle "waiting for your input" nudge. A finished turn
stays on IM (a per-turn toast would flood the screen).
- Vendor-side
permissions.deny always wins; tlive never overrides it.
First-time onboarding
When the user says "help me set up tlive" (or runs /tlive:setup), walk them
through:
tlive status to check the engine; missing → npm i -g tlive.
- No channels → collect Telegram (bot token + chat id) or Feishu
(appId + appSecret) credentials and merge into
~/.tlive/config.json:
{ "allowedSenders": [], "adapters": { "telegram": { "token": "…", "chatIdAllowList": ["…"] }, "feishu": { "appId": "…", "appSecret": "…" } } }
tlive start → tlive status to verify channels; tlive url for the dashboard.
- Offer remote approval: tlive defaults to
notify (watch + notify only). If
the user wants to Allow/Deny tool calls from their phone, run tlive mode full
(holds each tool call for a remote answer; reversible with tlive mode notify).
Leave it in notify if they only want monitoring.
- Codex needs no extra step — the companion starts with the daemon. If status
says
off/degraded, that's diagnostic info, not a setup task.
1---2name: tlive3description: tlive — remote approvals (Telegram/Feishu/web), live web terminal, and session monitoring for Claude Code / Codex. Use for configuring or diagnosing tlive, connecting IM platforms, printing session links, or explaining approval behavior. Triggers "tlive", "IM bridge", "phone approvals", "remote terminal", "Telegram/Feishu notifications".4---5
6# tlive usage guide
7
8tlive is a self-hosted monitoring/approval layer. Claude Code sessions report
9through global hooks; Codex sessions are watched through an app-server
10companion process (no hooks, no trust step). Completions and failures land in
11IM (Telegram/Feishu) and the web dashboard, where you can reply-to-continue.
12The **posture** (`tlive mode`, default `notify`) decides whether approvals are
13held for a remote answer: in `notify` tlive only watches + notifies (the shim
14never holds an approval — prompts stay 100% native); `tlive mode full` turns on
15remote approval (Allow/Deny from IM/desktop/dashboard); `off` makes every hook a
16no-op. The daemon auto-starts with new sessions (disable via
17`daemon.autoStart: false`).
18
19## Commands
20- `tlive setup` — configure IM credentials + register the Claude/Codex plugins
21 (hooks ride the Claude plugin; Codex needs none). `--hooks-only` re-registers
22 plugins only; add `--claude` / `--codex` to pick a vendor.
23- `tlive status` — daemon health, effective `mode`, channels, and the Codex
24 companion state (`running` / `degraded` / `off`; degraded or off = Codex
25 approvals local-only).
26- `tlive mode off|notify|full` — set posture (see intro). Persisted to config,
27 takes effect on the next hook; `notify` is the default, `full` = remote
28 approval on.
29- `tlive run <cmd>` — wrap a process: local terminal + live web terminal (QR to open).
30- `tlive url` — print the dashboard link + QR code.
31- `tlive logs -f` — follow the daemon log.
32- `tlive start` / `tlive stop` — explicit lifecycle (start is rarely needed;
33 sessions lazy-start the daemon unless autoStart is off).
34
35## Diagnostics
361. No IM messages: `tlive status` for channel config; `tlive logs -f` for send
37 errors; confirm the daemon is up after starting a session.
382. Codex has no remote cards: check `tlive status` — the companion line must say
39 `running`. `off` means codex isn't on PATH (or Windows); `degraded` means the
40 app-server child keeps dying — see `~/.tlive/codex-appserver.log`. Either way
41 Codex still prompts locally; nothing is ever auto-run.
423. No approval card ever arrives: check `tlive status` — the `mode:` line must
43 say `full`. The default `notify` never sends approval cards (tool prompts
44 stay local); enable remote approval with `tlive mode full`.
454. Claude approval card unanswered (in `full`): the local dialog stays live the
46 whole time (parallel channels, first answer wins); answering locally resolves
47 the remote card as "answered in terminal". The remote window defaults to ~24h
48 (`approvals.windowSec`, shared by both vendors).
495. Web page unreachable: `tlive url` for the current link (token is in the URL);
50 phones need the same LAN (or your own reverse proxy/VPN — tlive has no
51 `publicUrl` config, and cards never carry the link).
52
53## Security model in one breath
54- Never auto-allow: unanswered → Claude's local dialog governs / Codex's native
55 prompt governs. Deny always carries a reason.
56- Read-only tools (Read/Glob/Grep) pass by default. `/safe on` also auto-allows
57 routine ops (non-dangerous Bash, non-sensitive edits) — the danger floor
58 (rm -rf, sudo, .env/.ssh writes…) still asks and no config can lower it.
59 `/trust on` pauses approvals entirely (high risk — pair with allowedSenders).
60- Runtime switches flip the same state from either entrance: IM commands
61 (/mute /trust /safe) and the CLI (`tlive mute|trust|safe on|off`). `/mute on`
62 = go quiet; it silences IM notifications ONLY. The desktop toast is a separate,
63 independent surface (IM ⊥ desktop): CLI-only `tlive desktop on|off`, no IM
64 command, unaffected by `/mute`. It fires only for things that need you to act:
65 a pending approval, or the idle "waiting for your input" nudge. A finished turn
66 stays on IM (a per-turn toast would flood the screen).
67- Vendor-side `permissions.deny` always wins; tlive never overrides it.
68
69## First-time onboarding
70
71When the user says "help me set up tlive" (or runs /tlive:setup), walk them
72through:
731. `tlive status` to check the engine; missing → `npm i -g tlive`.
742. No channels → collect Telegram (bot token + chat id) or Feishu
75 (appId + appSecret) credentials and merge into `~/.tlive/config.json`:
76 `{ "allowedSenders": [], "adapters": { "telegram": { "token": "…", "chatIdAllowList": ["…"] }, "feishu": { "appId": "…", "appSecret": "…" } } }`
773. `tlive start` → `tlive status` to verify channels; `tlive url` for the dashboard.
784. Offer remote approval: tlive defaults to `notify` (watch + notify only). If
79 the user wants to Allow/Deny tool calls from their phone, run `tlive mode full`
80 (holds each tool call for a remote answer; reversible with `tlive mode notify`).
81 Leave it in `notify` if they only want monitoring.
825. Codex needs no extra step — the companion starts with the daemon. If status
83 says `off`/`degraded`, that's diagnostic info, not a setup task.