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

@wundercorp/loki

v0.21.16

Published

Loki Agent — a self-improving AI agent by WunderCorp, Inc.

Readme

Loki Agent 𖤍

WunderCorp, Inc. 构建的自进化 AI 代理。 它是唯一内置学习闭环的智能代理——从经验中创建技能,在使用中改进技能,主动持久化知识,搜索过往对话,并在跨会话中逐步构建对你的深度理解。可以在 $5 的 VPS 上运行,也可以在 GPU 集群上运行,或者使用几乎零成本的 Serverless 基础设施。它不绑定你的笔记本——你可以在 Telegram 上与它对话,而它在云端 VM 上工作。

支持任意模型——WunderCorp PortalOpenRouter(200+ 模型)、NVIDIA NIM(Nemotron)、小米 MiMoz.ai/GLMKimi/MoonshotMiniMaxHugging Face、OpenAI,或自定义端点。使用 loki model 即可切换——无需改代码,无锁定。


快速安装

curl -fsSL https://loki.computer/install.sh | bash

支持 Linux、macOS、WSL2 和 Android (Termux)。安装程序会自动处理平台特定的配置。

Android / Termux: 已测试的手动安装路径请参考 Termux 指南。在 Termux 上,Loki 会安装精选的 .[termux] 扩展,因为完整的 .[all] 扩展会拉取 Android 不兼容的语音依赖。

Windows: 在 PowerShell 中运行:

iex (irm https://loki.computer/install.ps1)

安装完成后,可能需要重启终端,然后运行 loki 开始对话。

安装后:

source ~/.bashrc    # 重新加载 shell(或: source ~/.zshrc)
loki              # 开始对话!

快速入门

loki              # 交互式 CLI — 开始对话
loki model        # 选择 LLM 提供商和模型
loki tools        # 配置启用的工具
loki config set   # 设置单个配置项
loki gateway      # 启动消息网关(Telegram、Discord 等)
loki setup        # 运行完整设置向导(一次性配置所有内容)
loki claw migrate # 从 OpenClaw 迁移(如果来自 OpenClaw)
loki update       # 更新到最新版本
loki doctor       # 诊断问题

📖 完整文档 →


省去到处收集 API Key — WunderCorp Portal

Loki 始终允许你使用任意服务商,这点不会改变。但如果你不想为模型、网页搜索、图像生成、TTS、云浏览器分别去申请五个不同的 API Key,WunderCorp Portal 用一个订阅就能覆盖全部:

  • 300+ 模型 — 用 /model <name> 随时切换
  • Tool Gateway — 网页搜索(Firecrawl)、图像生成(FAL)、文本转语音(OpenAI)、云浏览器(Browser Use),全部通过订阅托管。无需额外注册任何账户。

全新安装时一条命令即可:

loki setup --portal

它会通过 OAuth 登录、把 WunderCorp 设为推理服务商,并启用 Tool Gateway。随时用 loki portal info 查看路由状态。完整说明见 Tool Gateway 文档

你随时可以按工具单独切回自己的 API Key — Gateway 是按工具粒度生效的,不是一刀切。


CLI 与消息平台 快速对照

Loki 有两种入口:用 loki 启动终端 UI,或运行网关从 Telegram、Discord、Slack、WhatsApp、Signal 或 Email 与之对话。进入对话后,许多斜杠命令在两种界面中通用。

| 操作 | CLI | 消息平台 | |------|-----|----------| | 开始对话 | loki | 运行 loki gateway setup + loki gateway start,然后给机器人发消息 | | 开始新对话 | /new/reset | /new/reset | | 更换模型 | /model [provider:model] | /model [provider:model] | | 设置人格 | /personality [name] | /personality [name] | | 重试或撤销上一轮 | /retry/undo | /retry/undo | | 压缩上下文 / 查看用量 | /compress/usage/insights [--days N] | /compress/usage/insights [days] | | 浏览技能 | /skills/<skill-name> | /skills/<skill-name> | | 中断当前工作 | Ctrl+C 或发送新消息 | /stop 或发送新消息 | | 平台特定状态 | /platforms | /status/sethome |

完整命令列表请参阅 CLI 指南消息网关指南


文档

所有文档位于 doku.sh

| 章节 | 内容 | |------|------| | 快速开始 | 安装 → 设置 → 2 分钟内开始首次对话 | | CLI 使用 | 命令、快捷键、人格、会话 | | 配置 | 配置文件、提供商、模型、所有选项 | | 消息网关 | Telegram、Discord、Slack、WhatsApp、Signal、Home Assistant | | 安全 | 命令审批、DM 配对、容器隔离 | | 工具与工具集 | 40+ 工具、工具集系统、终端后端 | | 技能系统 | 过程记忆、技能中心、创建技能 | | 记忆 | 持久记忆、用户画像、最佳实践 | | MCP 集成 | 连接任意 MCP 服务器扩展能力 | | 定时调度 | 定时任务与平台投递 | | 上下文文件 | 影响每次对话的项目上下文 | | 架构 | 项目结构、代理循环、关键类 | | 贡献 | 开发设置、PR 流程、代码风格 | | CLI 参考 | 所有命令和标志 | | 环境变量 | 完整环境变量参考 |


从 OpenClaw 迁移

如果你来自 OpenClaw,Loki 可以自动导入你的设置、记忆、技能和 API 密钥。

首次安装时: 安装向导(loki setup)会自动检测 ~/.openclaw 并在配置开始前提供迁移选项。

安装后任意时间:

loki claw migrate              # 交互式迁移(完整预设)
loki claw migrate --dry-run    # 预览将要迁移的内容
loki claw migrate --preset user-data   # 仅迁移用户数据,不含密钥
loki claw migrate --overwrite  # 覆盖已有冲突

导入内容:

  • SOUL.md — 人格文件
  • 记忆 — MEMORY.md 和 USER.md 条目
  • 技能 — 用户创建的技能 → ~/.loki/skills/openclaw-imports/
  • 命令白名单 — 审批模式
  • 消息设置 — 平台配置、允许用户、工作目录
  • API 密钥 — 白名单中的密钥(Telegram、OpenRouter、OpenAI、Anthropic、ElevenLabs)
  • TTS 资产 — 工作区音频文件
  • 工作区指令 — AGENTS.md(使用 --workspace-target

使用 loki claw migrate --help 查看所有选项,或使用 openclaw-migration 技能进行交互式代理引导迁移(含干运行预览)。


贡献

欢迎贡献!请参阅 贡献指南 了解开发设置、代码风格和 PR 流程。

贡献者快速开始——使用标准安装器,然后在它创建的完整 git checkout 中开发: $LOKI_HOME/loki-agent(通常是 ~/.loki/loki-agent)。这会匹配 loki update、托管 venv、lazy dependencies、gateway 和 docs tooling 使用的布局。

curl -fsSL https://loki.computer/install.sh | bash
cd "${LOKI_HOME:-$HOME/.loki}/loki-agent"
uv pip install -e ".[all,dev]"
scripts/run_tests.sh

手动克隆备用路径(用于一次性 clone / CI,或你明确不想使用 managed install layout 时):

curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv venv --python 3.11
source venv/bin/activate
uv pip install -e ".[all,dev]"
python -m pytest tests/ -q

社区


许可证

MIT — 详见 LICENSE

WunderCorp, Inc. 构建。