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

@tokentestai/ais

v0.1.0

Published

AIS adds a local protection layer for AI agents by masking secrets before cloud APIs see them

Readme

AIS

一个你只需要在终端执行一行 npm 安装命令,就能在纯本地运行的情况下帮 AI agent 保护密码、密钥和连接串的工具。

AIS 的目标很直接:

  • 你照常把密码交给 AI 去做事
  • AI 尽量看不到真实密码
  • 真正需要用密码时,只在你的电脑本地还原
  • 不影响 AI 最终完成任务

一行安装

npm install -g @tokentestai/ais

安装完成后,使用的命令名是 ais

当前状态:

  • 原生支持 macOSLinux
  • Windows 支持还在持续补全
  • 当前原生适配 Claude CodeCodexOpenClaw

它解决什么问题

现在越来越多人会把网站密码、服务器密码、数据库连接串、接口密钥之类的信息交给 AI agent,让它代替自己登录、部署、填表、跑命令。

这样做很方便,而且基本已经是趋势。

但问题也很直接:

  • 只要你把真实密码明文交给 AI,这些内容就可能进入 AI 可见链路
  • 一旦真实密码离开你的电脑,你就很难再主动控制它后面会经过哪些日志、排障、留存或中转环节
  • 如果你用的是第三方 API 供应商,对方在技术上同样可能接触到完整请求内容

AIS 想做的事其实只有一句话:

别让真实密码离开你的电脑。

一句话理解它的原理

比如你让 AI 帮你登录某个网站,真实密码是:

qwert123

AIS 会先在你的电脑本地把它换成一个代号,比如:

__SECRET_01__

这时候:

  • AI 看到的是 __SECRET_01__
  • AI 服务提供方看到的也是 __SECRET_01__
  • 真正的 qwert123 不会直接送出去

等到 AI 在你的电脑上真的要执行登录动作时,AIS 再只在本地把:

__SECRET_01__ -> qwert123

还原回去。

所以最后网站里被填进去的,依然是正确的真实密码 qwert123,任务不会因为加了保护层而失败。

它是怎么工作的

整个过程可以理解成 5 步:

  1. 你把真实密码、密钥或连接串交给 AI,让它帮你完成任务。
  2. AIS 在本地先识别这些敏感内容,并把它们换成代号。
  3. 发往云端时,AI 只能看到代号,看不到真实内容。
  4. 当 AI 真正在你的电脑上执行命令、填写表单、写配置时,AIS 再在本地把代号还原成真实内容。
  5. 任务照常完成,但真实内容尽量没有离开你的电脑。

你可以把它理解成:

  • 发出去之前,先在本地“遮住”
  • 真正要用的时候,再在本地“揭开”

为什么我们做这个工具

我们自己也是 Claude CodeCodexOpenClaw 的高强度使用者。

我们相信,未来大家只会把越来越多的权限交给 AI。

问题不在于“要不要让 AI 帮你做事”,而在于:

能不能在把更多事情交给 AI 的同时,不让真实密码继续裸奔。

AIS 就是在这个前提下做出来的:

  • 纯本地运行
  • 开源
  • 尽量不改变原有使用习惯
  • 先解决最基础、最现实的一层风险

你可以拿它做什么

  • 让 AI 帮你登录网站,但不想把网站密码明文送进云端
  • 让 AI 帮你操作服务器,但不想把服务器密码裸露给外部模型链路
  • 让 AI 帮你写配置、调接口、跑脚本,但不想直接暴露密钥和连接串
  • 在保持自动化体验的同时,尽量减少敏感信息外发

快速开始

先初始化本地配置:

ais config

如果你要先手动保存一个密码或密钥:

ais add github-token
ais add github-token ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

包装 Claude Code

ais claude

包装 Codex

ais -- codex --sandbox danger-full-access

包装 OpenClaw

ais -- openclaw <你原本会输入的参数>

终端界面

除了自动保护,AIS 还提供了一个终端界面,方便你:

  • 查看最近哪些内容被成功保护了
  • 把某些内容改成“不加密”
  • 调整本地行为

打开方式:

ais ais

例如:

ais ais exclude <id>
ais ais exclude-type PASSWORD

为什么强调“纯本地”

因为这件事的关键,不是“换一种更好看的密码展示方式”,而是:

真实密码尽量不要被传输出你的电脑。

只要真实密码还要离开本地,你就依然很难真正掌控它后面会经过什么。

AIS 做的,正是把这一步尽量卡在本地完成:

  • 本地识别
  • 本地替换
  • 本地还原
  • 本地执行

当前边界

我们不会把它写成“万能安全工具”。

这东西很有用,但它不解决所有问题。

至少这些边界你要知道:

  • 如果你的电脑本地环境已经被攻破,它帮不了你
  • 它不是权限系统,不能替代最小权限、审计和隔离
  • 如果代号被再次加工、拆开、重新拼接,某些场景下可能无法还原
  • 如果某些工具链完全绕过本地可见层,保护效果也会受影响

所以更准确的说法是:

AIS 的作用是减少真实密码离开本地的机会,不是宣布“从此绝对安全”。

适合谁

  • 经常用 AI agent 帮自己处理真实任务的人
  • 已经开始把更多权限交给 AI,但对密码外发不放心的人
  • 使用官方 API 或第三方 API 供应商时,都希望先把风险再往回收一层的人
  • 想在不明显增加操作负担的前提下,提高自动化安全感的人

本地验证

如果你想在本地验证当前版本:

npm install
npm run lint
npm run build
npm run test
npm run typecheck

开源说明

这是一个纯本地运行的开源工具。

我们希望它做的不是“替代你的一切安全策略”,而是补上现在很多 AI 工作流里最容易被忽略、但又最现实的一层:

当你把密码交给 AI 时,先别把真实密码直接送出去。

许可证

MIT