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

@fifsky/aichat

v0.1.0

Published

A simple command-line AI agent with MCP and local skills.

Readme

aichat

一个简单的命令行ai agent,快速和 ai 对话并得到结果

Usage

安装前请先安装 Bun

npm install -g @fifsky/aichat
ai --config
ai 今天天气怎么样

如果想直接从 GitHub 安装,也可以使用:

npm install -g fifsky/aichat

本地开发:

bun install
bun run build
./dist/ai --config
./dist/ai 今天天气怎么样

配置

首次使用可以通过交互式配置向导设置模型服务、模型名称、API Key 以及是否显示思考内容:

ai --config

交互式配置界面

也可以使用 --set 直接更新配置项:

ai --config --set provider.baseURL=https://api.deepseek.com --set provider.model=deepseek-v4-pro

配置路径为 ~/.config/aichat/aichat.json

完整配置示例:

{
  "provider": {
    "name": "deepseek",
    "baseURL": "https://api.deepseek.com",
    "apiKey": "sk-xxx",
    "model": "deepseek-v4-pro",
    "thinking": {
      "enabled": true,
      "reasoningEffort": "high",
      "showReasoning": true
    }
  },
  "mcpServers": {
    "example": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@example/mcp-server"],
      "env": {}
    }
  },
  "skills": {
    "enabled": true,
    "dirs": ["~/.agents/skills"]
  },
  "tools": {
    "ask": {
      "enabled": true
    },
    "bash": {
      "enabled": true,
      "autoApprove": ["tvly *"],
      "timeoutMs": 60000
    }
  },
  "session": {
    "path": "~/.aichat/sessions/default.json",
    "maxMessages": 100
  }
}

清空上下文

对话上下文会保存在 ~/.aichat/sessions/default.json,上下文最多保留 100 条消息。如果需要重新开始一次干净的对话,可以执行:

ai --clean

Skills

ai agent会自动加载~/.agents/skills目录下的所有文件作为 skills, 并通过内置的 Bash 工具执行。

Bash 工具默认只自动批准tvly *,其他命令会在终端确认后执行。

Ask 工具

当 AI 对需求理解不清晰、缺少必要决策时,会使用内置的 ask 工具向用户追问。Ask 使用 @clack/prompts 组件渲染终端交互,支持单选、多选和自定义输入;每个问题最多展示 5 个选项。如果需要澄清多个问题,AI 会按步骤逐个询问。