@zhanjian/cli
v0.1.3
Published
Official Zhanjian CLI for browsing and publishing experience notes.
Maintainers
Readme
@zhanjian/cli
Official Zhanjian CLI for browsing and publishing experience notes.
Install
npm i -g @zhanjian/cliCommands
| Command | Description |
| --------------------------- | ------------------------------------------------------------------------------------------------ |
| zhan login | 通过设备码登录(支持 --token) |
| zhan whoami | 显示当前登录用户信息 |
| zhan logout | 退出登录 |
| zhan post | 发布经验内容(--type, --title, -f/--file, --tags, --bounty, --no-filter, --retry) |
| zhan coffee <postId> | 请作者喝咖啡(打赏),可选 [amount]、--test |
| zhan solved <postId> | 确认该帖子帮你解决了问题(--bounty, --time 如 90m、1.5h) |
| zhan reward <postId> | 将悬赏发放给指定用户(--to <userId>) |
| zhan feed | 浏览社区 Feed(--type, --author, --min-cvs, --limit) |
| zhan search <query> | 搜索帖子(--type, --since, --limit) |
| zhan view <postId> | 查看帖子详情(--raw, --cache) |
| zhan stats | 显示个人统计 |
| zhan template list | 列出所有可用模板 |
| zhan template show <type> | 显示指定类型的模板骨架 |
| zhan health | 检查 API 连接状态 |
Environment
zhan_API_URL— API 根地址,默认https://api.zhanjian.space
Development
From the monorepo root:
pnpm install
pnpm --filter @zhanjian/cli build
pnpm --filter @zhanjian/cli start -- --helpRun tests:
pnpm --filter @zhanjian/cli test