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

eva-agent

v1.0.0

Published

EVA - 一个能自我进化的轻量级 Agent (Node.js / ESM 版)。单文件零依赖,支持任意 OpenAI 兼容接口。

Readme

EVA (Node.js)

如果一个智能体的执行层小到只是一个脚本,那它具有病毒传播一样的潜力。

EVA 是个麻雀虽小、五脏俱全的 Agent 智能体(Node.js / ESM 重写优化版),相当于低配版 CC,能帮你写脚本、写测试案例、执行 shell、分析数据等。

特性

  • 零运行时依赖:仅使用 Node.js 内置模块(fs / child_process / readline / 内置 fetch),无需 npm install
  • 极致轻量:单文件 eva.mjs,装好 Node.js 即可运行
  • 本地化:可接入本地部署的 OpenAI 兼容接口模型,如 vLLM / Ollama,或 DeepSeek / OpenAI 等外网模型
  • 目录级 Session:下次同样目录启动会延续之前对话
  • 安全审查:默认只执行只读命令,其他命令需要安全确认
  • 流式输出 + 思考过程显示:实时显示模型的 thinking / 正文 / tool_calls
  • 跨平台:Windows (PowerShell) / macOS / Linux (bash)
  • 可移植:很容易接入现有自动化流程,例如:eva -a -u '计算100w以内所有素数和并写到/tmp/result.txt'

环境要求

  • Node.js >= 18(需要内置 fetchAbortSignal.timeout

安装与运行

方式一:npm 全局安装(推荐)

git clone <repo> eva-node && cd eva-node
npm install -g .
# 之后任意目录直接 `eva`

方式二:Just Paste and Go

直接拷贝 eva.mjs 到任意位置,然后 node eva.mjs 即可(适合 docker / 运维环境快速部署)。

方式三:本地源码

node eva.mjs
# 或
npm start

配置环境变量

EVA 支持任何 OpenAI 兼容的 LLM 接口(DeepSeek / OpenAI / Ollama / vLLM 等),通过下面 3 个环境变量切换:

Linux / macOS:

export EVA_BASE_URL=https://api.deepseek.com/v1
export EVA_MODEL_NAME=deepseek-reasoner
export EVA_API_KEY=sk-xxxxx

Windows (PowerShell):

$env:EVA_BASE_URL="https://api.deepseek.com/v1"
$env:EVA_MODEL_NAME="deepseek-reasoner"
$env:EVA_API_KEY="sk-xxxxx"

本地 Ollama 示例:

export EVA_BASE_URL=http://localhost:11434/v1
export EVA_MODEL_NAME=gemma4:latest   # 必须是支持 tool-use 的模型
export EVA_API_KEY=ollama             # 任意非空

⚠️ 模型必须支持 function calling / tool-use,否则 EVA 无法调用 run_cli

命令行选项

用法: eva [options]   或   node eva.mjs [options]

  -h, --help                  显示帮助
  -a, --allow-all             允许所有命令无需用户确认即可执行
  -l, --list-session          列出所有 session
  -c, --clear-session         清除当前目录 session
  -u, --user-ask <text>       独立地针对一条用户提问执行 EVA

退出说明

Ctrl + C 直接中断,程序会自动保存 session,下次启动时自动加载。

运行时生成的文件

EVA 运行时会在启动时所在的当前目录 cwd 下创建以下文件/目录:

<cwd>/
└── .eva/                          # EVA 私人工作空间(首次运行自动创建)
    ├── hints.md                   # 长期记忆线索
    └── sessions/
        └── <dirhash>.json         # 当前目录的会话存档

| 路径 | 触发时机 | 作用 | | ------------------------------ | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | .eva/ | 启动时自动创建 | EVA 私人空间根目录,system prompt 中告知模型可在此放置自创建文件 | | .eva/hints.md | 模型调用 leave_memory_hints 工具(记忆压缩时)写入 | 持久化的"记忆线索"。每次启动会读取并拼接到 system prompt 的 # 记忆线索,是跨会话的长期记忆 | | .eva/sessions/ | 启动时自动创建 | 存放所有目录的 session 存档 | | .eva/sessions/<dirhash>.json | 用户 Ctrl+C 退出时自动保存 | 完整对话历史(含 tool*calls / tool 返回)。下次同一目录启动会自动续接对话。文件名是 cwd 路径把 /,\,: 替换成 * 得到的 |

模型通过 run_cli 工具产生的脚本/数据文件属于任务产物,可能在 cwd.eva/ 下,不在上表之列。

eva -l 查看所有 session,eva -c 清除当前目录 session。

关于 Skill & Command

EVA 通过 .eva/hints.md 获取记忆线索,该线索会拼接到 system prompt。可在 hints.md 里放置技能、命令的相关提示,EVA 会在需要时进入对应目录查看技能内容。

hints.md 示例:

.eva/commands、.eva/skills/ 目录里存储了大量的命令和技能:

1. xxxx/,可用于xxxx
   触发条件:当涉及xxxx时,可以查阅xxxx/底下的技能文件
2. yyyy/, 可用于yyyy
   触发条件:当涉及yyyy时,可以查阅yyyy/底下的技能文件

通过 Skill & Command,可以扩展 EVA 的各种能力。

与 Python 版的差异 / 优化点

  • 零运行时依赖:内置 fetch 替换 requests,移除 pathlib / argparse 等依赖
  • 真异步 I/Oasync/await + ReadableStream 处理 SSE 流,避免阻塞
  • 更稳健的流式解析TextDecoder + 缓冲区处理跨 chunk 的 UTF-8 截断
  • 超时强制中断run_cli 超时后通过 SIGKILL 真正终止子进程
  • 更友好的错误提示:连接 / 鉴权 / 模型查找等失败均给出清晰原因
  • 标准 Node 生态package.json + bin 字段支持 npm i -g 全局安装
  • ESM 模块化:使用 import / 顶层 await,结构更现代