mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
* 👷 build(cli): migrate bundler from tsup to tsdown Made-with: Cursor * 🔧 chore(cli): update package.json and tsdown.config.ts dependencies - Moved several dependencies from "dependencies" to "devDependencies" in package.json. - Updated the bundling configuration in tsdown.config.ts to simplify the bundling process. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore(cli): reorganize package.json and tsdown.config.ts - Moved "fast-glob" from "dependencies" to "devDependencies" in package.json for better clarity. - Removed the "onlyBundle" option from tsdown.config.ts to streamline the configuration. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(cli): add shell completion support --------- Signed-off-by: Innei <tukon479@gmail.com>
1.6 KiB
1.6 KiB
@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 buildonly generatesdist/index.js.- To make
lhavailable in your shell, runbun run cli:link. - After linking, if your shell still cannot find
lh, runrehashinzsh.
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
lhbinary by itself.
Quick Check
which lh
lh --help
lh agent <TAB>