npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@llangtop/pwiki-cli

v1.3.10

Published

Wiki knowledge base CLI — terminal search and management

Readme

@llangtop/pwiki-cli

Wiki 知识库终端命令行。

安装

npm i -g @llangtop/pwiki-cli

命令

# 初始化
pwiki setup                        # 下载模型 + 启用语义

# 数据源
pwiki load <目录>                  # 加载
pwiki unload                       # 查看 / 卸载
pwiki refresh                      # 重建索引 + 生成向量

# 搜索(默认混合模式)
pwiki search "关键词"              # 混合
pwiki search "xxx" -k              # 关键词
pwiki search "xxx" -s              # 语义
pwiki search "xxx" -f              # 全文
pwiki search "xxx" -p 2            # 第 2 页
pwiki search "xxx" --source <ID> --path-prefix "docs"

# 条目
pwiki read <路径>                  # 读全文
pwiki read <路径> --source <ID>    # 精确读取指定源内的同名路径
pwiki create <源> <文件>.md -t "标题" --tags "a,b"

# 领域知识文件(位于 <WIKI_HOME>/areas,不参与 source 索引)
pwiki area list
pwiki area read <areaId>
pwiki area write <areaId> --file <UTF-8 Markdown 文件>
pwiki area write <areaId> --content "# 领域知识"

# 模型
pwiki models                       # 列表
pwiki model-download -m bge-m3     # 下载
pwiki model-register ~/.pwiki/models/qwen3-local --id qwen3-local-q8 --dim 1024 --max-tokens 8192 --pooling last_token --dtype q8
pwiki semantic on / off            # 开关

# LLM 编译(提升搜索质量,需 API Key)
pwiki compile-status               # 查看
pwiki compile <路径>               # 编译单个
pwiki compile --all                # 批量
pwiki compile --all -m gpt-4o      # 指定模型
pwiki compile <路径> --force        # 强制重编
pwiki llm                          # LLM 配置

# 状态
pwiki status                       # 数据源 / 向量 / 质心 / 模型
pwiki info                         # status 的便捷别名

环境变量

| 变量 | 用途 | |------|------| | WIKI_HOME | 数据目录(默认 ~/.pwiki) | | LLM_API_KEY | LLM API Key | | LLM_API_BASE | 自定义 API 地址 | | LLM_MODEL | 自定义模型(默认 deepseek-chat) |

领域知识文件使用 areaId 定位,例如 ami/dlms 对应 <WIKI_HOME>/areas/ami/dlms.md。area write 是完整替换,不会自动 refresh、生成 embedding 或运行内部查询 Loop;外部 Agent 可以先用 area read 读取,再决定如何注入。