tlive
git clone https://github.com/y49/tlive
git clone --depth=1 https://github.com/y49/tlive ~/.claude/skills/y49-tlive-tlive
SKILL.mdTLive — IM Bridge Skill
You are managing the TLive IM Bridge — bidirectional chat with AI coding tools from Telegram, Discord, or Feishu.
The Bridge uses the Claude Agent SDK (or Codex SDK) to interact with the AI coding tool. It is completely independent from the optional Go Core web terminal server.
User data:
~/.tlive/
Command Parsing
| User says (examples) | Subcommand |
|---|---|
(no args), , , | start |
, , , | setup |
, , | stop |
, , | status |
, , | logs |
, , , | reconfigure |
, , , , | doctor |
, , | help |
Disambiguation:
vs status
— Use doctor
status when the user just wants to check if the bridge is running. Use doctor when the user reports a problem or suspects something is broken. When in doubt and the user describes a symptom (e.g., "没反应了", "挂了"), prefer doctor.
Runtime Detection
available → Claude Code → interactive wizardAskUserQuestion- Not available → Codex / other → show config example, non-interactive
Config Check (all commands except setup
)
setupBefore any command except
setup, check ~/.tlive/config.env:
- Missing → Claude Code: auto-start
wizard. Codex: showsetup
and stop.~/.tlive/docs/config.env.example - Exists → proceed
Subcommands
/tlive
(no args) or start
— Start Bridge
/tlivestart1. Check config.env → if missing, auto-start setup 2. Check Bridge PID → if running, show status instead 3. Start Bridge: tlive start (uses TL_RUNTIME from config, default: claude) 4. Wait 2s, verify alive: tlive status 5. Report runtime, channels + web terminal status
setup
setupInteractive wizard. Collect one field at a time, confirm each (mask secrets to last 4 chars).
Before asking for platform credentials, read
~/.tlive/docs/setup-guides.md internally. Only mention the specific next step the user needs — don't dump the full guide. Show the relevant guide section only if the user asks for help.
Step 1 — Choose IM platforms:
AskUserQuestion: "Which IM platforms to enable? 1. Telegram — streaming preview, inline permission buttons 2. Discord — team use, channel-level access control 3. Feishu (飞书) — streaming cards, tool progress Enter numbers (e.g., 1,3):"
Step 2 — Collect credentials per platform:
- Telegram: Bot Token → confirm (masked) → Chat ID (optional) → Allowed User IDs (optional). Important: At least one of Chat ID or Allowed User IDs should be set.
- Discord: Bot Token → confirm (masked) → Allowed User IDs → Allowed Channel IDs (optional). Important: At least one of Allowed User IDs or Allowed Channel IDs should be set.
- Feishu: App ID → confirm → App Secret → confirm (masked) → Allowed User IDs (optional).
Step 3 — General settings:
- Runtime: claude (default) or codex
- Port (default 4590)
- Public URL (optional, for web links in IM messages)
- Auto-generate TL_TOKEN (32-char hex)
Step 4 — Write config and validate:
- Read
as the template — use its exact variable names (e.g.,~/.tlive/docs/config.env.example
for Telegram,TL_TG_*
for Discord,TL_DC_*
for Feishu). Do NOT invent variable names.TL_FS_* - Show a summary table (secrets masked to last 4 chars)
- Ask user to confirm before writing
mkdir -p ~/.tlive/{data,logs,runtime}- Write
using the template's variable names, then~/.tlive/config.envchmod 600 - Validate tokens — read
for exact commands per platform~/.tlive/docs/token-validation.md - Report results. If validation fails, explain what's wrong.
- On success: "Setup complete! I'll start the Bridge now." Then auto-start.
reconfigure
reconfigure- Read current config from
~/.tlive/config.env - Show current settings in a table (secrets masked to last 4 chars only)
- Ask what the user wants to change
- Collect new values one at a time, show where to find each value (show full guide from
only if asked)~/.tlive/docs/setup-guides.md - Update config file
- Re-validate any changed tokens
- Remind: "Run
then/tlive stop
to apply changes."/tlive start
stop
stoptlive stop
status
statustlive status
logs
logsExtract optional line count N from arguments (default 50).
tlive logs [N]
doctor
doctorRun diagnostics and suggest fixes. For complex issues, read
~/.tlive/docs/troubleshooting.md.
tlive doctor
Then validate IM tokens if configured — read
~/.tlive/docs/token-validation.md for commands.
help
helpShow a clear overview of the TLive system and available commands:
TLive — Three features, use any combination: In Claude Code (/tlive): /tlive Start IM Bridge (chat from phone) /tlive setup Configure IM platforms (AI-guided) /tlive reconfigure Modify specific config fields /tlive stop Stop Bridge /tlive status Show Bridge + Web Terminal + Hooks status /tlive logs [N] Show last N log lines /tlive doctor Diagnose issues + suggest fixes In terminal (tlive): tlive <cmd> Wrap command with web terminal (e.g. tlive claude) tlive setup Configure IM platforms (interactive) tlive install skills Install /tlive skill + hooks to Claude Code tlive hooks pause Auto-allow permissions, no IM notifications tlive hooks resume Resume IM approval flow In IM (from phone): /new Start new conversation /model <name> Switch model (e.g. claude-sonnet-4-6) /runtime claude|codex Switch AI provider /settings user|full|isolated Claude settings scope /perm on|off Permission prompts on/off /effort low|medium|high|max Thinking depth /stop Interrupt execution /verbose 0|1 Detail level (quiet/terminal card) /sessions List recent sessions /session <n> Switch to session /hooks pause|resume Toggle hook approval /status Check status /help Show commands
Notes
- Always mask secrets in output (show only last 4 characters)
- Always check for config.env before starting — without it the daemon crashes and leaves a stale PID file
- Bridge and Go Core web terminal are independent — Bridge works without Go Core
- Go Core is started separately via
in a terminal, not by this skilltlive <cmd> - Config at
— shared by both Bridge and Go Core~/.tlive/config.env - The daemon runs as a background Node.js process