lobehub/apps/cli
Arvin Xu 34b60e1842
🔨 chore: return full brief data in task activities (#13914)
*  feat: return full brief data in task activities (LOBE-7266)

The activity feed for tasks previously emitted a stripped `brief` row that
concatenated `resolvedAction` and `resolvedComment` and omitted everything
BriefCard needs (taskId, topicId, agentId, cronJobId, agents, actions,
artifacts, readAt, resolvedAt, etc.). Map the full `BriefItem` into each
activity row and reuse `BriefService.enrichBriefsWithAgents` to populate
the participant avatars. The CLI and prompt formatter now compose the
action + comment display string themselves.

* 🐛 fix: degrade gracefully when brief agent enrichment fails

getTaskDetail was calling BriefService.enrichBriefsWithAgents inside
Promise.all without a fallback, so a failure in the agent-tree lookup
would reject the whole request — a regression vs. the existing
.catch(() => []) pattern used by other activity reads in this method.
Fall back to agentless briefs on error so the task detail keeps
rendering.
2026-04-17 19:10:48 +08:00
..
e2e feat: lobehub cli for better agency agent (#12897) 2026-03-11 11:06:52 +08:00
man/man1 🐛 fix: fix minify cli (#13888) 2026-04-16 18:39:18 +08:00
src 🔨 chore: return full brief data in task activities (#13914) 2026-04-17 19:10:48 +08:00
.npmrc feat: add doc command in cli (#12752) 2026-03-07 13:48:02 +08:00
package.json 🐛 fix: fix minify cli (#13888) 2026-04-16 18:39:18 +08:00
pnpm-workspace.yaml ♻️ refactor: extract agent-stream into @lobechat/agent-gateway-client package (#13866) 2026-04-16 11:25:32 +08:00
README.md feat: add unified messaging tool for cross-platform communication (#13296) 2026-03-31 00:26:32 +08:00
tsconfig.json ♻️ refactor(cli): extract shared @lobechat/local-file-shell package (#12865) 2026-03-11 00:04:22 +08:00
tsdown.config.ts 🐛 fix: fix minify cli (#13888) 2026-04-16 18:39:18 +08:00
vitest.config.mts ♻️ refactor(cli): extract shared @lobechat/local-file-shell package (#12865) 2026-03-11 00:04:22 +08:00

@lobehub/cli

LobeHub command-line interface.

Local Development

Task Command
Run in dev mode bun run dev -- <command>
Build the CLI bun run build
Link lh/lobe/lobehub into your shell bun run cli:link
Remove the global link bun run cli:unlink
  • bun run build only generates dist/index.js.
  • To make lh available in your shell, run bun run cli:link.
  • After linking, if your shell still cannot find lh, run rehash in zsh.

Custom Server URL

By default the CLI connects to https://app.lobehub.com. To point it at a different server (e.g. a local instance):

Method Command Persistence
Environment variable LOBEHUB_SERVER=http://localhost:4000 bun run dev -- <command> Current command only
Login flag lh login --server http://localhost:4000 Saved to ~/.lobehub/settings.json

Priority: LOBEHUB_SERVER env var > settings.json > default official URL.

Shell Completion

Install completion for a linked CLI

Shell Command
zsh source <(lh completion zsh)
bash source <(lh completion bash)

Use completion during local development

Shell Command
zsh source <(bun src/index.ts completion zsh)
bash source <(bun src/index.ts completion bash)
  • Completion is context-aware. For example, lh agent <Tab> shows agent subcommands instead of top-level commands.
  • If you update completion logic locally, re-run the corresponding source <(...) command to reload it in the current shell session.
  • Completion only registers shell functions. It does not install the lh binary by itself.

Quick Check

which lh
lh --help
lh agent <TAB>